-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmake_ifort
75 lines (66 loc) · 2.75 KB
/
make_ifort
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Makefile for C2Ray_3D.
#
# Author: Garrelt Mellema
# This Makefile can make different versions of C2Ray_3D.
# These versions differ in their parallelization and/or
# in their connection to specific N-body results.
# It uses the intel compiler. Please use one of the other
# makefiles to compile with another compiler.
#
# Note 1: Parallelization
# The parallelization intended is specified in the name
# of the executable: _omp means OpenMP (shared memory),
# _mpi means MPI (distributed memory). Both can also be
# used at the same time (if your architecture supports
# it.
#
# Note 2: N-body module
# Different versions exist with different Nbody interfaces:
# pmfast - interface to older pmfast simulations
# cubep3m - interface to cubep3m simulations
# LG - interface to Local Group simulations (GADGET)
# Gadget - interface to LOFAR EoR GADGET simulations (not working)
#
# Note 3: Compiler & Flags
# The compiler is specified by the FC variable (MPIFC for the MPI
# compiler). We have only extensively used the Intel F90 compiler.
# Support for other compilers will have to be added.
# Parts of the code need to know about the compiler, this is
# done through preprocessor statements. So when compiling with
# intel compiler, -DIFORT needs to be specified. Support for
# new compilers thus needs to be added in the code too.
#
# Note 4: Recompiling
# Some dependencies are through module parameters, and thus
# not recognized by make. Best practise is to run "make clean"
# before running "make".
#-------------------------------------------------------
# Compiler
# Intel: best tested
FC = ifort # Intel compiler
MPIFC = mpif90 # MPI compiler
# F90 options (ifort)
#IFORTFLAGS = -DIFORT -O0 -g -u -fpe0 -p
IFORTFLAGS = -DIFORT -O3 -u -fpe0 -ipo -shared-intel #-check all -traceback
#IFORTFLAGS = -DIFORT -Ofast -fp-model fast=2 -u -fpe0 -ipo -shared-intel #-check all -traceback
#IFORTFLAGS = -DIFORT -Ofast -fp-model fast=2 -u -fpe0 #-check all -traceback
#IFORTFLAGS = -DIFORT -O3 -vec_report -u -fpe0 -ipo -mcmodel=medium -shared-intel #-check all -traceback
# Processor dependent optimization
#F90FLAGS1 = $(IFORTFLAGS)
#F90FLAGS1 = -xCORE-AVX2 $(IFORTFLAGS) # Beskow
#F90FLAGS1 = -xW $(IFORTFLAGS)
F90FLAGS1 = -xHost $(IFORTFLAGS)
#F90FLAGS1 = -xT $(IFORTFLAGS) # Laptop
#F90FLAGS1 = -xB $(IFORTFLAGS)
# These flags should be added to the F90FLAGS1 depending on the executable
# made. Specify this below on a per executable basis.
MPI_FLAGS = -DMPI #
#MPI_FLAGS = -DMPI -DMPILOG # Add more (MPI node) diagnostic output
OPENMP_FLAGS = -openmp -DMY_OPENMP # For Intel compiler
NO_OPENMP_FLAGS =
#-------------------------------------------------------
#LDR = $(F90)
LDFLAGS = $(F90FLAGS)
LIBS = #-lirc -limf
#-------------------------------------------------------
include makefile_core