Coast / Estuary

Coastal systems are among the most dynamic physical systems on earth and are subject to a large variety of forces. The morphodynamic changes occurring to coastlines worldwide are of great interest and importance. These changes occur as a result of the erosion of sediments, its subsequent transport as bed load or suspended load, and eventual deposition. 
 
Estuaries are partly enclosed water bodies that have an open connection to the coast. Estuaries generally have one or more branching channels, intertidal mudflats and/or salt marshes. Intertidal areas are of high ecological importance and trap sediments (sands, silts, clays and organic matter).
Within the Delft3D modelling package a large variation of coastal and estuarine physical and chemical processes can be simulated. These include waves, tidal propagation, wind- or wave-induced water level setup, flow induced by salinity or temperature gradients, sand and mud transport, water quality and changing bathymetry (morphology). Delft3D can also be used operationally e.g. storm, surge and algal bloom forecasting. 
 
On this discussion page you can post questions, research discussions or just share your experience about modelling coastal and/or estuarine systems with Delft3D FM. 
 

** PLEASE TAG YOUR POST! **

 

 

Sub groups
D-Flow Flexible Mesh
DELWAQ
Cohesive sediments & muddy systems

 


« Back to

Compiling on OS X with mpich

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Compiling on OS X with mpich
compiling on mac osx
Answer (Unmark)
3/17/17 9:06 AM
Dear All,

I have managed to compile on OS X Sierra (it also worked on Yosemite) the current head tag (6906). See the details below. The only problem seems to be swan. Could it be that it still relies on some lib32 code?

Compile tag/6906 for OS X Sierra with mpich

