This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Hi, > > I'm having some difficulty with my implementation that attempts to use > netcdf4 parallel IO. > > Do you have sample code, especially code written in Fortran? I'm > specifically using fortran 90. > > I am looking for some test code that you have used to test the parallel > IO features. > > ________________________________________________________ > Annette Koontz > Scientist > FUNDAMENTAL & COMPUTATIONAL SCIENCE DIRECTORATE > > Pacific Northwest National Laboratory > 902 Battelle Boulevard > P.O. Box 999, MSIN k7-15 > Richland, WA 99352 USA > Tel: 509-375-3609 > Fax: 509-375-3641 > address@hidden > www.pnl.gov > > > Howdy Annette! Firstly, make sure you get the 4.0.1 release (which just came out) as it has some important changes in using the parallel I/O features from F90. It's very simple: you use the nf90_create or nf90_open calls as usually, but pass in your comm and info parameters as optional parameters. If you are creating, you then make your def_var, def_dim, etc. calls, all collectively. Data, by default, is written and read independently by each processor. So after opening/creating the file and doing any metadata operations that you might want to do, you just read/write normally from each process. The reads/writes will take place with parallel I/O. There is a test program. You must build netCDF with --enable-parallel-tests and then, in the nf_test directory, make check will build the program f90tst_parallel.f90. Good luck and please let me know how the parallel I/O features work for you. Thanks, Ed Ticket Details =================== Ticket ID: BGG-137311 Department: Support netCDF Priority: Normal Status: Closed