Skip to content

Commit 42af4fb

Browse files
committed
FEAT: gcc10 and mpi dont play well together
1 parent c816211 commit 42af4fb

File tree

2 files changed

+87
-2
lines changed

2 files changed

+87
-2
lines changed

share/build/Makefile.Darwin.gfortran10

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ SHELL=/bin/sh
1111
#
1212

1313
COMPILE.f77 = ${CUSTOMPATH_F}gfortran
14-
COMPILE.f90 = ${CUSTOMPATH_F}gfortran -fallow-argument-mismatch
14+
COMPILE.f90 = ${CUSTOMPATH_F}gfortran
1515
LINK.f90 = ${CUSTOMPATH_MPI}mpif90
1616
AR = ar -rs
1717

@@ -38,7 +38,7 @@ OPT2 = -O2
3838
OPT3 = -O3
3939
OPT4 = -O4
4040

41-
CFLAG = ${SEARCH} -c -w ${DEBUG}
41+
CFLAG = ${SEARCH} -c -w ${DEBUG} -fallow-argument-mismatch
4242

4343
Cflag0 = ${CFLAG} ${PRECISION} ${OPT0}
4444
Cflag1 = ${CFLAG} ${PRECISION} ${OPT1}

share/build/Makefile.Linux.gfortran10

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Copyright (C) 2002 Regents of the University of Michigan,
2+
# portions used with permission
3+
# For more information, see http://csem.engin.umich.edu/tools/swmf
4+
5+
SHELL=/bin/sh
6+
7+
# Fortran language related part of Makefile.conf: Makefile.Linux.gfortran
8+
#
9+
# Space Weather Modeling Framework (SWMF)
10+
# GNU gfortran (gfortran) Fortran 90/95 Compiler
11+
#
12+
13+
COMPILE.f77 = ${CUSTOMPATH_F}gfortran
14+
COMPILE.f90 = ${CUSTOMPATH_F}gfortran
15+
LINK.f90 = ${CUSTOMPATH_MPI}mpif90
16+
AR = ar -rs
17+
18+
SINGLEPREC = -frecord-marker=4
19+
DOUBLEPREC = -frecord-marker=4 -fdefault-real-8 -fdefault-double-8
20+
PRECISION = ${DOUBLEPREC} ${MEM}
21+
22+
MPILIB =
23+
#MPILIB = -L${LIBDIR} -lNOMPI
24+
25+
# Define where modules are stored and add it to the search path
26+
# INCL_EXTRA can be defined to add more search directories.
27+
SEARCH = -J${INCLDIR} ${INCL_EXTRA}
28+
29+
DEBUGFLAG = -C -g -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=all
30+
DEBUG =
31+
32+
OPT0 = -O0
33+
OPT1 = -O1
34+
OPT2 = -O2
35+
OPT3 = -O3
36+
OPT4 = -O4
37+
38+
CFLAG = ${SEARCH} -c -w ${DEBUG} -fallow-argument-mismatch
39+
40+
Cflag0 = ${CFLAG} ${PRECISION} ${OPT0}
41+
Cflag1 = ${CFLAG} ${PRECISION} ${OPT1}
42+
Cflag2 = ${CFLAG} ${PRECISION} ${OPT2}
43+
Cflag3 = ${CFLAG} ${PRECISION} ${OPT3}
44+
Cflag4 = ${CFLAG} ${PRECISION} ${OPT4}
45+
46+
# Some codes only compile with the "-save" and single precision.
47+
# To compile with double precision, add PRECISION flag
48+
CFLAGS = ${CFLAG} -fno-automatic
49+
50+
# Link with or without the MPI library
51+
Lflag1 = ${PRECISION} ${MPILIB} ${DEBUG}
52+
Lflag2 = ${PRECISION} ${DEBUG}
53+
54+
# BLAS and LAPACK libraries
55+
LBLAS =
56+
BLAS = lapack.o blas.o
57+
58+
59+
#
60+
# General rules
61+
#
62+
63+
.SUFFIXES:
64+
.SUFFIXES: .f90 .F90 .f .for .ftn .o
65+
66+
.f90.o:
67+
${COMPILE.f90} ${Cflag3} $<
68+
69+
.F90.o:
70+
${COMPILE.f90} -DsysLinux -DcompGFORTRAN ${Cflag3} $<
71+
72+
.f.o:
73+
${COMPILE.f77} ${Cflag3} -ffixed-line-length-132 $<
74+
75+
.for.o:
76+
${COMPILE.f77} ${Cflag3} -ffixed-line-length-132 $<
77+
78+
.ftn.o:
79+
${COMPILE.f77} ${Cflag3} -ffixed-line-length-132 $<
80+
81+
clean:
82+
rm -f *~ core *.o *.mod fort.* a.out *.exe *.a *.so *.protex
83+
84+
85+
# keep this line

0 commit comments

Comments
 (0)