Unverified Commit 0925fc82 authored by Richard Berger's avatar Richard Berger
Browse files

Make Zstd support optional

parent 3865de87
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
find_package(ZLIB REQUIRED)
target_link_libraries(lammps PRIVATE ZLIB::ZLIB)

find_package(Zstd REQUIRED)
find_package(Zstd)

if(Zstd_FOUND)
    target_compile_definitions(lammps PRIVATE -DLAMMPS_ZSTD)
    target_link_libraries(lammps PRIVATE Zstd::Zstd)
endif()
+4 −0
Original line number Diff line number Diff line
@@ -10,5 +10,9 @@ alternative for compressed file I/O on systems where using a pipe can
cause problems, e.g. when using RDMA communication with pinned memory
like clusters with Infiniband or Myrinet.

Update 08/2020: Added variants that use the Zstd compression library instead
of zlib. To enable, set -DLAMMPS_ZSTD. These provide a wider range of
compression levels. See http://facebook.github.io/zstd/ for more details.

Currently a few selected dump styles are supported for writing via
this packaging.
+4 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
   Contributing author: Richard Berger (Temple U)
------------------------------------------------------------------------- */

#ifdef LAMMPS_ZSTD

#include "dump_atom_zstd.h"
#include "domain.h"
#include "error.h"
@@ -189,3 +191,5 @@ int DumpAtomZstd::modify_param(int narg, char **arg)
  }
  return consumed;
}

#endif
+3 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
   Contributing author: Richard Berger (Temple U)
------------------------------------------------------------------------- */

#ifdef LAMMPS_ZSTD

#ifdef DUMP_CLASS

DumpStyle(atom/zstd,DumpAtomZstd)
@@ -47,6 +49,7 @@ class DumpAtomZstd : public DumpAtom {

}

#endif
#endif
#endif

+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
   Contributing author: Richard Berger (Temple U)
------------------------------------------------------------------------- */

#ifdef LAMMPS_ZSTD
#include "dump_cfg_zstd.h"
#include "atom.h"
#include "domain.h"
@@ -192,3 +193,4 @@ int DumpCFGZstd::modify_param(int narg, char **arg)
  }
  return consumed;
}
#endif
Loading