-
Notifications
You must be signed in to change notification settings - Fork 5
/
make_ftn
69 lines (60 loc) · 2.3 KB
/
make_ftn
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
# 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 Cray compiler setup. 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
# Cray:
FC = ftn # Cray compiler
MPIFC = ftn # Cray compiler
# F90 options (ifort)
CRAYFLAGS = -DCRAY
#CRAYFLAGS = -eD -DCRAY -DMPILOG
#-O3 -hfp3 -rm -DCRAY #-check all -traceback
# Processor dependent optimization
F90FLAGS1 = $(CRAYFLAGS)
# These flags should be added to the F90FLAGS1 depending on the executable
# made. Specify this below on a per executable basis.
MPI_FLAGS = -DMPI # For the code
#MPI_FLAGS = -DMPI -DMPILOG # Add more (MPI node) diagnostic output
OPENMP_FLAGS = -homp -DMY_OPENMP # For the code
NO_OPENMP_FLAGS = -h noomp #-Othread0
#-------------------------------------------------------
#Loader
#LDR = $(F90)
LDFLAGS = $(F90FLAGS)
LIBS = #-lirc -limf
#-------------------------------------------------------
include makefile_core