-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added config files adapted to Brew libraries for MacOS (#432)
Co-authored-by: Antonello Zito <[email protected]>
- Loading branch information
1 parent
6fb223e
commit b6cbb86
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#--------------------------------------------------- | ||
# OSX,gfortran+openmpi from Homebrew | ||
# | ||
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
# brew install gcc open-mpi netcdf netcdf-fortran fftw | ||
#--------------------------------------------------- | ||
|
||
IDENTITY="OSX gfortran+openmpi from Homebrew" | ||
|
||
MAKE = make | ||
|
||
MF90 = mpif90 | ||
|
||
# Compilers and flags | ||
|
||
FC = ${MF90} -std=f2008 -fall-intrinsics -I$(FFTW_INC) -I$(GACODE_ROOT)/modules -J$(GACODE_ROOT)/modules -I/opt/local/include -fPIC | ||
F77 = ${MF90} -w -fallow-argument-mismatch | ||
|
||
FOMP = -fopenmp | ||
FMATH = -fdefault-real-8 -fdefault-double-8 | ||
FOPT = -O3 -m64 -framework Accelerate | ||
FDEBUG = -Wall -g -fcheck=all -fbacktrace -fbounds-check -O0 -Wextra -finit-real=nan -Wunderflow -ffpe-trap=invalid,zero,overflow | ||
#F2PY = f2py-2.7 | ||
|
||
# System libraries | ||
|
||
LMATH = -L$(BREW_LIB) -lfftw3 | ||
NETCDF = -L$(BREW_LIB) -lnetcdff -lnetcdf | ||
|
||
# Archive | ||
|
||
ARCH = ar cr | ||
|
||
ifdef FANN_ROOT | ||
# neural net libraries | ||
NN_LIB=-L$(GACODE_ROOT)/../neural/ -I$(GACODE_ROOT)/../neural/ -lbrainfuse -lfann | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
export BREW_LIB=$(brew --prefix)/lib | ||
export LD_LIBRARY_PATH=$(brew --prefix)/lib:$LD_LIBRARY_PATH | ||
export FFTW_INC=$(brew --prefix fftw)/include | ||
export NETCDF_INC=$(brew --prefix netcdf)/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
# GACODE Parallel execution script (GFORTRAN_OSX_MACPORTS) | ||
# | ||
# NOTES: | ||
# Used mpich2-1.0.3, so use mpirun rather than mpiexec | ||
|
||
simdir=${1} | ||
nmpi=${2} | ||
exec=${3} | ||
nomp=${4} | ||
numa=${5} | ||
mpinuma=${6} | ||
|
||
echo $simdir | ||
|
||
cd $simdir | ||
export OMP_NUM_THREADS=$nomp ; mpiexec --oversubscribe -np $nmpi $exec |