install Homebrew (https://brew.sh)

brew install coreutils
brew install autoconf
brew install automake
brew install gcc
brew install /homebrew/science/netcdf --with-fortran
brew install mpich
brew install ossp-uuid
brew install libtool

# make sure that 'libpng', 'libtiff' and 'jpeg' are not in 'brew list'. If so unlink them (brew unlink jpeg, etc.).

ln -s /usr/local/bin/glibtool /usr/local/Cellar/coreutils/8.26/libexec/gnubin/libtool
ln -s /usr/local/bin/glibtoolize /usr/local/Cellar/coreutils/8.26/libexec/gnubin/libtoolize

Note: Your version of coreutils might differ e.g. 8.XX. Correct appropriately.

edit src/build.sh

160,161c160,161
< addpath PATH /opt/gcc/bin
< addpath LD_LIBRARY_PATH /opt/gcc/lib /opt/gcc/lib64
---
> addpath PATH //usr/local/bin
> addpath LD_LIBRARY_PATH /usr/local/lib
255,257c255,257
< addpath PATH /opt/mpich2-1.4.1-gcc-4.6.2/bin
< export MPI_INCLUDE=/opt/mpich2-1.4.1-gcc-4.6.2/include
< export MPILIBS_ADDITIONAL="-L/opt/mpich2-1.4.1-gcc-4.6.2/lib -lfmpich -lmpich -lmpl"
---
> addpath PATH /usr/local/bin
> export MPI_INCLUDE=/usr/local/include
> export MPILIBS_ADDITIONAL="-L/usr/local/lib -lfmpich -lmpich -lmpl"
259c259
< export MPIFC=/opt/mpich2-1.4.1-gcc-4.6.2/bin/mpif90
---
> export MPIFC=/usr/local/bin/mpif90
292c292
< export NETCDFROOT=/p/delft3d/opt/netcdf-4.1.3mt/intel11.1
---
> export NETCDFROOT=/usr/local

export CC=gcc-6
export CXX=g++-6
export FC=gfortran-6
export F90=gfortran-6
export F77=gfortran-6

# prepend the gnu utilities on your PATH
export PATH=/usr/local/Cellar/coreutils/8.26/libexec/gnubin:/usr/local/bin:$PATH

export NETCDF_FORTRAN_LIBS=-L/usr/local/lib
export NETCDF_LIBS=-L/usr/local/lib
export NETCDF_FORTRAN_CFLAGS=-I/usr/local/include


edit src/utils_lgpl/io_netcdf/packages/io_netcdf/src/io_netcdf_api.F90 (see http://oss.deltares.nl/web/delft3d/coast-/-estuary/-/message_boards/view_message/1157287)

line 472:473 (before)
character(len=length), intent(in) :: string
integer, intent(in) :: length
(after)
integer, intent(in) :: length
character(len=length), intent(in) :: string

edit src/utils_lgpl/nefis/packages/nefis/include/c2c.h

35,38c35,38
< BInt4 nefis_errcnt;
< BInt4 nefis_errno;
< BChar error_text[LENGTH_ERROR_MESSAGE+1];
< BInt4 nefis_flush;
---
> BInt4 extern nefis_errcnt;
> BInt4 extern nefis_errno;
> BChar extern error_text[LENGTH_ERROR_MESSAGE+1];
> BInt4 extern nefis_flush;


edit src/utils_lgpl/nefis/packages/nefis/include/f2c.h

72,75c72,75
< BInt4 nefis_flush;
< BInt4 nefis_errcnt;
< BInt4 nefis_errno;
< BChar error_text[LENGTH_ERROR_MESSAGE+1];
---
> BInt4 extern nefis_flush;
> BInt4 extern nefis_errcnt;
> BInt4 extern nefis_errno;
> BChar extern error_text[LENGTH_ERROR_MESSAGE+1];


edit src/utils_lgpl/nefis/packages/nefis/src/gp.c (see http://www.linuxquestions.org/questions/programming-9/mac-os-x-defines-571819/)

70c70
< # define FILE_SEEK lseek64
---
> # define FILE_SEEK lseek

edit src/utils_lgpl/ods/packages/ods/src/jspost.c

60c60
< #include <malloc.h>
---
> #include <malloc/malloc.h>

# build

cd src
./build.sh -gnu -64bit


# make sure src/lib is in LD_LIBRARY_PATH. Best way is to edit run_flow2d3d.sh to add

libdir=<path_to_there>/src/lib

export LD_LIBRARY_PATH=$exedir:$libdir:$LD_LIBRARY_PATH
RE: Compiling on OS X with mpich
Answer (Unmark)
4/11/17 4:15 PMas a reply to George Breyiannis.
Hi George,

Good to hear it works.

SWAN is not compiled as part of Delft3D; only the Linux/Windows binaries are included. If you want to run it on a Mac OSX, you have to download the SWAN source code from the TU Delft site and compile it yourself.

To use SWAN via Delft3D-WAVE, you have to change one line in the source code of SWAN to lower the error message level:

on line 2861 in swanpre2.ftn change
CALL MSGERR(2,
into
CALL MSGERR(1,

i.e.

@@ -2859,8 +2859,11 @@
ELSE
! boundary condition on one side of the computational grid
IF (OPTG.EQ.3)
THEN 40.80 40.31
- CALL
MSGERR(2, 40.80 40.31
+ CALL
MSGERR(1, 40.80 40.31
& ' keyword SIDE should not be used for curvilinear
grid') 40.80 40.31
END
IF 40.31
CALL IGNORE ('SIDE')
! *** specification of side for which boundary ***

Regards,

Adri
RE: Compiling on OS X with mpich
Answer (Unmark)
6/2/17 9:26 PMas a reply to George Breyiannis.
Dear All,

I am new on using DELFT 3D and I am a Mac user.

I am having troubles installing on MacOS Sierra (10.12.5). I have installed all components and libraries as explained before in this post, but I have installed from source code.

The reason that I am doing this is because I have Intel Fortran Compiler 17. I would like to use it to run the model.

I did all the steps mentioned above but when I run build.sh, it has been returning an error in the makefile process.

Please find below the build.sh log file. Could ypu help me solving this?

Thank you so much,

Bernardo Oliveira

###############################################
build.sh
###############################################
#! /bin/bash

#-------------------------------------------------------------------------------
# Top-Level Build Script for Delft3D Open Source Code
#
# There are command-line options to select Fortran compiler and debug or not.
#
# adri.mourits@deltares.nl
# 02 Sep 2016
#
# Copyright (C) Stichting Deltares, 2011-2013.
#-------------------------------------------------------------------------------
#
# WARNINGS WARNINGS WARNINGS WARNINGS WARNINGS WARNINGS WARNINGS WARNINGS
#
# This script contains references to Deltares specific systems.
# Use this script as an example and modify it to fit to your system.
# See file README for compiling without using this script.
#
# This script does not work on Mac
#
#-------------------------------------------------------------------------------

# This script must be executed in the directory where it resides
orgdir=`pwd`
scriptdirname=`readlink \-f \$0`
maindir=`dirname $scriptdirname`
cd $maindir


# Default values
compiler=''
configureArgs=''
debug=0
noMake=0
platform='ia32'
useSp=0

#-------------------------------------------------------------------------------
function usage {
echo "Usage: `basename $0` <compiler> [-debug] [-make] [-64bit] [-sp] [-configure <args>] [-?]"
echo "Compiler is one of:"
echo " -gnu"
echo " -intel10"
echo " -intel11.0 (-intel11)"
echo " -intel11.1"
echo " -intel12"
echo " -intel17 (-intel17.2.046)"
}


#-------------------------------------------------------------------------------
# Add date time to logging info
function log {
echo "`date +%Y%m%d.%H%M%S` :: $*"
}



#-------------------------------------------------------------------------------
# Add a directory to an environment parameter
function addpath {
path="$1"
shift

for dir in $*; do
if [ -d $dir ]; then
eval "export $path=\"$dir:\$$path\""
fi
done
}


#-------------------------------------------------------------------------------
# Identify which program is used
function witch {
w=`which $1`
(
cd `dirname $w`
/bin/pwd
)
}


#===============================================================================
# Process command-line arguments

while [ $# -gt 0 ]; do
case $1 in
-64bit)
platform='intel64'
;;
-c|-configure)
shift
configureArgs="$1"
;;
-d|-debug)
debug=1
;;
-gnu)
compiler='gnu'
;;
-intel10)
compiler='intel10'
;;
-intel11.0|-intel11)
compiler='intel11.0'
;;
-intel11.1)
compiler='intel11.1'
;;
-intel12)
compiler='intel12'
;;
-intel17|-intel17.2.046)
compiler='intel17'
;;
-m|-make)
noMake=1
;;
-sp)
useSp=1
;;
-?)
usage
cd $orgdir
exit 0
;;
*)
usage
cd $orgdir
exit 1
;;
esac
shift
done

