Skip to content

Compiling the code

llibert94 edited this page Oct 4, 2023 · 8 revisions

Please note:

This is not a standalone code, and requires you to have Chombo and GRChombo compiled and working before compiling GRFolres! (This uses the tools of both Chombo and GRChombo and it doesn't duplicate them, so you do need to download and compile both codes beforehand). Head over to the GRChombo wiki for detailed instructions on Compiling Chombo and GRChombo.

Once you have done that, come back here and do the following:


Clone the GRFolres repository locally using

git clone https://github.com/GRTLCollaboration/GRFolres.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 GRFolres repository unless you have contacted us about an update.

You should have already set the shell environment variable CHOMBO_HOME as the path to the Chombo library using a command like:

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

and now similarly you need to set the variable GRCHOMBO_SOURCE as the path to the GRChombo Source:

export GRCHOMBO_SOURCE=path/to/GRChombo/Source/

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

Go to Examples/BinaryBH4dST and run

make all

This should compile without errors. See GRChombo Compilation FAQ for advice on common errors.

If this example works, go to the base GRFolres directory and run

make test -j 8

This will make the tests in parallel using 8 ranks. To run the tests use

make run

which is often easier to read if not done in parallel. To make all the examples use

make examples -j 8

You can also compile and run the tests, and compile the examples in one go with the command

make all

but then you have to do it all in parallel or all in serial.

If you subsequently change compiler options, use the command

make clean

or

make realclean

To start the compilation from a clean slate or change the XTRACONFIG variable in the Chombo Make.defs.local.