summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-12-16 03:46:07 +0000
committerCoprDistGit <infra@openeuler.org>2024-12-16 03:46:07 +0000
commit44a16e66b0c0386e218274775de36c90ec53a94d (patch)
treebb16dd50b33ffb9f428a2b57e34a35b84b85d7a7
parent27db1e7daaec9d8ebf59eb43cbaf2b46464d571b (diff)
automatic import of lammps
-rw-r--r--lammps.spec15
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