Makefile options
1. Select compiler
Set a suitable compiler in the first line of the Makefile: COMPILER = <compiler_phrase>. The options are intel, gnu or portland - depending on your available compilers.
Table : List of default compilers
| Compiler Option | Normal | With MPI |
|---|---|---|
| intel | ifort, icc | mpiifort, mpiicc |
| gnu | gfortran, gcc | mpif90, mpicc |
| portland | pgf95, pgcc | mpif90, mpicc |
2. Select compiling options
PRODRUNSet it toyesfor production run,nofor debugging.PRECISIONSet it to ‘dble’ for double-precision calculations or to ‘sngl’ for single-precision calculationsOUT_PRECSet it to ‘dble’ for double-precision in binary outputs or to ‘sngl’ for single precisionDEBUGSet toyesto run in debugging mode. While running in debugging mode, setPRODRUNtono. The debug mode with intel compilers usesmarmot90.USE_MPISet toyesto use MPIUSE_OMPSet toyesto use openmp (cannot work without MPI)USE_PRECONDSet toyesto perform some pre-conditioning of the matricesUSE_FFTLIBThis option lets you select the library you want to use for Fast Fourier Transforms. This can be set toJW,FFTWorMKL.JWrefers to the inbuilt library by Johannes Wicht, whileMKLrefers to the Intel Math Kernel Library. UseJWif you don’t have Intel MKL installed.USE_DCTLIBThis option lets you select the library you want to use for Discrete Cosine Transforms. This can be set toJW,FFTWorMKL.USE_LAPACKLIBThis option allows you to select the library you want to use for LU factorisation. This can be set toJW,MKL,LIBFLAMEorLAPACK.USE_SHTNSSet toyesto use SHTns library for spherical harmonics transforms. The helper scriptinstall-shtns.shis available in thebindirectory to help installing SHTns.
3. MPI_INCPATH
Make sure you set the path for your mpi header file mpif.h in MPI_INCPATH. The path depends on the computer. For PCs, this is commonly /usr/include or /usr/include/mpi. Use Open MPI for running MagIC on a PC. For computing clusters, please look through the documentation of the respective cluster for their MPI implementation.
4. Other compilers
If your available compilers are different from the options provided in the Makefile, then change them suitably using the options COMP_FC and COMP_CC for serial fortran and C compilers and COMP_MPFC and COMP_MPCC for compilers with mpi implementation.