if [ "$compiler" == '' ]; then
echo "You must specify a compiler"
usage
cd $orgdir
exit 1
fi

mkdir -p logs

if [ "$BASH_ENV" != '' ]; then
echo 'Warning: Unsetting BASH_ENV'
unset BASH_ENV
fi


#===============================================================================
# Initialize Fortran compiler

case $compiler in
gnu)
ifortInit=""
iccInit=""
addpath PATH /usr/local/bin
addpath LD_LIBRARY_PATH /usr/local/lib
echo "Using GNU compilers in `witch gfortran`"
;;

intel17)
ifortInit=". /opt/intel/compilers_and_libraries_2017.2.163/mac/bin/compilervars.sh $platform"
iccInit=""
echo "Using Intel 17.2.046 Fortran ($platform) compiler"
;;

intel12)
ifortInit=". /opt/intel/bin/ifortvars.sh $platform"
iccInit=""
echo "Using Intel 12 Fortran ($platform) compiler"
;;

intel11.1)
if [ "$platform" == 'intel64' ]; then
if [ -d /opt/intel/Compiler/11.1/072/bin/intel64 ]; then
ifortInit=". /opt/intel/Compiler/11.1/072/bin/intel64/ifortvars_intel64.sh $platform"
iccInit=""
idbInit=". /opt/intel/Compiler/11.1/072/bin/intel64/idbvars.sh"
echo "Using Intel 11.1 Fortran ($platform) compiler"
fi
else
if [ -d /opt/intel/Compiler/11.1/072 ]; then
ifortInit=". /opt/intel/Compiler/11.1/072/bin/ifortvars.sh $platform"
iccInit=""
idbInit=". /opt/intel/Compiler/11.1/072/bin/$platform/idbvars.sh"
echo "Using Intel 11.1 Fortran ($platform) compiler"
fi
fi
;;

intel11.0)
if [ -d /opt/intel/Compiler/11.0/081 ]; then
ifortInit=". /opt/intel/Compiler/11.0/081/bin/ifortvars.sh $platform"
idbInit=". /opt/intel/Compiler/11.0/081/bin/$platform/idbvars.sh"
echo "Using Intel 11.0 Fortran ($platform) compiler"
iccInit=". /opt/intel/Compiler/11.0/081/bin/iccvars.sh $platform"
echo "Using Intel 11.0 C ($platform) compiler"
fi
;;

intel10)
ifortInit='. /opt/intel/fc/10/bin/ifortvars.sh'
iccInit=""
idbInit='. /opt/intel/idb/10/bin/idbvars.sh'
echo "Using Intel 10 Fortran compiler (DEPRECATED!)"
;;

