Build and Run#
Build#
In the base directory ‘Q-POP-Modules’, for Ubuntu-20.04 run
source $HOME/fenics/dolfin/share/dolfin/dolfin.conf
cmake -B build -S .
cmake --build build
and if using Ubuntu-22.04, run
source $HOME/fenics/dolfin/share/dolfin/dolfin.conf
cmake -DBOOST_ROOT=$HOME/boost -B build -S .
cmake --build build
The above can also be run to similar effect by combining the first two commands. This builds Q-POP-IMT without adding Dolfin’s paths to the environment. For example, on Ubuntu-20.04:
cmake -DDOLFIN_DIR=$HOME/fenics/dolfin/share/dolfin/cmake -B build -S .
cmake --build build
Run#
To run the simulation using Python, navigate to Q-POP-Modules/imt and then use
mpirun -np 2 python3 ./qpop-imt.py
To run the simulation using C++, there are two equivalent methods:
You can change directory (cd) to the
build/imt/imt-cpp
folder, create an input file (see ‘input.md’ for an example), and then run theqpop-imt
executable directly from the build directory using
mpirun -np 2 qpop-imt
where the number following the option ‘np’ is the number of processors to use.
Or you can add the path
build/imt/imt-cpp
folder to the PATH environment variable usingPATH="<ADD PATH TO Q-POP-MODULES HERE>/build/imt/imt-cpp${PATH:+:${PATH}}"
, which will allow the use ofqpop-imt
as a command from any folder with an input file.