Dismo - Biomod - dflowfm -

Dismo and Biomod

Required by Willow Hallgren for climate Species Distribution Modeling and Projection experiments and the versions required are :
Dismo 0.9-3
Biomod 2_3.1-25
R 3.02

https://r-forge.r-project.org/projects/biomod/
http://cran.r-project.org/web/packages/dismo/index.html

Download from :
http://cran.univ-lyon1.fr/src/contrib/biomod2_3.1-25.tar.gz
http://cran.univ-lyon1.fr/src/contrib/dismo_0.9-3.tar.gz

dismo requires :
http://cran.univ-lyon1.fr/src/contrib/sp_1.0-14.tar.gz
http://cran.univ-lyon1.fr/src/contrib/raster_2.2-31.tar.gz

R installation :
./configure --prefix=/sw/R/3.0.2 --with-blas="-L/sw/ATLAS/3.9.39/lib -lptf77blas -lpthread -latlas" --enable-R-shlib --enable-BLAS-shlib
make
make install

module load R/3.0.2
run R
under R prompt run
>install.packages("biomod2")

dismo
R CMD INSTALL dismo_0.9-3.tar.gz
* installing to library ‘/sw/R/3.0.2/lib64/R/library’
* installing *source* package ‘dismo’ ...
** package ‘dismo’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/sw/R/3.0.2/lib64/R/include -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c percRank.c -o perc
Rank.o
gcc -std=gnu99 -shared -L/sw/ATLAS/3.9.39/lib -o dismo.so percRank.o -L/sw/R/3.0.2/lib64/R/lib -lR
installing to /sw/R/3.0.2/lib64/R/library/dismo/libs
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (dismo)

To check :
[s481760@gowonda ~]$ module load R/3.0.2
[s481760@gowonda ~]$ R
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(dismo)
Loading required package: raster
Loading required package: sp
> library(biomod2)
Loading required package: parallel
biomod2 3.1-25 loaded.

Type browseVignettes(package='biomod2') to access directly biomod2 vignettes.

Attaching package: ‘biomod2’

The following object is masked from ‘package:dismo’:

    evaluate

>

dflowfm

download source dflowfm-1.1.93.33213.tar from http://publicwiki.deltares.nl/display/DFLOWFM/Download

install instructions are at http://publicwiki.deltares.nl/display/DFLOWFM/Building+on+Linux

Prerequisites :

1.  NetCDF with fortran interface
module load ics/2013
./configure --prefix=/sw/NetCDF/4.2.1/ics2013 --disable-netcdf-4 --disable-doxygen --disable-dap CC=icc FC=ifort F77=ifort
make
make install

fortran interface
./configure --prefix=/sw/NetCDF/4.2.1/ics2013  CC=icc FC=ifort F77=ifort  CPPFLAGS=-I/sw/NetCDF/4.2.1/ics2013/include LDFLAGS=-L/sw/NetCDF/4.2.1/ics2013/lib LD_LIBRARY_PATH=/sw/NetCDF/4.2.1/ics2013/lib:$LD_LIBRARY_PATH
make
make install

2.  petsc 3.4.3
module load ics/2013
./configure --with-mpi-dir=/sw/ics/2013.0.028/impi/4.1.0.024/intel64 --download-f-blas-lapack --with-shared-libraries=1 --FOPTFLAGS="-xHOST -O3 -no-prec-div" --COPTFLAGS="-O3" --prefix=/sw/petsc/3.4.3-intel
make
make install

3.  metis 5.1.0
module load ics/2013
module load cmake/2.8.12.1
make config prefix=/sw/metis/5.1.0
make
make install

dflowfm

module load NetCDF/4.2.1-ics  petsc/3.4.3-intel   ics/2013    metis/5.1.0
FCFLAGS=-O3 FC=mpif90 F77=mpif90 CC=mpicc CXX=mpicxx NETCDF_FORTRAN_CFLAGS=-I/sw/NetCDF/4.2.1/ics2013/include NETCDF_FORTRAN_LIBS="-L/sw/NetCDF/4.2.1/ics2013/lib -lnetcdf -lnetcdff" \  PKG_CONFIG_PATH=/sw/NetCDF/4.2.1/ics2013/lib/pkgconfig ./configure --prefix=/sw/dflowfm/1.1.93-intel --with-mpi --with-petsc=/sw/petsc/3.4.3-intel
make
needs a newer version of autoconf and libtool, installed autoconf 2.68 and libtool 2.4.2
./configure --prefix=/sw/autoconf/2.68; make ; make install