*)
ifortInit='/bin/true'
echo "Using default Linux Fortran compiler"
iccInit=""
;;
esac

if [ "$ifortInit" != '' ]; then
eval $ifortInit
if [ $? -ne 0 ]; then
echo 'Initialization of the Fortran compiler fails!'
cd $orgdir
exit 1
fi
fi

if [ "$iccInit" != '' ]; then
eval $iccInit
if [ $? -ne 0 ]; then
echo 'Initialization of the C compiler fails!'
cd $orgdir
exit 1
fi
fi


#===============================================================================
# Use the correct Autotools

# When the autotools are not installed in the default location,
# point to them explicitly
addpath PATH \
/opt/automake/bin \
/opt/autoconf/bin \
/opt/libtool/bin


#===============================================================================
# Additional library settings

#---------------------
# mpich2
if [ "$compiler" = 'gnu' ]; then
addpath PATH /usr/local/bin
export MPI_INCLUDE=/usr/local/include
export MPILIBS_ADDITIONAL="-L/usr/local/lib -lfmpich -lmpich -lmpl"
# export MPILIBS_ADDITIONAL=" "
export MPIFC=/usr/local/bin/mpif90
else
# Intel compilers
addpath PATH /opt/mpich2-1.0.8-intel64/bin
export MPI_INCLUDE=/opt/mpich2-1.0.8-intel64-PIC/include
export MPILIBS_ADDITIONAL="-L/opt/mpich2-1.0.8-intel64-PIC/lib -lfmpich -lmpich"
if [ "$platform" = 'intel64' ]; then
export MPIFC=/opt/mpich2-1.0.8-intel64-PIC/bin/mpif90
fi
fi


#---------------------
# Additional compile flags
if [ "$compiler" = 'gnu' ]; then
fflags=''
else
# Intel compilers
fflags='-threads'
fi


#---------------------
# Additional link flags/libraries
if [ "$compiler" = 'gnu' ]; then
export LDFLAGSMT_ADDITIONAL=" "
else
# Intel compilers
export LDFLAGSMT_ADDITIONAL="-lifcoremt"
fi

#---------------------
# netcdf
export NETCDFROOT=/usr/local
export PKG_CONFIG_PATH=$NETCDFROOT/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NETCDFROOT/lib

#===============================================================================
echo "Current settings:"
echo "export ACLOCAL=\"$ACLOCAL\""
echo "export AUTOMAKE=\"$AUTOMAKE\""
echo "export AUTOHEADER=\"$AUTOHEADER\""
echo "export AUTOCONF=\"$AUTOCONF\""
echo "export AUTORECONF_FLAGS=\"$AUTORECONF_FLAGS\""
echo "export LIBTOOLIZE=\"$LIBTOOLIZE\""
echo "export LDFLAGS=\"$LDFLAGS\""
echo "export LDFLAGSMT_ADDITIONAL=\"$LDFLAGSMT_ADDITIONAL\""
echo "export LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\""
echo "export MPIFC=\"$MPIFC\""
echo "export MPI_INCLUDE=\"$MPI_INCLUDE\""
echo "export MPILIBS_ADDITIONAL=\"$MPILIBS_ADDITIONAL\""
echo "export PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\""
echo "export PATH=\"$PATH\""
echo


#===============================================================================
# Single precision executables require preparation before hand

if [ $useSp -eq 1 ]; then
(
cd utils_lgpl/deltares_common
command='scripts/changeprecision.tcl single'
log "Executing \"$command\" in \"$PWD\" for single-precision executables"
eval $command
if [ $? -ne 0 ]; then
log 'ABORT: Single-precision script failed'
cd $orgdir
exit 1
fi
)
fi


#===============================================================================
# autogen: sanity checks, libtoolize and autoreconf

log='logs/autogen.log'
command="./autogen.sh --verbose &> $log"

log "Running $command"
eval $command

if [ $? -ne 0 ]; then
log "Autogen fails!"
cd $orgdir
exit 1
fi


#===============================================================================
# configure: Create makefiles

log='logs/configure.log'

if [ $debug -eq 1 ]; then
flags='-g -O0'
else
flags='-O2'
fi

# fPIC is the result of the mixing of static and libtool libraries.
# If you want to avoid this you can use convenience libraries.
# Don't do this for non AMD64 because it will lead to worse performance.
# More information here:
# http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?full=1#book_part1_chap3

