-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCompilers.mk
91 lines (82 loc) · 2.72 KB
/
Compilers.mk
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# This makefile fragment helps us to choose the appropriate
# compilers for the site where we are compiling.
# Notes On Specific Modules:
#
# SpectralAcceleration/p2utils:
# - attempts to use ifort/icc is available but will
# fall back to the configured MY_FC declared here
# V4-WrapC/src:
# - ensure it uses a fortran-77 compliant compiler (MY_FC77)
# - will generate errors with gfortran 4.2 or lower
# - may work with gfortran 4.3 and above since that supports
# -finit-local-zero option.
#
# Get the hostname we are running on
HOSTNAME = $(shell hostname -f)
ifeq (frontier,$(findstring frontier, $(HOSTNAME)))
MY_CC = cc
MY_FC = ftn
MY_MPICC = cc
MY_FC77 = ftn
MY_MPIFC = ftn
endif
ifeq (summit,$(findstring summit, $(HOSTNAME)))
MY_CC = gcc
MY_FC = gfortran
MY_MPICC = mpicc
MY_FC77 = gfortran
MY_MPIFC = mpif77
FLAG = 1
endif
# PSC BigBen (Cray XT3)
# Note: For this to work you need to have your environment set
# up with the gcc compilers, not the PG compilers. On
# BigBen you need to use these commands:
# module switch PrgEnv-pgi PrgEnv-gnu
# module unload acml/3.0
# module load gcc/4.0.2
ifeq (bigben,$(findstring bigben, $(HOSTNAME)))
MY_CC = cc
MY_FC = ftn
MY_MPICC = mpicc
MY_FC77 = ftn
MY_MPIFC = ftn
MY_CFLAGS =
MY_FFLAGS = -ffixed-line-length-132
endif
# NICS kraken (Cray XT5)
# Note: For this to work you need to have your environment set
# up with the gcc compilers, not the PG compilers. On
# Kraken you need to use these commands:
# module purge
# module load Base-opts
# module load PrgEnv-gnu
ifeq (kraken,$(findstring kraken, $(HOSTNAME)))
MY_CC = cc
MY_FC = ftn
MY_FC77 = ftn
MY_MPICC = cc
MY_MPIFC = ftn
MY_CFLAGS =
MY_FFLAGS = -ffixed-line-length-132
# Default (gcc)
# Note: For this to work you need to make sure that your
# environment is set up to use the version of mpicc
# and mpif77 that was configured to use the GNU
# compilers gcc and g77. You can accomplish this on
# most of the teragrid sites using SoftEnv. Try typing
# 'softenv' at the command prompt to get a list of
# available modules. Look for one that says '+mpich-*-gcc'
# or something similar to that. Of course, it is going
# to work best if the mpi you choose uses the interconnect
# supported by the site (infiniband, myrinet, etc.).
else
MY_CC = gcc
MY_FC = g77
MY_FC77 = g77
MY_MPICC = mpicc
MY_MPIFC = mpif77
MY_CFLAGS =
MY_FFLAGS = -ffixed-line-length-132
#MY_FFLAGS = -finit-local-zero -ffixed-line-length-132
endif