@@ -10,54 +10,36 @@ USE_OPENMP = 1
10
10
endif
11
11
12
12
ifeq ($(CORE), POWER10)
13
- ifeq ($(USE_OPENMP), 1)
14
- COMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -DUSE_OPENMP -fno-fast-math -fopenmp
15
- FCOMMON_OPT += -O2 -frecursive -mcpu=power10 -mtune=power10 -DUSE_OPENMP -fno-fast-math -fopenmp
16
- else
17
13
COMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math
18
14
FCOMMON_OPT += -O2 -frecursive -mcpu=power10 -mtune=power10 -fno-fast-math
19
15
endif
20
- endif
21
16
22
17
ifeq ($(CORE), POWER9)
23
- ifeq ($(USE_OPENMP), 1)
24
18
ifneq ($(C_COMPILER), PGI)
25
- CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -DUSE_OPENMP -fno-fast-math -fopenmp
26
- else
27
- CCOMMON_OPT += -fast -Mvect=simd -Mcache_align -DUSE_OPENMP -mp
28
- endif
29
- ifneq ($(F_COMPILER), PGI)
30
- FCOMMON_OPT += -O2 -frecursive -mcpu=power9 -mtune=power9 -DUSE_OPENMP -fno-fast-math -fopenmp
19
+ CCOMMON_OPT += -Ofast -mvsx -fno-fast-math
20
+ ifneq ($(GCCVERSIONGT4), 1)
21
+ $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
22
+ CCOMMON_OPT += -mcpu=power8 -mtune=power8
31
23
else
32
- FCOMMON_OPT += -O2 -Mrecursive -DUSE_OPENMP -mp
24
+ CCOMMON_OPT += -mcpu=power9 -mtune=power9
33
25
endif
34
26
else
35
- ifneq ($(C_COMPILER), PGI)
36
- CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math
37
- else
38
27
CCOMMON_OPT += -fast -Mvect=simd -Mcache_align
39
28
endif
40
29
ifneq ($(F_COMPILER), PGI)
41
- FCOMMON_OPT += -O2 -frecursive -mcpu=power9 -mtune=power9 -fno-fast-math
30
+ FCOMMON_OPT += -O2 -frecursive -fno-fast-math
31
+ ifneq ($(GCCVERSIONGT4), 1)
32
+ $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
33
+ FCOMMON_OPT += -mcpu=power8 -mtune=power8
42
34
else
43
- FCOMMON_OPT += -O2 -Mrecursive
35
+ FCOMMON_OPT += -mcpu=power9 -mtune=power9
44
36
endif
37
+ else
38
+ FCOMMON_OPT += -O2 -Mrecursive
45
39
endif
46
40
endif
47
41
48
42
ifeq ($(CORE), POWER8)
49
- ifeq ($(USE_OPENMP), 1)
50
- ifneq ($(C_COMPILER), PGI)
51
- CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -DUSE_OPENMP -fno-fast-math -fopenmp
52
- else
53
- CCOMMON_OPT += -fast -Mvect=simd -Mcache_align -DUSE_OPENMP -mp
54
- endif
55
- ifneq ($(F_COMPILER), PGI)
56
- FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -DUSE_OPENMP -fno-fast-math -fopenmp
57
- else
58
- FCOMMON_OPT += -O2 -Mrecursive -DUSE_OPENMP -mp
59
- endif
60
- else
61
43
ifneq ($(C_COMPILER), PGI)
62
44
CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math
63
45
else
73
55
FCOMMON_OPT += -O2 -Mrecursive
74
56
endif
75
57
endif
58
+
59
+ ifeq ($(USE_OPENMP), 1)
60
+ ifneq ($(C_COMPILER), PGI)
61
+ CCOMMON_OPT += -DUSE_OPENMP -fopenmp
62
+ else
63
+ CCOMMON_OPT += -DUSE_OPENMP -mp
64
+ endif
65
+ ifneq ($(F_COMPILER), PGI)
66
+ FCOMMON_OPT += -DUSE_OPENMP -fopenmp
67
+ else
68
+ FCOMMON_OPT += -DUSE_OPENMP -mp
69
+ endif
76
70
endif
77
71
78
72
# workaround for C->FORTRAN ABI violation in LAPACKE
0 commit comments