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

Building NetCDF libraries for DFM installation on LINUX

Santosa Putra, modified 6 Years ago.

Building NetCDF libraries for DFM installation on LINUX

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

Right now I am trying to build NetCDF libraries for DFM installation on LINUX.

There was a code that should be executed as:

$ tar zxvf netcdf-fortran-4.2.tar.gz
$ cd netcdf-fortran-4.2
$ FC=ifort CPPFLAGS=-I$NETCDFROOT/include LDFLAGS=-L$NETCDFROOT/lib LD_LIBRARY_PATH=$NETCDFROOT/lib:$LD_LIBRARY_PATH \
./configure --prefix=$NETCDFROOT
$ make
$ make install
$ cd ..

However, I got error when I try to execute ./configure .

Does anybody know the reason why?
Santosa Putra, modified 6 Years ago.

RE: Building NetCDF libraries for DFM installation on LINUX (Answer)

Youngling Posts: 0 Join Date: 9/16/13 Recent Posts
I have a strong prediction that the error is related to the Fortran Compiler selection.

In the command, it was stated that:

FC=ifort

However, I am not sure what kind of Fortran Compiler ifort is.

Therefore, I think that we can use the Fortran Conpiler that already installed in our system before.
If we have gfortran, may be we can change the command as:

FC=gfortran

Is that plausible?
Santosa Putra, modified 6 Years ago.

RE: Building NetCDF libraries for DFM installation on LINUX

Youngling Posts: 0 Join Date: 9/16/13 Recent Posts
And If I may add some question on this issue, I want to point out in these particular line in tutorial page:

# (Make sure to run `source ~/.bash_profile` in your terminal, after saving this file.)


The problem is that I can't run that command. It result the `~/.bash_profile` does not exist.

Can anybody know about this?

In my opinion we should change the command to:

source ~/.profile
or
source ~/.bashrc


Is that OK?
Arthur van Dam, modified 6 Years ago.

RE: Building NetCDF libraries for DFM installation on LINUX (Answer)

Youngling Posts: 17 Join Date: 3/3/11 Recent Posts
Hi Santosa,

I assume you're referring to the instructions on
http://publicwiki.deltares.nl/display/DFLOWFM/Building+on+Linux

Well, the source ~/.bash_profile is used because the LD_LIBRARY_PATH was just extended with the newly built NetCDF libraries.
Of course, you can also do that in either ~/.bashrc or ~/.profile too, depending on your own system, the .bash_profile was just one possible example.

Then, regarding your ifort compiler question: which compiler do you intend to use? Currently, we've tested and support ifort (Intel Fortran) and gfortran (GNU Fortran).
If you don't have ifort, then use FC=gfortran.

I see that I described this correctly for building D-Flow under section 3a, but not for the NetCDF libraries under section 1a. I have fixed that now on the wiki page, thanks for reporting.
Santosa Putra, modified 6 Years ago.

RE: Building NetCDF libraries for DFM installation on LINUX

Youngling Posts: 0 Join Date: 9/16/13 Recent Posts
Dear Arthur,
Thank you for your answer.

Yes I referred to the: http://publicwiki.deltares.nl/display/DFLOWFM/Building+on+Linux
And also know more about Intel Fortran Compiler.