File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,21 @@ ifeq "$(ifortErr)" "0"
15
15
F90C = ifort
16
16
# use this if mpif90 is trying to use gfortran: MPIF90C = mpif90 -f90=ifort
17
17
18
- FFLAGS = -mkl -openmp - O3 -no-prec-div -fpp
19
- DEBUGFLAGS = -mkl -openmp - g -check all -check noarg_temp_created -traceback -fpp -fpe0
18
+ FFLAGS = -mkl -O3 -no-prec-div -fpp
19
+ DEBUGFLAGS = -mkl -g -check all -check noarg_temp_created -traceback -fpp -fpe0
20
20
# add -fpe0 to check for floating point errors (think lowLike also throws these harmlessly)
21
21
MODOUT = -module $(OUTPUT_DIR )
22
22
LAPACKL =
23
23
24
+ ifortVer_major = $(shell ifort -v 2>&1 | cut -d " " -f 3 | cut -d. -f 1)
25
+ ifeq ($(shell test $(ifortVer_major ) -gt 15; echo $$? ) ,0)
26
+ FFLAGS+ = -qopenmp
27
+ DEBUGFLAGS+ = -qopenmp
28
+ else
29
+ FFLAGS+ = -openmp
30
+ DEBUGFLAGS+ = -openmp
31
+ endif
32
+
24
33
ifeq ($(STATIC ) ,YES)
25
34
# so you can re-distribute the binary to another machine
26
35
# static link details from https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor
@@ -36,8 +45,9 @@ MPIF90C = ftn
36
45
endif
37
46
38
47
else
39
- # gfortran 5.0 and earlier will not work (many F2003 bugs)
40
- # gfortran 6 trunk should work, and perhaps GCC 5.2 when available; see virtual machines for up-to-date environments
48
+ # gfortran 5.x and earlier will not work (many F2003 bugs)
49
+ # gfortran 6 should work (though currently still buggy for debug compile);
50
+ # see CosmoBox virtual machines for stable environments
41
51
F90C = gfortran
42
52
FFLAGS = -cpp -O3 -ffast-math -ffree-line-length-none -fopenmp -fmax-errors=4
43
53
DEBUGFLAGS = -cpp -g -fbounds-check -fbacktrace -ffree-line-length-none -fopenmp -fmax-errors=4 -ffpe-trap=invalid,overflow,zero
You can’t perform that action at this time.
0 commit comments