[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #OKF-351804]: configure netcdf-fortran-4.4.5 with parallel



Hello,

You are correct in that you should set FC to mpif90 and CC to mpicc when 
compiling netcdf-fortran.  You don't need to set any additional options when 
configuring netcdf-fortran; when the parallel functionality is available it 
will be enabled automatically.  If you want to test the parallel functionality 
during 'make test', however, you will need to pass --enable-parallel-tests (as 
you note).  

The documents you are looking at refer specifically to netCDF-C, and can be 
made more clear.  Thank you very much for pointing this out!  I will get the 
updated.

I hope this helps, have a great day,

-Ward

> Full Name: Yifan Wang
> Email Address: address@hidden
> Organization: Stevens Institute of Technology
> Package Version:
> Operating System: Linux
> Hardware:
> Description of problem: Dear NetCDF group,
> 
> I am confused about the configuration of netcdf, netcdf-c and netcdf-fortran. 
> I would like to parallel run a model (ROMS), which requires NETCDF file 
> reading and writing. I was told to install netcdf with parallel I/O. So what 
> I have done is
> 1) build and install HDF5 with parallel support
> CC=mpicc ./configure --enable-parallel --prefix=${H5DIR}
> 2) build and install pnetcdf-1.11.0
> ./configure --prefix=/opt/pnetcdf --enable-shared 
> --with-mpi=/opt/openmpi401/bin
> 3) build and install NETCDF-C-4.6.3
> CC=mpicc CPPFLAGS="-I/opt/phdf5/include -I/opt/pnetcdf/include" 
> LDFLAGS="-L/opt/phdf5/lib -L/ope/pnetcdf/lib" ./configure --enable-pnetcdf 
> --enable-parallel-tests --prefix=/opt/netcdf4 
> --enable-remote-fortran-bootstrap
> 4) build and install NETCDF-Fortran
> CC=/usr/local/cc
> FC=/usr/local/gfortran
> NFDIR=/usr/local
> CPPFLAGS=-I${NCDIR}/include LDFLAGS=-L${NCDIR}/lib \
> ./configure --prefix=${NFDIR}
> 
> The questions that I have are:
> 1) should I set up CC to be mpicc and FC to be mpif90, for all the configure 
> I did above? Because I would like to know whether different compiler would 
> influence the following build...
> 2) when I configure netcdf-fortran, should I add any other options, like 
> '--enable-parallel-test', or just like what I did for netcdf-c, to make sure 
> the netcdf-fortran is parallel available?
> 3) the tutorial in 
> "https://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html";
>  shows how to build netcdf4 with parallel support. However, is the netcdf4 
> means netcdf-c or netcdf-fortran? I don't understand the relationship between 
> netcdf, netcdf-c and netcdf-fortran. I guess this is a very fundamental 
> question, I would be appreciated if you could explain this a little bit.... 
> thank you!
> Looking forward to your reply.
> 
> Best regards
> Yifan
> 
> 


Ticket Details
===================
Ticket ID: OKF-351804
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.