Hardware Reference
In-Depth Information
1 ret=ncmpi_create(MPI_COMM_WORLD,filename,
2 NC_CLOBBER|NC_64BIT_OFFSET,MPI_INFO_NULL,&ncfile);
3 /*aftercreate,fileisautomaticallyindefinemode*/
4 ncmpi_def_dim(ncfile,"d1",DATA_PER_PROC,&(dimarray[1]));
5 ncmpi_def_dim(ncfile,"d2",nprocs,&(dimarray[0]));
6 /*notehowthiscallassociatesaname,adatatype,andashape
7 tothevariable*/
8 ncmpi_def_var(ncfile,"v2d",NC_INT,ndims,dimarray,&varid1);
9
10 ncmpi_def_var(ncfile,"v2d",NC_INT,ndims,dimarray,&varid1);
11
12 ncmpi_enddef(ncfile);
13
14 ncmpi_put_vara_int_all(ncfile,varid1,start,count,data);
15 ncmpi_close(ncfile);
FIGURE 15.3: A code fragment demonstrating the two modes of the Parallel-
NetCDF API. By requiring a separate declaration step, the data transfer step
can occur in parallel without additional coordination.
allowed Parallel-NetCDF to see rapid adoption in the climate community.
Science groups could introduce parallelism piecewise, but still use serial tools.
For example, the code writing history files in a climate simulation could be
updated written in parallel, but the tools to visualize that data could remain
serial for a bit longer.
With its long history of using netCDF-formatted files, naturally the climate
communities use Parallel-NetCDF. Parallel-NetCDF has also seen adoption in
weather, fluid dynamics [5], and astrophysics [3].
Parallel-NetCDF saw tremendous interest from its earliest days. The Lead-
ership Computing Facilities at Argonne and Oak Ridge National Laborato-
ries have installed Parallel-NetCDF for the past three generations of systems.
Many other sites have installed Parallel-NetCDF, particularly if those sites
host computational scientists from the climate domain. If a user should hap-
pen to find Parallel-NetCDF not already installed on a system, its minimal
dependencies make building it straightforward.
15.5 Additional Features
Parallel-NetCDF's similarity to serial netCDF provides its strongest selling
point. Maintaining that similarity means a new Parallel-NetCDF user need
not spend much time learning about the distinction between define mode and
data mode or how to view or analyze the generated file. However, Parallel-
NetCDF provides several features not available in serial netCDF.
The Flexible Interface to Parallel-NetCDF allows a developer to describe
arbitrary data in memory when writing to a multi-dimensional file. The various
 
Search WWH ::




Custom Search