Skip to content

Compiling GRTresna

Josu Aurrekoetxea edited this page Dec 8, 2025 · 10 revisions

After compiling Chombo, GRTresna can be cloned and compiled.

To clone the repository, use the command

https://github.com/GRTLCollaboration/GRTresna.git

or, if using SSH authentication,

git@github.com:GRTLCollaboration/GRTresna.git

If you plan to make significant changes to the code, we recommend you create your own fork, so that you can store your updates to the code. Please do not create branches in the GRTresna repository unless you have contacted us about an update.

The CHOMBO_HOME shell variable should then be set as the (absolute) path to the lib folder in Chombo, using the command

export CHOMBO_HOME=/path/to/Chombo/lib/

This can also be added to the .bashrc or .profile file in your home directory so it is set automatically each time you login.

To compile the solver, navigate to the GRTresna example folder to be used (e.g. GRTresna/Examples/ScalarFieldCosmo/) and run

make all -j 8

This will make the code in parallel using 8 ranks. If any compiler options are changed (or if you have changed the solution method ie CTTK to CTTK Hybrid), all executables should be removed with

make realclean

before you recompile. If you have only made small changes

make clean

may be sufficient. You will then need to run make all again to recompile.

Clone this wiki locally