<div dir="ltr">Hello All,<br><br>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.<br>
<br>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.<br><br>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:<br>
<br> program simple_xy_wr<br> implicit none<br><br> include 'pnetcdf.inc'<br> include 'mpif.h'<br><br>C This is the name of the data file we will create.<br> character*(*) FILE_NAME<br>
parameter (FILE_NAME='<a href="http://simple_xy.nc">simple_xy.nc</a>')<br><br>C We are writing 2D data, a 6 x 12 grid.<br> integer NDIMS,ierr<br> parameter (NDIMS=1)<br> integer NX, NY, i, myid, nprocs<br>
parameter (NX = 16)<br> parameter (NY = 4)<br> CHARACTER(LEN=12) :: dataname<br><br><br>C When we create netCDF files, variables and dimensions, we get back<br>C an ID for each one.<br> integer ncid, varid,varid2, dimids(NDIMS), dimids2(NDIMS)<br>
integer x_dimid, y_dimid<br><br>C This is the data array we will write. It will just be filled with<br>C a progression of integers for this example.<br> integer data_out(NX)<br> integer lengths_out(NY)<br>
<br>C Loop indexes, and error handling.<br> integer x, y, retval<br><br> call MPI_INIT(ierr)<br> call MPI_COMM_RANK(MPI_COMM_WORLD, myid, ierr)<br> call MPI_COMM_SIZE(MPI_COMM_WORLD, nprocs, ierr)<br>
write(*,*) 'my id is :',myid,'& nprocs are:',nprocs<br><br>C Create some pretend data. If this wasn't an example program, we<br>C would have some real data to write, for example, model output.<br>
do x = 1, NX<br> data_out(x) = (x - 1) * NX<br> end do<br> do y = 1, NY<br> lengths_out(y) = (y-1) * NY<br> enddo<br><br><br> nfmpi_create(MPI_COMM_WORLD,FILE_NAME,<br> & NF_NETCDF4,MPI_INFO_NULL,ncid)<br>
<br> end<br clear="all"><br><br>When i compile this using : ftn simple.f $PNETCDF, i get this error.<br><br>PGF90-S-0021-Label field of continuation line is not blank (/usr/common/usg/pnetcdf/1.0.2/include/pnetcdf.inc: 1816)<br>
PGF90-S-0021-Label field of continuation line is not blank (/usr/common/usg/pnetcdf/1.0.2/include/pnetcdf.inc: 1820)<br>PGF90-S-0021-Label field of continuation line is not blank (/usr/common/usg/pnetcdf/1.0.2/include/pnetcdf.inc: 1823)<br>
PGF90-S-0021-Label field of continuation line is not blank (/usr/common/usg/pnetcdf/1.0.2/include/pnetcdf.inc: 1825)<br>PGF90-S-0021-Label field of continuation line is not blank (/usr/common/usg/pnetcdf/1.0.2/include/pnetcdf.inc: 1827)<br>
PGF90-S-0021-Label field of continuation line is not blank (/usr/common/usg/pnetcdf/1.0.2/include/pnetcdf.inc: 1831)<br>PGF90-S-0021-Label field of continuation line is not blank (/usr/common/usg/pnetcdf/1.0.2/include/pnetcdf.inc: 1833)<br>
PGF90-S-0034-Syntax error at or near identifier sizeof_mpi_offsetnfmpi_unlimited (/usr/common/usg/pnetcdf/1.0.2/include/pnetcdf.inc: 1836)<br>PGF90-S-0034-Syntax error at or near end of line (simple.f: 50)<br>PGF90-S-0038-Symbol, nfmpi_unlimited, has not been explicitly declared (simple.f)<br>
0 inform, 0 warnings, 10 severes, 0 fatal for simple_xy_wr<br><br>Am i missing something simple ?<br>-- <br>Regards,<br>Nikhil<br>
</div>