Skip to content

Commit

Permalink
fixes to make.inc
Browse files Browse the repository at this point in the history
  • Loading branch information
mrachh committed Jun 3, 2024
1 parent 61323a4 commit 8ac88d2
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 8 deletions.
2 changes: 1 addition & 1 deletion make.inc.icc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CC=icc
CXX=icpc
FC=ifort
FFLAGS= -fPIC -O3 -march=native -funroll-loops -mkl
FFLAGS= -fPIC -O3 -march=native -funroll-loops -mkl -w
LIBS=-lm
CLIBS = -lm -ldl -lifcore

Expand Down
8 changes: 3 additions & 5 deletions make.inc.macos.gnu
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# makefile overrides
# OS: macOS
# Compiler: gfortran 9.X
# Compiler: gfortran X.X/Clang
# OpenMP: enabled
#

Expand All @@ -21,9 +21,7 @@ OMPLIBS = -lgomp

# MATLAB interface:
FDIR=$$(dirname `gfortran --print-file-name libgfortran.dylib`)
MFLAGS += -L${FDIR}
MEX = $(shell ls -d /Applications/MATLAB_R20**.app)/bin/mex
#LIBS = -lm -lstdc++.6
#MEXLIBS= -lm -lstdc++.6 -lgfortran -ldl
MFLAGS +=-L${FDIR}
MEX = $(shell ls -d /Applications/MATLAB_R* | sort | tail -1)/bin/mex


10 changes: 8 additions & 2 deletions make.inc.macos.intel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
CC=icc
CXX=icpc
FC=ifort
FFLAGS= -fPIC -O3 -march=native -funroll-loops -mkl

FFLAGS= -fPIC -O3 -march=native -funroll-loops -mkl -std=legacy -w
LIBS=
#CLIBS = -lm -ldl -lifcore
CLIBS = -lm -ldl
Expand All @@ -26,6 +27,11 @@ endif
# -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

OMPFLAGS = -qopenmp
OMPLIBS =
OMPLIBS = -qopenmp

# MATLAB interface:
FDIR=$$(dirname `gfortran --print-file-name libgfortran.dylib`)
MFLAGS +=-L${FDIR}
MEX = $(shell ls -d /Applications/MATLAB_R* | sort | tail -1)/bin/mex


30 changes: 30 additions & 0 deletions make.inc.macos.nag
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# make.inc for NAG Fortran compiler
# Online documentation: https://www.nag.com/nagware/np/r71_doc/manual/compiler_2_4.html#OPTIONS

FC=nagfor

# The path of libraries by NAG compiler
LIB_NAG = /usr/local/lib/NAG_Fortran

# Brief descriptions of specified options below:
# -PIC: produce position-independent code
# -O2: optimization at a normal level
# -Ounroll=2: the depth of loo-unrolling
# -f90_sign: use the Fortran 77/90 version of the SIGN intrinsic instead of the Fortran 95 one
# -dcfuns: enable recognition of non-standard double precision complex intrinsic functions.
# -dusty: allows the compilation and execution of legacy software.
# -w=x77: suppresses extension warnings for obsolete but common extensions to Fortran 77.
# -w=unreffed: suppresses warning messages about variables set but never referenced.
# -w=unused: suppresses warning messages about unused entities.
# -ieee=full: set the mode of IEEE arithmetic operation according to full mode.

# Main compile command for NAG Fortran compiler
FFLAGS = -PIC -O2 -Ounroll=1 -f90_sign -dcfuns -dusty -w=obs -w=x77 -w=unreffed -w=unused -ieee=full

# Flags overwritten in makefile
OMPFLAGS = -openmp
# OMPLIBS = -lf71omp64 -L$(LIB_NAG)
OMPLIBS = -lf71omp64 -lf71rts -L$(LIB_NAG)
LIBS = -lf71rts -L$(LIB_NAG)
CLIBS = -lm -ldl -L$(LIB_NAG)
FFLAGS_DYN = -PIC
33 changes: 33 additions & 0 deletions make.inc.macos_arm64.gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# makefile overrides
# OS: macOS
# Compiler: gfortran X.X/Clang
# OpenMP: enabled
#

CC=gcc
CXX=g++
FC=gfortran

FFLAGS= -fPIC -O3 -arch arm64 -std=legacy -w -mno-outline-atomics
FFLAGS_DYN= -shared -fPIC
CFLAGS= -fPIC -O3 -arch arm64 -std=c99
CXXFLAGS= -std=c++11 -DSCTL_PROFILE=-1 -fPIC -O3 -arch arm64


ifeq ($(PREFIX),)
FMM_INSTALL_DIR=/usr/local/lib
endif


CFLAGS += -I src

# OpenMP with gcc on OSX needs the following
OMPFLAGS = -fopenmp
OMPLIBS = -lgomp

# MATLAB interface:
FDIR=$$(dirname `gfortran --print-file-name libgfortran.dylib`)
MFLAGS +=-L${FDIR}
MEX = $(shell ls -d /Applications/MATLAB_R* | sort | tail -1)/bin/mex


0 comments on commit 8ac88d2

Please sign in to comment.