SixTrack is built with CMake. SixTrack is written in Fortran 2008, and can be built using either gfortran, ifort or nagfor. A number of wrappers and dependencies are written in c and c++, and can be built with gcc. Building with icc and clang generally works, but the test suite wrapper does not currently build with icpc.
The following versions are known minimum restrictions, or compiler versions that are known to work. Certain versions have known bugs, like gfortran 7.3, however these are not critical.
- CMake: Requires at least 3.0.
- GNU Compiler: Requires at least 5.x. Recommended 8.0 or higher.
- Intel Compiler: Tested with 18.0 or higher.
- Nag Compiler: Tested with 6.1.
A build script cmake_six
is provided to help build SixTrack. Each feature below can be enabled by specifying the flag, or disabled by specifying the flag with a minus before it.
Example:
./cmake_six gfortran release CR -STF
Builds SixTrack release with gfortran, with checkpoint/restaring support and without singletrackfile (see below). Compiler and build type are optional arguments.
- release: Builds the standard version of SixTrack
- debug: Builds a debug version of SixTrack with the
-g
flag and no compiler optimisation. It is significantly slower, and only to be used for code debugging.
- TILT: Allow elements to be tilted (by error)
- CRLIBM: Use correctly rounded libmath instead of system libmath
- SIXDA: Build differential algebra version (NOT dynamic aperture!)
- ZLIB: Link with zlib and minizip, and is required for BOINC and the ZIPF.
- NAFF: Link to external NAFFlib for FMA.
- DISTLIB: Link to external DISTlib for the beam distribution.
- HASHLIB: Build the md5 hash library (used for tests and BOINC).
- BUILD_TESTING: Enable the test suite.
- BOINC: Builds BOINC version of SixTrack.
- CR Enables checkpoint/restart support. Required for BOINC.
- BEAMGAS: Beam-gas scattering.
- FIO: Use FortranIO from Fortran2003 to correctly round ASCII input/output. this option overrides CRLIBM when reading/writing.
- CERNLIB: Link to external CERNLIB library for PAW plots. Otherwise use internally defined dummy functions.
- HDF5: Adds support for the HDF5 block which enables writing output to a single HDF5 file.
- ROOT: Adds support for writing to ROOT files. Experimental and undocumented.
- MERLINSCATTER: Interaction physics for collimation from Merlin.
- G4COLLIMATION: Interaction physics for collimation from Geant4.
- FLUKA: Couple to FLUKA for beam collimation.
- PYTHIA: Link with Pythia8 for SCATTER module.
- 32BIT: Create a 32bit binary. Default OFF.
- 64BIT: Create a 64bit binary. Default ON.
- STATIC: Create a statically linked binary. Default ON.
- NATIVE: Enable optimizations for the current machine. Default OFF.
- AVX: Enable use of the Advanced Vector Extensions (AVX) instruction set. Sandy Bridge and later. Default OFF.
- AVX2: Enable use of the Advanced Vector Extensions 2 (AVX2) instruction set. Haswell and later. Default OFF:
- AVX-512: Enable use of the Advanced Vector Extensions 512 (AVX-512) instruction set. Currently targeting Skylake-X. Default OFF.
- 32BITM: Floats are 32bit (single precision. Default OFF.
- 64BITM: Floats are 64bit (double precision. Default ON.
- 128BITM Floats are 128bit (quad precision). Default OFF.
- ROUND_NEAR: Always round to the nearest number after floating point operations. Default ON.
- ROUND_UP: Always round up after floating point operations. Default OFF.
- ROUND_DOWN: Always round down after floating point operations. Default OFF.
- ROUND_ZERO: Always round towards zero after floating point operations. Default OFF.
- COVERAGE: Enable build flags for testing code coverage with gcov. Only works with GNU compilers. Default OFF.
- GPROF: Enable build flags for code profiling with gprof. Only works with GNU compilers. Default OFF.
- WARN: Enable build flags for additional compiler warnings. Default OFF.