Hi Charles, > I just set out to port our software to use NetCDF4 parallel (Netcdf 4.3.3.1 > HDF5 1.8.13) > > Iâm trying to have multiple core wrote to different variables? Is that > possible, or can you only write to ONE variable at a time. > > When running the attached code when ONE core, it works happily, when running > with multiple core (mpirun ân 2 or more) only the variables written by the > highest rank are actually in the file. > > Is it possible to achieve what Iâm trying to do? If so what am I doing > wrong? Yes, I think it is. One thing you're doing wrong is including netcdf_par.h after netcdf.h. According to a note in some release notes that doesn't seem to have made it into the actual documentation: Users of parallel I/O with netCDF-4 please note: starting with the 4.1.2 release the parallel I/O functions are prototyped in netcdf_par.h, not netcdf.h. You must include netcdf_par.h BEFORE netcdf.h to use parallel I/O with netCDF-4. http://www.unidata.ucar.edu/netcdf/release-notes-4.1.2.html That also seems to be in the 2012 netCDF workshop section on using parallel I/O: For parallel builds you must include "netcdf_par.h" before (or instead of) netcdf.h. http://www.unidata.ucar.edu/netcdf/workshops/2012/pnetcdf/BuildingParallel.html I don't know if that's the problem, but it's the first problem I spotted, so you might want to try just deleting the "#include <netcdf.h>" statement from your test_append.c. --Russ > Also I tried to stay in def mode only first (I.e. Two loop, one declaring all > variables, then move in redef mode and write variables in 2nd loop) but it > didnât make a difference. > > Thanks for any pointer, > > C. > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: VFX-630532 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.