Help getting started with Pnetcdf

Robert Latham robl at mcs.anl.gov
Mon Oct 13 16:48:15 CDT 2008


On Mon, Oct 13, 2008 at 04:07:52PM -0500, Nikhil Laghave wrote:
> Hello All,
> 
> I have been using Parallel HDF5 for our code to do parallel IO of huge files
> but the performance we're getting is not very encouraging. So I wanted to do
> the same with Pnetcdf, but I am not able find much tutorials on the web with
> simple examples to write out files in parallel. The ones that are there are
> the serial ones.
> 
> So I was wondering if someone on this mailing list has a simple Pnetcdf
> example, that will help me in understanding how to use pnetcdf.

Hi

We really could use some more in-depth tutorials.  Perhaps the best
examples right now are those in the 'test' directory.   You can also
use the serial netcdf as a starting point:  nfmpi_def_dim behaves just
like nf_def_dim, for example, though you might have to adjust the size
and types of some of your variables.

> Also, I am trying to create a simple file using pnetcdf and am getting this
> error. There seems to be some problem with the include file and I don't
> understand how to get rid of this error. My code is as follows:

I think I see what's wrong here.  Two things, one small and one
larger.
 
>       nfmpi_create(MPI_COMM_WORLD,FILE_NAME,
>      &     NF_NETCDF4,MPI_INFO_NULL,ncid)

The NF_NETCDF4 flag doesn't have any meaning in pnetcdf land, but I
don't think this why you are having problems. 

> When i compile this using : ftn simple.f $PNETCDF, i get this error.
> 
> PGF90-S-0021-Label field of continuation line is not blank
> (/usr/common/usg/pnetcdf/1.0.2/include/pnetcdf.inc: 1816)

line 1816 is:
#define NF_INT1_IS_C_SIGNED_CHAR 1

We require our fortran codes to use the C preprocessor.  For many
compilers, this means using the '.F' suffix, or take Jim Edward's
advice.

People have used the portland group compilers with parallel-netcdf, so
I bet we can get you back on track in short order.

==rob

-- 
Rob Latham
Mathematics and Computer Science Division    A215 0178 EA2D B059 8CDF
Argonne National Lab, IL USA                 B29D F333 664A 4280 315B




More information about the parallel-netcdf mailing list