Skip to content

Run Couette on HSUper

PMoldtmann edited this page Jan 12, 2023 · 31 revisions

(tested on 27th Nov 2022)

  1. Clone MaMiCo (see affiliated subsection in Wiki GitHub Setup)
  2. Within ~/.../MaMiCo create a build folder $ mkdir build
  3. Generate cmake files $ cmake ..
  4. Generate cmake settings $ ccmake . > "c" > "c" > "g"
  5. Make sure to load gcc 12.1.0 via $ ml gcc
  6. Load gcc via $ ml gcc and via $ gcc --version make sure gcc 12.1.0 is loaded
  7. You may check the available mpi versions using module spider openmpi
  8. Load the mpi module via $ ml openmpi
  9. For using add-ons such as pybind make use to load the corresponding module via $ ml USER-SPACK and subsequently $ spack load [email protected]. After the first command ideally the following module should be listed

1) cmake/3.23.1 2) gcc/12.1.0 3) openmpi/4.1.3-cuda

  1. now compile cmake via $ make -j8 mamico_pybind
  2. Make sure to copy the couette.xml.template from the /examples folder to your build folder as couette.xml
  3. If you get the error message 'ERROR MoleculeService::MoleculeService: Could not open file CheckpointSimpleMD_10000_reflecting_0.checkpoint!', copy the file of the same name from the 'examples' folder into your build folder.
  4. At last, a job will need to be submitted, for which a template is available on the HSU homepage; for an example see below...
  • If after $ make you get the following error ...
    /beegfs/home/e/USER_ID/ ... /MaMiCo/coupling/python-binding/mamico.cpp: In lambda function:
    /beegfs/home/e/USER_ID/ ... /MaMiCo/coupling/python-binding/mamico.cpp:599:122: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
    [](const tarch::utils::MultiMDService<3>& s) { return (void*)(s.getLocalCommunicator()); });
                                                                                         ^
    compilation terminated due to -Wfatal-errors.
    cc1plus: all warnings being treated as errors
    make[2]: *** [CMakeFiles/mamico_pybind.dir/build.make:118: CMakeFiles/mamico_pybind.dir/coupling/python-binding/mamico.cpp.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:199: CMakeFiles/mamico_pybind.dir/all] Error 2
    make: *** [Makefile:91: all] Error 2
    
    ... the wrong MPI-version may be used, which is determined by the currently active g++ compiler version.
  • unload MPI via $ module unlaod mpi and make a fresh build

Example Job-File

A working example for a job file can be seen here:

  • Create a file with the .job-extension, e.g. MaMiCo_Test.job
  • The content of this file may look like the following:
#!/bin/bash 

#SBATCH --job-name=MaMiCo_couette_test # specifies a user-defined job name 
#SBATCH --nodes=1                 # number of compute nodes to be used 
#SBATCH --ntasks=8                # number of MPI processes 
#SBATCH --partition=dev           # partition (small_shared, small, medium, small_fat, sm$
                                  # special partitions: large (for selected users only!) 
                                  # job configuration testing partition: dev 
#SBATCH --cpus-per-task=1         # number of cores per process 
#SBATCH --time=01:00:00           # maximum wall clock limit for job execution 
#SBATCH --output=MaMiCo_couette_test_%j.log # log file which will contain all output 

# commands to be executed 
cd $HOME/git_workspace/MaMiCo/build
./couette 
  • Now submit the job via $ sbatch MaMiCo_Test.job