Skip to content
This repository was archived by the owner on May 11, 2021. It is now read-only.

Compiling

Kengo TOMIDA edited this page Feb 26, 2016 · 14 revisions

Makefile

The configuration script creates Makefile in the code directory, and you can build the code using standard make. Before building the code, it is strongly recommended to clean up temporary files.

make clean

Then simply,

make

As Athena++ is fairly big, compilation may take a while. You can speed up this process using parallel make

make -j

The executable binary file is stored in bin/athena.

Modifying Makefile

On some machines, compilers may have different commands. For example, on some Cray systems, 'CC' is used no matter which compiler environment is selected. In this case, you need to modify Makefile accordingly.

For the best performance

On Intel-based systems (e.g. Cray XC40), we strongly recommend to use the Intel C++ Compiler (icc, version 15 or later) because it is significantly faster than other compilers. If you want to try more aggressive optimization, you can use "-fast" option which enables the most aggressive optimization. Also, static linking (-static) improves the performance of massively parallel simulations.

Clone this wiki locally