Last active
June 22, 2016 20:33
-
-
Save raphaeldussin/f80d99703ffd84e3c9bf4510a2137d8a to your computer and use it in GitHub Desktop.
installing ESMF library version 7.0.0 on OSX el Capitan with macports (gcc4.9, netcdf4, openmpi)
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
#!/bin/bash | |
# 1. as normal user,extract archive : | |
#tar -xf esmf_7_0_0_src.tar | |
# 2. change the file esmf/build_config/Darwin.gfortran.default/build_rules.mk | |
# OpenMPI -------------------------------------------------- | |
#ifeq ($(shell $(ESMF_DIR)/scripts/available mpifort),mpifort) | |
#ESMF_F90DEFAULT = mpifort | |
#ESMF_CXXLINKLIBS += -lmpi_mpifh | |
#else | |
#ESMF_F90DEFAULT = mpif90 | |
# this line below is the one we need to change | |
#ESMF_CXXLINKLIBS += $(shell mpif90 --showme:linking) | |
# 3. Run this script with sudo | |
cd esmf | |
export ESMF_COMM=openmpi | |
export ESMF_NETCDF=split | |
export ESMF_NETCDF_INCLUDE=/opt/local/include | |
export ESMF_NETCDF_LIBPATH=/opt/local/lib | |
export ESMF_NETCDF_LIBS=$(nf-config --flibs) | |
export ESMF_DIR=$( pwd ) | |
export ESMF_INSTALL_PREFIX=/opt/esm-soft/esmf/7.0.0 # or wherever you like | |
mkdir -p ${ESMF_INSTALL_PREFIX} | |
make | |
make install | |
# this will compile the python wrapper | |
cd src/addon/ESMPy | |
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py build --ESMFMKFILE=${ESMF_INSTALL_PREFIX}/lib/libO/Darwin.gfortran.64.openmpi.default/esmf.mk install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment