-
Notifications
You must be signed in to change notification settings - Fork 5
Setup and Configuration: KVS
Running kvstest locally
- Move to your MaMiCo build folder
- From
~/.../MaMiCo/examplescopykvs.xml.templateto your build folder askvs.xml - From
~/.../MaMiCo/examplescopykvstest.ini.templateto your build folder askvstest.ini - From
~/.../MaMiCo/coupling/tests/kvs-lbmpycopykvstest.pyto your build folder - Install coloredlogs library via
$ python3 -m pip install --user coloredlogs - Via
$ ccmake .enable pybind11 and MPI, MPI should automatically be enabled upon configuring with pybind11, exit viac > g - In
kvstest.pyensure that the lineimport pythonfilters as pfis not included in the script - Execute via
$ python3 kvstest.py
Running kvstest on HSUper (tested on 28th Nov 2022)
- Install Python Pandas via
$ python3 -m pip install --user pandas - Install Python MatPlotLib via
$ python3 -m pip install --user matplotlib - Install Python LBMPy via
$ python3 -m pip install --user lbmpy - Install IPython via
$ python3 -m pip install --user IPython - Install iPyWidgets via
$ python3 -m pip install --user ipywidgets
-
Clone the MaMiCo-github GitHub Setup
-
Create a build folder
$ mkdir build -
Move to build folder
$ cd build -
From
~/.../MaMiCo/examplescopykvs.xml.templateto your build folder askvs.xmle.g.$ cp ~/git_workspace/MaMiCo/examples/kvs.xml.template kvs.xml -
From
~/.../MaMiCo/examplescopykvstest.ini.templateto your build folder askvstest.inie.g.$ cp ~/git_workspace/MaMiCo/examples/kvstest.ini.template kvstest.ini -
From
~/.../MaMiCo/coupling/tests/kvs-lbmpycopykvstest.pyto your build folder e.g.$ cp ~/git_workspace/MaMiCo/coupling/tests/kvs-lbmpy/kvstest.py kvstest.py -
Load spack via
$ ml USER-SPACK -
Load pybind11 via
$ spack load py-pybind11@2.9.1; this important because this will change the Python version to 3.9.12; in order to avoid the "ModuleNotFoundError" the Python version used when executing the script must be equal to the version used for compilation of MaMiCo -
Load Numpy
$ spack load py-numpy@1.22.4 -
Load cmake
$ ml cmake -
Load gcc via
$ ml gccand via$ gcc --versionmake sure gcc 12.1.0 is loaded -
Load MPI as pybind11 requires it
$ ml openmpi -
$ cmake .. -
via
$ ccmake .enable pybind11 and MPI, MPI should automatically be enabled upon configuring with pybind11, exit via "c" > "c" > "g" -
Compile MaMiCo via
$ make -j16 -
In
kvstest.pyensure that the lineimport pythonfilters as pfis not included in the script -
At last, a job will need to be submitted, for which a template is available on the HSU homepage; for an example see below...
A working example for a job file can be seen here:
- Create a file with the
.job-extension, e.g.kvstest.job - The content of this file may look like the following:
#!/bin/bash
#SBATCH --job-name=kvs_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=00:30:00 # maximum wall clock limit for job execution
#SBATCH --output=kvs_test_%j.log # log file which will contain all output
# commands to be executed
cd $HOME/git_workspace/MaMiCo/build #cd
python3 kvstest.py
- Now submit the job via
$ sbatch kvstest.job
If trying to run tvstest.py on HSUper prints the error message ModuleNotFoundError: No module named 'mamico' rebuild MaMiCo as you may have compiled MaMiCo using the wrong python version. Ensure that Python 3.9.12 is used and rebuild MaMiCo.