command=" \
CFLAGS='$flags $CFLAGS' \
CXXFLAGS='$flags $CXXFLAGS' \
AM_FFLAGS='$LDFLAGSMT_ADDITIONAL $AM_FFLAGS' \
FFLAGS='$flags $fflags $FFLAGS' \
AM_FCFLAGS='$LDFLAGSMT_ADDITIONAL $AM_FCFLAGS' \
FCFLAGS='$flags $fflags $FCFLAGS' \
AM_LDFLAGS='$LDFLAGSMT_ADDITIONAL $AM_LDFLAGS' \
./configure --prefix=`pwd` $configureArgs &> $log \
"

log "Running `echo $command | sed 's/ +/ /g'`"
eval $command

if [ $? -ne 0 ]; then
log "Configure fails!"
cd $orgdir
exit 1
fi


#===============================================================================
# make: Build and install everything

if [ $noMake -eq 1 ]; then
log "Skipping make; execute the following command before doing manual makes:"
echo $ifortInit
cd $orgdir
exit 0
fi

log='logs/make.log'
command="make ds-install &> $log"

log "Running $command"
eval $command

if [ $? -ne 0 ]; then
log "Make fails!"
cd $orgdir
exit 1
fi

log "Build finished"
cd $orgdir
exit 0
###############################################################
make.log
###############################################################
Making install in third_party_open
make[1]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open'
Making install in version_number
make[2]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number'
Making install in packages
make[3]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages'
Making install in version_number
make[4]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number'
Making install in src
make[5]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number/src'
Makefile:808: warning: overriding recipe for target 'clean-local'
Makefile:803: warning: ignoring old recipe for target 'clean-local'
make install-am
make[6]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number/src'
Makefile:808: warning: overriding recipe for target 'clean-local'
Makefile:803: warning: ignoring old recipe for target 'clean-local'
/usr/local/bin/install -c -d ../../../../../third_party_open/version_number/bin/linux
/usr/local/bin/install -c ../../../../../third_party_open/version_number/packages/version_number/src/version_number.exe ../../../../../third_party_open/version_number/bin/linux
make[7]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number/src'
Makefile:808: warning: overriding recipe for target 'clean-local'
Makefile:803: warning: ignoring old recipe for target 'clean-local'
make[7]: Nothing to be done for 'install-exec-am'.
/usr/local/bin/mkdir -p '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number/src/bin'
/bin/sh ../../../../../libtool --mode=install /usr/local/bin/install -c version_number.exe '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number/src/bin'
libtool: install: /usr/local/bin/install -c version_number.exe /Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number/src/bin/version_number.exe
make[7]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number/src'
make[6]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number/src'
make[5]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number/src'
make[5]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number'
make[6]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number'
make[5]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number'
make[4]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages/version_number'
make[4]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages'
make[5]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages'
make[4]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages'
make[3]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number/packages'
make[3]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number'
make[4]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number'
make[3]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number'
make[2]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open/version_number'
make[2]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open'
make[3]: Entering directory '/Users/Bernardo/delft3d_repository/src/third_party_open'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open'
make[2]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open'
make[1]: Leaving directory '/Users/Bernardo/delft3d_repository/src/third_party_open'
Making install in utils_lgpl
make[1]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl'
Making install in deltares_common
make[2]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common'
Making install in packages
make[3]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages'
Making install in deltares_common_c
make[4]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c'
Making install in include
make[5]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c/include'
make[6]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c/include'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c/include'
make[5]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c/include'
Making install in src
make[5]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c/src'
make[6]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c/src'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c/src'
make[5]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c/src'
make[5]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c'
make[6]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c'
make[5]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c'
make[4]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common_c'
Making install in deltares_common
make[4]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common'
Making install in src
make[5]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common/src'
rm -rf ./deltares_common_version.F90
../../../../../scripts_lgpl/linux/update_version.sh ./deltares_common_version.F90 . ../include/version_number.ini ../../../../..
Generating version number in the ./deltares_common_version.F90
Done, new version number is: 7012
make install-recursive
make[6]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common/src'
Making install in rd_token
make[7]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common/src/rd_token'
make[8]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common/src/rd_token'
make[8]: Nothing to be done for 'install-exec-am'.
make[8]: Nothing to be done for 'install-data-am'.
make[8]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common/src/rd_token'
make[7]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common/src/rd_token'
make[7]: Entering directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common/src'
rm -rf ./deltares_common_version.F90
../../../../../scripts_lgpl/linux/update_version.sh ./deltares_common_version.F90 . ../include/version_number.ini ../../../../..
Generating version number in the ./deltares_common_version.F90
Done, new version number is: 7012
/bin/sh ../../../../../libtool --tag=FC --mode=compile /opt/mpich2-1.0.8-intel64-PIC/bin/mpif90 -DHAVE_CONFIG_H -I. -I../../../../.. -DWITH_DELFTONLINE -O2 -threads -fpp -recursive -reentrancy threaded -traceback -c -o deltares_common_version.lo deltares_common_version.F90
libtool: compile: /opt/mpich2-1.0.8-intel64-PIC/bin/mpif90 -DHAVE_CONFIG_H -I. -I../../../../.. -DWITH_DELFTONLINE -O2 -threads -fpp -recursive -reentrancy threaded -traceback -c deltares_common_version.F90 -fno-common -o .libs/deltares_common_version.o
../../../../../libtool: line 1760: /opt/mpich2-1.0.8-intel64-PIC/bin/mpif90: No such file or directory
make[7]: *** [Makefile:634: deltares_common_version.lo] Error 1
make[7]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common/src'
make[6]: *** [Makefile:658: install-recursive] Error 1
make[6]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common/src'
make[5]: *** [Makefile:815: install] Error 2
make[5]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common/src'
make[4]: *** [Makefile:488: install-recursive] Error 1
make[4]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages/deltares_common'
make[3]: *** [Makefile:490: install-recursive] Error 1
make[3]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common/packages'
make[2]: *** [Makefile:488: install-recursive] Error 1
make[2]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl/deltares_common'
make[1]: *** [Makefile:498: install-recursive] Error 1
make[1]: Leaving directory '/Users/Bernardo/delft3d_repository/src/utils_lgpl'
make: *** [Makefile:548: install-recursive] Error 1
RE: Compiling on OS X with mpich
Answer (Unmark)
6/26/17 9:32 AMas a reply to Bernardo Oliveira.
Dear Bernardo, it seems that libtool doesn't see your MPIFC path. Try adding it to the path and see what happens. Also it might make a difference if you are using the inherent OS X libtool or the brew installed glibtool as described above. I would suggest that you follow that part of the how-to and use the gnu utils to compile. The fact that you have your own intel compiled mpi and netcdf should make no difference.

