Do not compile on login nodes as those nodes are old opteron 4386 machines. The Intel compilers default to -xhost so they will build in a -m=pentium4 code path as the default and only code path if an alternative is not specified e.g. -ax. Please make sure to compile on a dev node
$ module load ufrc
$ srundev --time=01:00:00
1) Download LAMMPS from http://lammps.sandia.gov/download.html
2) Create a software folder in your home directory (ie. ‘mkdir ~/soft’)
3) Upload the tarball to the ‘soft’ directory using WinSCP (https://winscp.net/eng/download.php) or MobaXterm (http://mobaxterm.mobatek.net/)
4) Untar the lammps tarball (ie. ‘tar -xvf lammps-stable.tar.gz’)
5) Go to the lammps src folder (ie. ‘cd lammps-*/src’)
6) Compile lammps (ie. make mpi)
For normal CPU use
module purge
module load intel/2019.1.144 openmpi/4.0.1 cmake/3.15.6
cd lammps # change to the LAMMPS distribution directory
mkdir build; cd build # create a new directory (folder) for build
cmake -C ../cmake/presets/nolib.cmake -D PKG_MANYBODY=yes -D PKG_RIGID=yes -D PKG_MISC=yes -D PKG_USER-REAXC=yes -D PKG_MOLECULE=yes -D PKG_USER-DIFFRACTION=yes -D PKG_KOKKOS=yes -D KOKKOS_ARCH=HSW -D KOKKOS_ENABLE_OPENMP=yes -D PKG_COMPRESS=yes -D ZLIB_INCLUDE_DIR=/home/sly1993/sly1993/software/zlib/zlib_install/include -D ZLIB_LIBRARIES=/home/sly1993/sly1993/software/zlib/zlib_install/lib ../cmake # configuration with (command-line) cmake
make # compilation
For Rome CPU(ZEN2) use
module purge
module load gcc/9.3.0 openmpi/4.0.4 cmake/3.19.1 # For Rome series cpu
cd fftw
./configure --prefix=install_directory
make
make install
cd lammps # change to the LAMMPS distribution directory
mkdir build; cd build # create a new directory (folder) for build
cmake -C ../cmake/presets/nolib.cmake -D PKG_MANYBODY=yes -D PKG_RIGID=yes -D PKG_MISC=yes -D PKG_USER-REAXC=yes -D PKG_MOLECULE=yes -D PKG_USER-DIFFRACTION=yes -D PKG_COMPRESS=yes ../cmake # configuration with (command-line) cmake
For GPU use
srun -p gpu --nodes=1 --gpus=quadro:2 --ntasks=1 --cpus-per-task=32 --time=06:00:00 --pty -u bash -i
# enter the development environment
srun --mem=16gb --ntasks=1 --cpus-per-task=24 --time=08:00:00 -p gpu --gpus=4 --constraint='skylake&2080ti' --pty bash -i
module purge
module load intel/2020.0.166 cuda/11.0.207 cmake/3.15.6
module load openmpi/4.0.4
cd lammps # change to the LAMMPS distribution directory
mkdir build; cd build # create a new directory (folder) for build
cmake -C ../cmake/presets/nolib.cmake -D PKG_MANYBODY=yes -D PKG_RIGID=yes -D PKG_MISC=yes -D PKG_USER-REAXC=yes -D PKG_MOLECULE=yes -D PKG_USER-DIFFRACTION=yes -D PKG_KOKKOS=yes -D Kokkos_ARCH_SKX=yes -D Kokkos_ARCH_TURING75=yes -D Kokkos_ENABLE_CUDA=yes -D Kokkos_ENABLE_OPENMP=yes -D CMAKE_CXX_COMPILER=/home/sly1993/sly1993/software/lammps/lammps/lib/kokkos/bin/nvcc_wrapper ../cmake # configuration with (command-line) cmake
7) Create a bin folder in your home directory (ie. ‘mkdir ~/bin’)
8) Copy the lammps executable to the bin folder (ie. ‘cp lmp_intel_cpu_openmpi ~/bin)
9) In your working directory have your lammps input files (ie. ‘in.lammps’)
10) Create a file ‘qlammps’ in your working directory
11) Inside the qlammps enter the following –
12) Exit the dev node.