diff options
Diffstat (limited to 'lammps.spec')
-rw-r--r-- | lammps.spec | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lammps.spec b/lammps.spec index 28dbf07..94b1fcb 100644 --- a/lammps.spec +++ b/lammps.spec @@ -181,6 +181,7 @@ mkdir build && cd build for mpi in '' mpich %{?with_openmpi:openmpi} ; do test -n "${mpi}" && module load mpi/${mpi}-%{_arch} #python wrapper isn't mpi specific + MPI_SUFFIX=${mpi:+_$mpi} %cmake3 ../cmake \ -C ../cmake/presets/all_on.cmake \ -C ../cmake/presets/nolib.cmake \ @@ -210,14 +211,14 @@ for mpi in '' mpich %{?with_openmpi:openmpi} ; do -DCMAKE_INSTALL_BINDIR=%{_bindir} \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DCMAKE_INSTALL_MANDIR=%{_mandir} \ - -DLAMMPS_MACHINE="${MPI_SUFFIX#_}" -DLAMMPS_LIB_SUFFIX="${MPI_SUFFIX#_}" \ + -DLAMMPS_MACHINE=${MPI_SUFFIX#_:-default} \ + -DLAMMPS_LIB_SUFFIX=${MPI_SUFFIX#_:-default} \ ${mpi:+-DBUILD_MPI=ON -DFFT_USE_HEFFTE=ON \ - -DCMAKE_EXE_LINKER_FLAGS="%{__global_ldflags} -Wl,-rpath,${MPI_LIB} -Wl,--enable-new-dtags" \ - -DCMAKE_SHARED_LINKER_FLAGS="%{__global_ldflags} -Wl,-rpath,${MPI_LIB} -Wl,--enable-new-dtags" \ - -DCMAKE_EXE_LINKER_FLAGS="%{__global_ldflags} -Wl,-rpath,${MPI_LIB} -Wl,--enable-new-dtags" \ - -DCMAKE_SHARED_LINKER_FLAGS="%{__global_ldflags} -Wl,-rpath,${MPI_LIB} -Wl,--enable-new-dtags" \ - $(test "$mpi" != openmpi || echo "-DMPIEXEC_PREFLAGS=--oversubscribe")} - cmake --build . -j64 + -DCMAKE_EXE_LINKER_FLAGS="%{__global_ldflags} -Wl,-rpath -Wl,${MPI_LIB} -Wl,--enable-new-dtags" \ + -DCMAKE_SHARED_LINKER_FLAGS="%{__global_ldflags} -Wl,-rpath -Wl,${MPI_LIB} -Wl,--enable-new-dtags" \ + $(test "$mpi" != openmpi || echo "-DMPIEXEC_PREFLAGS=--oversubscribe") } \ + $(test -z "${mpi}" && echo -DBUILD_MPI=OFF -DBUILD_LAMMPS_SHELL=ON -DBUILD_TOOLS=ON) + cmake --build . -j8 test -n "${mpi}" && module unload mpi/${mpi}-%{_arch} done |