module load autoconf/2.68
module load library/libtool/2.4.2
run configure and make again,
ec_support.f90:414.19:
         use netcdf
Fatal Error: File 'netcdf.mod' opened at (1) is not a GFORTRAN module file

Installed netcdf 4.3.1.1 and tried again not work, also tried to use gcc build netcdf but no luck.
Build netcdf 4.3.1.1 with intel compiler and mpi
./configure --prefix=/sw/NetCDF/4.3.1.1/ics2013 --disable-netcdf-4 --disable-doxygen --disable-dap CC=icc FC=ifort F77=ifort
./configure --prefix=/sw/NetCDF/4.3.1.1/ics2013  CC=icc FC=ifort F77=ifort  CPPFLAGS=-I/sw/NetCDF/4.3.1.1/ics2013/include LDFLAGS=-L/sw/NetCDF/4.3.1.1/ics2013/lib LD_LIBRARY_PATH=/sw/NetCDF/4.3.1.1/ics2013/lib:$LD_LIBRARY_PATH

Build netcdf with gcc and gfortran
./configure --prefix=/sw/NetCDF/4.2.1/gcc --disable-netcdf-4 --disable-doxygen --disable-dap CC=gcc FC=gfortran F77=gfortran
./configure --prefix=/sw/NetCDF/4.2.1/gcc  CC=gcc FC=gfortran F77=gfortran  CPPFLAGS=-I/sw/NetCDF/4.2.1/gcc/include LDFLAGS=-L/sw/NetCDF/4.2.1/gcc/lib LD_LIBRARY_PATH=/sw/NetCDF/4.2.1/gcc/lib:$LD_LIBRARY_PATH

Now try to build with gcc:

Install mpich2 mpi/mpich2/3.1-gnu
./configure --prefix=/sw/mpi/mpich2/3.1-gnu; make ; make install

Build petsc with gcc and mpich2
module load mpi/mpich2/3.1-gnu
./configure --with-mpi-dir=/sw/mpi/mpich2/3.1-gnu --download-f-blas-lapack --with-shared-libraries=1 --FOPTFLAGS="-xHOST -O3 -no-prec-div" --COPTFLAGS="-O3" --prefix=/sw/petsc/3.4.3-gcc

Build metis with gcc
make config prefix=/sw/metis/5.1.0-gcc

Now build dflowfm:
module load NetCDF/4.2.1-gcc
module load mpi/mpich2/3.1-gnu
module load petsc/3.4.3-gcc
module load autoconf/2.68
module load library/libtool/2.4.2

FCFLAGS=-O3 FC=mpif90 F77=mpif90 CC=mpicc CXX=mpicxx NETCDF_FORTRAN_CFLAGS=-I/sw/NetCDF/4.2.1/gcc/include NETCDF_FORTRAN_LIBS="-L/sw/NetCDF/4.2.1/gcc/lib -lnetcdf -lnetcdff" PKG_CONFIG_PATH=/sw/NetCDF/4.2.1/gcc/lib/pkgconfig \
./configure --prefix=/sw/dflowfm/1.1.93-gcc --with-mpi --with-petsc=/sw/petsc/3.4.3-gcc
make
make install
module file is dflowfm/1.1.93-gcc

Build with metis
module load NetCDF/4.2.1-gcc
module load mpi/mpich2/3.1-gnu
module load petsc/3.4.3-gcc
module load metis/5.1.0-gcc
module load autoconf/2.68
module load library/libtool/2.4.2
FCFLAGS=-O3 FC=mpif90 F77=mpif90 CC=mpicc CXX=mpicxx NETCDF_FORTRAN_CFLAGS=-I/sw/NetCDF/4.2.1/gcc/include NETCDF_FORTRAN_LIBS="-L/sw/NetCDF/4.2.1/gcc/lib -lnetcdf -lnetcdff" PKG_CONFIG_PATH=/sw/NetCDF/4.2.1/gcc/lib/pkgconfig \ ./configure --prefix=/sw/dflowfm/1.1.93-gcc-metis --with-mpi --with-petsc=/sw/petsc/3.4.3-gcc --with-metis=/sw/metis/5.1.0-gcc
make
make install
module file is dflowfm/1.1.93-gcc-metis