Build from sources


These instructions assume you have a complete GACODE top-level directory, which can be cloned from GitHub:

$ git clone

Environment variables

First, you need to locate a suitable platform, or make your own platform files. After cloning the repository, you can query the existing platforms using:

$ ./gacode/shared/bin/gacode_platforms

In order to compile the full GACODE package on a new machine, platform files must be created. Let’s imagine you have a new laptop, and you want this platform to be known as MY_PC. In this case you’ll need these lines in your shell RC file:

export GACODE_ROOT=$HOME/gacode
. $GACODE_ROOT/shared/bin/gacode_setup

Then you must create the following files:

  1. Machine-specific compilation options:

  2. Parallel execution command syntax:

  3. Any module load commands (optional) go here:


Numerous templates for each of these files can be found in the specific folders, and most often there will be an existing machine files that is almost exactly what you need. So, the strategy is to copy a similar machine file to your new one, and tweak as required.


To build the entire GACODE project, type:

$ make

To test that the build is successful, you can run regression tests:

$ neo -r
$ tglf -r
$ cgyro -r -n 4 -nomp 2

This last command run the complete CGYRO regression test suite using 4 MPI tasks and 2 OpenMP threads (8 total threads).