Good luck,

George
RE: Compiling on OS X with mpich
Answer (Unmark)
7/29/17 12:13 PMas a reply to Adri Mourits.
Hi Adri,

I finally managed to find time to test it. Thanks for the tip. It worked. The macros.inc used is

##############################################################################
# MAC_GFORTRAN: MAC OS X Apple with GFORTRAN Compiler.
##############################################################################
F90_SER = mpif90
F90_OMP = mpif90
F90_MPI = mpif90
FLAGS_OPT = -O3
FLAGS_MSC = -w -ffixed-form
FLAGS90_MSC = -w -ffree-form -ffree-line-length-none
FLAGS_DYN =
FLAGS_SER =
FLAGS_OMP =
FLAGS_MPI =
NETCDFROOT = /usr/local
ifneq ($(NETCDFROOT),)
INCS_SER = -I$(NETCDFROOT)/include
INCS_OMP = -I$(NETCDFROOT)/include
INCS_MPI = -I$(NETCDFROOT)/include
LIBS_SER = -L$(NETCDFROOT)/lib -lnetcdf -lnetcdff
LIBS_OMP = -L$(NETCDFROOT)/lib -lnetcdf -lnetcdff
LIBS_MPI = -L$(NETCDFROOT)/lib -lnetcdf -lnetcdff
NCF_OBJS = nctablemd.o agioncmd.o swn_outnc.o
else
INCS_SER =
INCS_OMP =
INCS_MPI =
LIBS_SER =
LIBS_OMP =
LIBS_MPI =
NCF_OBJS =
endif
O_DIR =
OUT = -o
EXTO = o
MAKE = make
RM = rm -f
ifneq ($(NETCDFROOT),)
swch = -unix -netcdf
else
swch = -unix
endif



It worked for swan 41.10 and 'make mpi' option.

After that just use a symlink of the swan.exe to the corresponding swan folder in DELFT3D.

ln -s where_you_comiled_swan/swan.exe where_delft3d_is/bin/lnx64/swan/bin/swan_4072ABCDE_del_l64_i11_mpi.exe

Cheers