Introduction#
Modules#
Here are the most used commands for manipulating modules:
- module list
- module avail
- module spider soft/version
- module load soft/version
- module unload {rm} soft/version
- module show soft
- module help soft
- module whatis soft
- module purge; module –force purge
- module use ~/modulefiles; module unuse ~/modulefiles
To see if a given software or program, called foo, is available on the software stach, run the command:
module spider fooHow to load gromacs on Grex?#
First, run the command module spider gromacs to search if gromacs is already available as a module:
module spider gromacsThe above shows that many versions are available:
- gromacs/2021.6
- gromacs/2022
- gromacs/2023.3
- gromacs/2024.1
- gromacs/2025.2
- gromacs/2025.3
Now, try to load a particular version 2025.3:
To see how to load this particular version, run the command:
module spider gromacs/2025.3and read the instructions.
Two modules are available:
arch/avx512 gcc/13.2.0 openmpi/5.0.6
cuda/12.4.1 arch/avx2 gcc/13.2.0Load one of the following modules:
- For CPU version, use:
module load arch/avx512 gcc/13.2.0 openmpi/5.0.6 gromacs/2025.3- for GPU version, use:
module load cuda/12.4.1 arch/avx2 gcc/13.2.0 gromacs/2025.3 gromacs/2025.3Load one module and experiment with the commands:
module list
module show gromacs
ls ${MODULE_GROMACS_PREFIX}/bin
which gmx_mpi
module rm gromacs
module show gromacs
which gmx_mpiHow to load LAMMPS on Grex?#
First, run the command module spider lammps to search if lammps is already available as a module:
module spider lammpsThe above shows that many versions are available:
- lammps/2021-09-29
- lammps/2024-08-29p1-nep
- lammps/2024-08-29p1
Now, try to load a particular version 2024-08-29p1:
To see how to load this particular version, run the command:
module spider lammps/2024-08-29p1and read the instructions.
Three modules are available:
- arch/avx512 gcc/13.2.0 openmpi/4.1.6
- arch/avx512 intel-one/2024.1 openmpi/4.1.6
- cuda/12.4.1 arch/avx2 gcc/13.2.0 openmpi/4.1.6
Load one of the following modules:
- CPU version built with GCC:
module load arch/avx512 gcc/13.2.0 openmpi/4.1.6 lammps/2024-08-29p1- CPU version built with Intel vompiler:
module load arch/avx512 intel-one/2024.1 openmpi/4.1.6 lammps/2024-08-29p1- GPU version:
module load cuda/12.4.1 arch/avx2 gcc/13.2.0 openmpi/4.1.6 lammps/2024-08-29p1Load one module and experiment with the commands:
module list
module show lammps
ls ${MODULE_LAMMPS_PREFIX}/bin
which lmp
module rm lammps
module show lammps
which lmpExperiment with other programs#
CVMFS on Grex#
How to switch to CCEnv which provides the same software stack installed on national clusters?
For the first time, you may need to run the commands:
ls /cvmfs/
ls -1 /cvmfs/to see what directories are available.
[~@bison ~]$ ls -1 /cvmfs/
cvmfs-config.computecanada.ca
neurodesk.ardc.edu.au
oasis.opensciencegrid.org
singularity.opensciencegrid.org
soft.computecanada.ca**To switch to CCEnv, use the following:
module load CCEnv
module load arch/avx512
module load StdEnv/2023The above will ensure that the same software installed on national systems under the environment StdEnv/2023 is mounted on Grex.
Fo example, to load geant4/11.3.0 on national systems, one should use:
module load StdEnv/2023 gcc/12.3 geant4/11.3.0To load the same module on Grex, one should use:
module load CCEnv
module load arch/avx512
module load StdEnv/2023
module load gcc/12.3 geant4/11.3.0How to mount neurodesk.ardc.edu.au on Grex?
From the login node, run the commands:
[~@yak ~]$ ls -1 /cvmfs/
cvmfs-config.computecanada.ca
restricted.computecanada.ca
soft.computecanada.caThe first timje, we run ls -1 /cvmfs/, the repo neurodesk.ardc.edu.au did not show up. The directories under cvmfs are auto-mounted. It means, they should be first accessed using ls for example:
[~@yak ~]$ ls /cvmfs/neurodesk.ardc.edu.au
[~@yak ~]$ ls -1 /cvmfs
cvmfs-config.computecanada.ca
neurodesk.ardc.edu.au
restricted.computecanada.ca
soft.computecanada.caNow, the repo shows up under /cvmfs
To use the modules from this repo, one should source the modulefiles directory:
[~@yak ~]$ ls /cvmfs/neurodesk.ardc.edu.au/neurodesk-modules
[~@yak ~]$ module use /cvmfs/neurodesk.ardc.edu.au/neurodesk-modulesNow, let’s search for a module called FSL that is availbale on this repo:
[~@yak ~]$ module spider fsl
[~@yak ~]$ module spider functional_imaging/fsl/6.0.7.18
[~@yak ~]$ module load functional_imaging/fsl/6.0.7.18This module relies on singularity:
[~@yak ~]$ module load singularity
[~@yak ~]$ module list
[~@yak ~]$ which fsl
/cvmfs/neurodesk.ardc.edu.au/containers/fsl_6.0.7.18_20250928/fsl
https://neurodesk.org/getting-started/neurocontainers/cvmfs/Quick test using LAMMPS#
Here are the instructions to run a quick test using LAMMPS on Grex:
Requireements:
- access to login or compute node via salloc.
- access to a module (lammps in this case)
- Input file: lammps-input.in
# 3d Lennard-Jones melt
units lj
atom_style atomic
lattice fcc 0.8442
region box block 0 10 0 10 0 10
create_box 1 box
create_atoms 1 box
mass 1 1.0
velocity all create 3.0 87287
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5
neighbor 0.3 bin
neigh_modify every 20 delay 0 check no
fix 1 all nve
thermo 50
run 10000
#write_data config.end_melt
# End of the Input file.First, connect to a cluster {Grex in this case}
Search for lammps modules:
- Module “lammps/2024-08-29p1”.
- Use module spider to see how to load this module.
module purge
module spider lammps/2024-08-29p1Then load the module “lammps/2024-08-29p1
module load arch/avx512 gcc/13.2.0 openmpi/4.1.6 lammps/2024-08-29p1Make sure that the module is loaded and available in your environment by running
- The binary for this program is called lmp
- See if the binary is in your path by running the command:
module list
which lmpNow try to run the test interactively by invoking the command:
lmp -in lammps-input.inBefore running any script, use cat command to see the content of the script
cat <your script>Run the following commands from your terminal
sh ./grex-runlmp-1cpu-serial.sh
sh ./grex-runlmp-2cpu-openmp.sh
sh ./grex-runlmp-2cpu-mpi.sh
sh ./grex-runlmp-4cpu-openmp.sh
sh ./grex-runlmp-4cpu-mpi.sh
sh ./grex-runlmp-8cpu-2mpi-4openmp.sh
sh ./grex-runlmp-8cpu-4mpi-2openmp.shThe above will run lammps using:
- 1 CPU ==> Serial program
- 2 CPUs ==> OpenMP program
- 2 CPUs ==> MPI program
- 4 CPUs ==> OpenMP program
- 4 CPUs ==> MPI program
- 8 CPUs ==> Hybrid mode (2 MPI + 4 OpenMP)
- 8 CPUs ==> Hybrid mode (4 MPI + 2 OpenMP)
The above will generate the following output:
- output_lammps-serial.txt
- output_lammps-openmp-2cpus.txt
- output_lammps-mpi-2cpus.txt
- output_lammps-openmp-4cpus.txt
- output_lammps-mpi-4cpus.txt
- output_lammps-8cpu-2mpi-4openmp.txt
- output_lammps-8cpu-4mpi-2openmp.txt
Useful links#
- Using modules on Grex.
- Running Lammps on Grex.
- Running GROMACS on Grex.