Our aim is to create a LUA file so that users can simply call command like below to call it. We will also install stitch package on SPPARKS.
ml spparks
I assume you have the SPPARKS files. If not you can clone it from their github page. Also you need to have openmpi installed. In my case I have openmpi as a separate module.
Now, let’s get going… Start with creating a separate a user called spparkuser
useradd spparkuser
passwd spparkuser
Extract the tar.gz file and move the contents to a shared location for all users.
mkdir -p //spparks
mv * //spparks
chown -R spparkuser:spparkuser //spparks
Now login as the spparkuser.
su - spparkuser
ml openmpi
export C_INCLUDE_PATH=/usr/include
cd //spparks/lib/stitch/libstitch
make
cd ..
python3 Install.py -b
cd //spparks/src
make yes-stitch
make mpi
And let’s now go back to being root and create a LUA file for it.
In your lmod directory create a LUA file like 6Sep2023-gcc-13.2.0-nstpl6u.lua and add these in it:
help([[
This module loads SPPARKS (6Sep2023?) with the Stitch library for MPI usage.
]])
whatis("SPPARKS - Stochastic Parallel PARticle Kinetic Simulator with Stitch library support (6Sep2023?)")
if not (isloaded("gcc")) then
load("gcc")
end
if not (isloaded("openmpi")) then
load("openmpi")
end
setenv("SPPARKS_HOME", "//spparks")
prepend_path("PATH", "//spparks/src")
prepend_path("LD_LIBRARY_PATH", "//spparks/lib/stitch")
prepend_path("LD_LIBRARY_PATH", "///openmpi/..../lib")
You may need to modify the gcc and openmpi package names that you have in your system along with the environment variables.
Now your users can load the module.
ml spparks
article provided by: https://www.serdaracir.net/hpc/spparks-with-stitch/
No Comments have been Posted.