Forum_general

General

At this page you can post questions or start discussions on general topics related to Delft3D Flexible Mesh.

Please select a proper category below (if possible), to post your message or reply to an existing post. Please add tags to your posts to simplify searching.

 

** PLEASE TAG YOUR POST! **

 

 

 

 


Message Boards

How to set `bin path` and `lib path` for `DFlow FM' LINUX

Santosa Putra, modified 6 Years ago.

How to set `bin path` and `lib path` for `DFlow FM' LINUX

Youngling Posts: 0 Join Date: 9/16/13 Recent Posts
Dear All,

When we want to build Parallel DFM Environment on LINUX, we need to install several complementary packages.

However it is a little bit difficult to arrage the bin path and lib path for all those complementary packages.

Would you mind to give me the example for bin path and lib path configuration in a Parallel DFM Environment?

In my case, I build the DFM in this following pattern, but It can not be run.

1. For NetCDF
/home/dflowfm/netcdf

/home/dflowfm/netcdf-4.2.1

/home/dflowfm/netcdf-fortran-4.2


2. For PETSc
/home/petsc/petsc-3.4.0


3. For Cmake
/home/cmake/cmake-2.8.11.2


4. For METIS
/home/metis/metis-5.1.0


Can anybody give me some idea to start and think about, please? Because I am confuse about how to set my bin path and lib path configuration.


Thank you
Arthur van Dam, modified 6 Years ago.

RE: bin path and lib path in DFM for LINUX (Answer)

Youngling Posts: 17 Join Date: 3/3/11 Recent Posts
It is fine if you have all your third_party packages in separate directories. I do the same.

Below I assume that all the directories that you specified, are the ones that you installed the packages into. Is that so? For example, did you use ./configure ...--prefix=/home/petsc/petsc-3.4.0 ?

More specifically: the build instructions on http://publicwiki.deltares.nl/display/DFLOWFM/Building+on+Linux
specify which paths you need to set. In your case:

1. NetCDF: I advice to put the NetCDF C libraries AND the NetCDF Fortran interfaces in one and the same directory, e.g., /home/dflowfm/netcdf/4.2.1.
You now list three different netcdf dirs, that's a bit complicating.

After that, you need to set:
export NETCDFROOT=/home/dflowfm/netcdf/4.2.1
export LD_LIBRARY_PATH=$NETCDFROOT:$LD_LIBRARY_PATH
## The second line with LD_LIBRARY_PATH is better to put into your ~/.bashrc

2. For PETSc
export PETSC_DIR=/home/petsc/petsc-3.4.0
export LD_LIBRARY_PATH=$PETSC_DIR/lib:$LD_LIBRARY_PATH
## The second line with LD_LIBRARY_PATH is better to put into your ~/.bashrc


3. For Cmake
export PATH=home/cmake/cmake-2.8.11.2:$PATH


4. For METIS
export METIS_DIR=/home/metis/metis-5.1.0
export LD_LIBRARY_PATH=$METIS_DIR/lib:$LD_LIBRARY_PATH'
## The second line with LD_LIBRARY_PATH is better to put into your ~/.bashrc

As a final note: I see that all of your packages are installed into /home, e.g., /home/netcdf, /home/petsc.
That is allowed, but not very common. Typically $HOME refers to /home/<yourusername>, so the software is then installed under:
/home/<yourusername>/netcdf/
/home/<yourusername>/petsc/

Some people maintain a system-wide
/opt/netcdf
/opt/petsc
but you need to have permissions for that.

I myself use:
/home/<myusername>/pkg/netcdf/
/home/<myusername>/pkg/petsc/

(If you now decide to change your installation directories, take good care in fixing all PATH and LD_LIBRARY_PATH settings with the appropriate new dirnames.)
Santosa Putra, modified 6 Years ago.

Is there any different between DFM from svn and not from repository

Youngling Posts: 0 Join Date: 9/16/13 Recent Posts
Dear Arthur and all,

Finally I set my environment like the suggested setting. However,

I try to configure the DFLOWFM by:

export FC=mpif90
export F77=mpif90
export NETCDF_FORTRAN_CFLAGS=-I${NETCDFROOT}/include
echo "export NETCDF_FORTRAN_LIBS=-L${NETCDFROOT}/lib -lnetcdf -lnetcdff" >> $HOME/.bashrc
~/dflowfm/dflowfm-1.1.87/configure --disable-openmp --prefix=$DFLOWFMROOT --with-mpi --with-petsc=$PETSC_DIR  --with-metis=$METIS_DIR


However, when I try to do make command, it gives me error.

Would you mind to help me please? Thank you