-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parallel netcdf writes #23
Comments
Jeff, Just a quick update, I am working on this following the steps you listed here. The coding is mostly done. One thing not listed in your steps and not clear to me is about writing attribute, I assume it is OK to call nf90_put_att on all the mpi tasks? |
Yes, creating the attributes, dimensions and variables can be done on all tasks. The only thing that needs to change is the nf90_put_var (writing data to the variable). |
Great! Currently I am going to test the code on dell as it has the parallel
netcdf lib Cory built. Will copy the code to hera for you to check when the
coding is done. Thanks.
…On Mon, Dec 23, 2019 at 9:01 PM Jeff Whitaker ***@***.***> wrote:
Yes, creating the attributes, dimensions and variables can be done on all
tasks. The only thing that needs to change is the nf90_put_var (writing
data to the variable).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=AI7D6TONEKGGDWOMAMCN2QDQ2FUONA5CNFSM4JZGFTH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHSIVYI#issuecomment-568625889>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI7D6TKKUWELW3LD6DMUASDQ2FUONANCNFSM4JZGFTHQ>
.
|
Jun - one thing to be aware of. There are two parallel IO implementations with the same API - one that works with classic (non-hdf5) files and one that works with hdf5 files. To enable both, you have to build with - if (ideflate == 0) then
- ncerr = nf90_create(trim(filename), &
- cmode=IOR(IOR(NF90_CLOBBER,NF90_64BIT_OFFSET),NF90_SHARE), &
- ncid=ncid); NC_ERR_STOP(ncerr)
- ncerr = nf90_set_fill(ncid, NF90_NOFILL, oldMode); NC_ERR_STOP(ncerr)
- else
- ncerr = nf90_create(trim(filename), cmode=IOR(IOR(NF90_CLOBBER,NF90_NETCDF4),NF90_CLASSIC_MODEL), &
- ncid=ncid); NC_ERR_STOP(ncerr)
- ncerr = nf90_set_fill(ncid, NF90_NOFILL, oldMode); NC_ERR_STOP(ncerr)
- endif
+ ncerr = nf90_create(trim(filename), cmode=IOR(IOR(NF90_CLOBBER,NF90_NETCDF4),NF90_CLASSIC_MODEL), &
+ ncid=ncid); NC_ERR_STOP(ncerr) ! modify if parallel IO needed
+ ncerr = nf90_set_fill(ncid, NF90_NOFILL, oldMode); NC_ERR_STOP(ncerr) |
I see, thanks for letting me know.
Jun
…On Mon, Dec 23, 2019 at 9:11 PM Jeff Whitaker ***@***.***> wrote:
Jun - one thing to be aware of. There are two parallel IO implementations
with the same API - one that works with classic (non-hdf5) files and one
that works with hdf5 files. To enable both, you have to build with
--enable-parallel4 *and* --enable-pnetcdf. If Cory did not build with
--enable-pnetcdf you will have to make this change
- if (ideflate == 0) then- ncerr = nf90_create(trim(filename), &- cmode=IOR(IOR(NF90_CLOBBER,NF90_64BIT_OFFSET),NF90_SHARE), &- ncid=ncid); NC_ERR_STOP(ncerr)- ncerr = nf90_set_fill(ncid, NF90_NOFILL, oldMode); NC_ERR_STOP(ncerr)- else- ncerr = nf90_create(trim(filename), cmode=IOR(IOR(NF90_CLOBBER,NF90_NETCDF4),NF90_CLASSIC_MODEL), &- ncid=ncid); NC_ERR_STOP(ncerr)- ncerr = nf90_set_fill(ncid, NF90_NOFILL, oldMode); NC_ERR_STOP(ncerr)- endif+ ncerr = nf90_create(trim(filename), cmode=IOR(NF90_CLOBBER,NF90_NETCDF4), &+ ncid=ncid); NC_ERR_STOP(ncerr)+ ncerr = nf90_set_fill(ncid, NF90_NOFILL, oldMode); NC_ERR_STOP(ncerr)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=AI7D6TJABBJLGZ32ICMEYMDQ2FVVZA5CNFSM4JZGFTH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHSJD2Q#issuecomment-568627690>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI7D6TJKZOC6WIDNYISE36DQ2FVVZANCNFSM4JZGFTHQ>
.
|
For your information, the pnetcdf (parallel-netcdf) library developed at Argonne Labs writes data in netCDF cdf-2 format (called 64-bit offset in pnetcdf; is essentially the same as netCDF 3 format and can be read and written with any unidata netCDF library from 3.x upwards, but parallel reads/writes require pnetcdf support as described by Jeff for netCDF 4.x). Note that early versions of netcdf 4 (4.5.x) had some serious bugs when writing to those cdf-5 files, which in some cases corrupted the data. For larger files (individual variables larger than 2GB), the pnetCDF format must be switched to 64-bit data format (aka cdf-5; NF90_64BIT_DATA instead of NF90_64BIT_OFFSET in the code snippet above), which is incompatible with standard netCDF installations and also requires building newer unidata netcdf4.x versions with the flags that Jeff described above. The drawback of this format is that many other downstream tools don't recognize it (you will see an error message of the kind "MPI routine called before MPI init" or so) - unless they were built using the same pnetcdf-enabled version of netCDF 4.x. The other format using parallel hdf5 as backend for so-called netCDF4 or netCDF4-classic files. This does't require the parallel-netcdf backend and seems to be easier. BUT: the parallel reading and writing of netCDF4 files through the HDF5 format is several times slower than that through parallel-netCDF! Long story short: for the given "small" global meshes of 13km resolution, we can use the CDF-2 parallel-netcdf version, which can be read or written with any existing software that can read netCDF3 classic files. We should not use the netCDF4-phdf5 backend, because it is very, very slow. I have some HPC reports (unpublished work) from my previous job where I was using pnetcdf, netcdf4-phdf5 and SIONlib in MPAS extreme scaling experiments if you are interested. |
We have to use the hdf5 backend to get compression. My experience is that parallel-hdf5 performance has improved quite a bit in recent versions. |
I forgot about the compression part. Good to hear that there has been a speedup in recent versions. The real test will be when we scale up the model to 3-5km global resolution and 100k +/- MPI tasks.
Out of curiosity, have you tried different compression levels (1-9 if I remember correctly) in terms of smaller file sizes versus loss in read/write performance?
Thanks for implementing this parallel read/write capability, dearly needed.
… On Dec 23, 2019, at 9:33 PM, Jeff Whitaker ***@***.***> wrote:
We have to use the hdf5 backend to get compression. My experience is that parallel-hdf5 performance has improved quite a bit in recent versions.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#23?email_source=notifications&email_token=AB5C2RMD4SFK4XYAORJZD3DQ2GGJXA5CNFSM4JZGFTH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHSOPEI#issuecomment-568649617>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB5C2RJ6QW6XZ4RVAXK3PZTQ2GGJXANCNFSM4JZGFTHQ>.
|
We're using a compression level of 1. |
Howdy! To clarify a few points:
|
Thanks for the update, Ed. Did you ever get to play with the SIONlib backend and test its performance? We had a telecon with the developers in Juelich some time ago, and I didn't have any time to follow up on this, sorry. |
No I have not played with SIONlib but would be interested in learning more about it. There was an idea of writing a SIONlib read/write module for netcdf... |
OK, some more news: turns out that szip is already enabled in netcdf-c for writes! It's a bit of an undocumented feature. For this to work, HDF5 must be built with szip (as well as the usual zlib). Once netcdf-c is built on a HDF5 that supports szip, then szip compression may be turned on for a var like this:
Currently this will only work for sequential access. I am working on getting it working for parallel access next. ;-) |
That is great news! Thanks for letting us know!
Jun
…On Fri, Jan 3, 2020 at 10:54 AM Edward Hartnett ***@***.***> wrote:
OK, some more news: turns out that szip is already enabled in netcdf-c for
writes! It's a bit of an undocumented feature.
For this to work, HDF5 must be built with szip (as well as the usual zlib).
Once netcdf-c is built on a HDF5 that supports szip, then szip compression
may be turned on for a var like this:
#define HDF5_FILTER_SZIP 4
/*
* Set parameters for SZIP compression; check the description of
* the H5Pset_szip function in the HDF5 Reference Manual for more
* information.
*/
szip_params[0] = H5_SZIP_NN_OPTION_MASK;
szip_params[1] = H5_SZIP_MAX_PIXELS_PER_BLOCK_IN;
stat = nc_def_var_filter(ncid, varid, HDF5_FILTER_SZIP, 2, szip_params);
Currently this will only work for sequential access. I am working on
getting it working for parallel access next. ;-)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=AI7D6TJVLVQDM6DL7SL36NLQ35NR7A5CNFSM4JZGFTH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIBNVXI#issuecomment-570612445>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI7D6TM447FCPHTBTVRB34LQ35NR7ANCNFSM4JZGFTHQ>
.
|
@junwang-noaa - do you have a branch with the parallel-io mods in it that I can play with? |
Yes. The code gets compiled on mars, but I haven't tested the parallel netcdf case yet. [submodule "FV3"] The branch also has the code changes for real(8) lon/lat in netcdf file and a bug fix for post. |
Thanks @junwang-noaa, I will give it a spin on hera. |
I've made a few changes to @junwang-noaa's netcdf_parallel branch and almost have it running on hera (without compression). The files are created, but the data isn't actually written. Jun - if you give me access to your fork I can push my changes there, or if you prefer I can create my own fork. |
I added you as a collaborator, once you accept the invitation, you should
be able to push to the branch. Please let me know if you still can't.
Jun
…On Wed, Jan 8, 2020 at 5:04 PM Jeffrey Whitaker ***@***.***> wrote:
I've made a few changes to @junwang-noaa <https://github.com/junwang-noaa>'s
netcdf_parallel branch and *almost* have it running on hera (without
compression). The files are created, but the data isn't actually written.
Jun - if you give me access to your fork I can push my changes there, or if
you prefer I can create my own fork.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=AI7D6TNWGNVSQGKKVRCXRFTQ4ZEVLA5CNFSM4JZGFTH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIOESSY#issuecomment-572279115>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI7D6TKYPSGM3AI5OG42PZTQ4ZEVLANCNFSM4JZGFTHQ>
.
|
I've updated https://github.com/junwang-noaa/fv3atm/tree/netcdf_parallel, to include bug fixes and changes from PR #18. It now runs on hera, and for uncompressed data shows some significant speedups. Next step is to build the netcdf library with Unidata/netcdf-c#1582 so we can test parallel compressed writes. |
BTW - the code is now using independent (not collective) parallel access. Collective access seems to be quite a bit slower in my tests - don't understand why. Using independent access required changing the time dimension from unlimited to fixed length. |
Collective access is required for any filters in HDF5, including all compression filters. :-( |
OK - I've updated the code to turn collective access for variables that are compressed. |
Ed,
Would we have a netcdf beta library that we can test in our FV3 parallel?
Thanks
Jun
…On Thu, Jan 9, 2020 at 12:59 PM Edward Hartnett ***@***.***> wrote:
Collective access is required for any filters in HDF5, including all
compression filters. :-(
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=AI7D6TOQXUVXW7EJYPKCO7TQ45QXNA5CNFSM4JZGFTH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIRGK3Q#issuecomment-572679534>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI7D6TIIMLDC6R324IHS7JLQ45QXNANCNFSM4JZGFTHQ>
.
|
Jun - it's not merged into master yet but we can check out https://github.com/NOAA-GSD/netcdf-c/tree/ejh_parallel_zlib. I'll build this on hera. |
Jeff,
Do you have instructions on how to build it? I can build it on wcoss.
Thanks.
Jun
…On Thu, Jan 9, 2020 at 1:35 PM Jeffrey Whitaker ***@***.***> wrote:
Jun - it's not merged into master yet but we can check out
https://github.com/NOAA-GSD/netcdf-c/tree/ejh_parallel_zlib. I'll build
this on hera.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=AI7D6TJ2Y3GQ2XNR23QFTJ3Q45U7TA5CNFSM4JZGFTH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIRJZIY#issuecomment-572693667>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI7D6TKPFV2TCHN4XBFWMWDQ45U7TANCNFSM4JZGFTHQ>
.
|
Jun: Here's what I did on hera (haven't yet tested it)
To build HDF5:
To build netcdf-c:
To build netcdf-fortran:
|
Just for your information,
I compiled the entire parallel I/O stack on hera for some other folks using MPAS and for my own 3km-global MPAS tests. I made those available as modules:
module use -a /scratch1/BMC/gmtb/software/modulefiles/intel-18.0.5.274/impi-2018.0.4
module load intel/18.0.5.274
module load impi/2018.0.4
module load pnetcdf/1.11.2-for-pio
module load netcdf/4.7.0-for-pio
# module load pio/2.4.4 # not needed for FV3
module list
Maybe that is good enough for your testing?
Thanks,
Dom
… On Jan 9, 2020, at 12:50 PM, Jeffrey Whitaker ***@***.***> wrote:
Jun: Here's what I did on hera (haven't yet tested it)
create a directory ${parlibpath}
cd ${parlibpath}
download hdf5-1.10.6.tar.gz and netcdf-fortran-4.5.2.tar.gz to that directory
To build HDF5:
tar -xvzf hdf5-1.10.6.tar.gz
cd hdf5-1.10.6
./configure --prefix=${parlibpath} --enable-hl --enable-parallel
make
make install
To build netcdf-c:
git clone https://github.com/NOAA-GSD/netcdf-c <https://github.com/NOAA-GSD/netcdf-c>
cd netcdf-c; git checkout ejh_parallel_zlib
autoreconf -i
setenv LDFLAGS -L${parlibpath}/lib
setenv CPPFLAGS -I${parlibpath}include
./configure --prefix=${parlibpath} --enable-netcdf-4 --enable-shared --disable-dap --enable-parallel4
make
make install
To build netcdf-fortran:
tar -xvzf netcdf-fortran-4.5.2.tar.gz
cd netcdf-fortran-4.5.2
setenv FC mpif90
setenv CC mpicc
setenv LDFLAGS -L${parlibpath}/lib
setenv CPPFLAGS -I${parlibpath}include
./configure --prefix=${parlibpath}
make
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#23?email_source=notifications&email_token=AB5C2RM7N62X5X6K5MRIDMDQ455WVA5CNFSM4JZGFTH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIRRU7Q#issuecomment-572725886>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB5C2RIGSAJQRJHH2367NTDQ455WVANCNFSM4JZGFTHQ>.
|
Dom: We need a bleeding edge version of netcdf-c from https://github.com/NOAA-GSD/netcdf-c/tree/ejh_parallel_zlib compiled with parallel hdf support. |
@edwardhartnett - with your branch I'm still getting |
I ran a C768 test on hera, and I still see a benefit to parallel IO for the 2D files. Using 12 write tasks, with parallel IO for both 2d and 3d files I get
whereas turning off parallel IO for 2d files I see
and without parallel IO for either 2d or 3d files
|
Seems like the 2D writes are very sensitive to chunksize. If I set the chunksize to be the same as the size of the array on each write task, I get
The optimal chunksize may be platform dependent. I'll look at adding the chunksize as a runtime parameter in model_configure |
Added ichunk2d, jchunk2d parameters in model_configure (can be used to tune chunksize for best parallel IO performance). Default is size of array on each write task. |
Also added ichunk3d,jchunk3d,kchunk3d to set 3d variable chunksize. Default is ichunk3d=ichunk2d, jchunk3d=jchunk2d, kchunk3d=nlevs. This results in the fastest writes for me on hera:
To restore the previous behavior, set ichunk3d=imo,jchunk3d=jmo,kchunk3d=1. Writes are slower for this setting, but reading 2d horizontal slices is much faster. @junwang-noaa - could you run your test again on WCOSS with these new default chunksizes? |
Here are results using default chunksize (decomposition size on write
tasks).
parallel netcdf Write Time is 43.48440 at Fcst 00:00
parallel netcdf Write Time is 42.56229 at Fcst 00:00
total Write Time is 141.08820 at Fcst 00:00
parallel netcdf Write Time is 45.74817 at Fcst 01:00
parallel netcdf Write Time is 29.93798 at Fcst 01:00
total Write Time is 128.55868 at Fcst 01:00
parallel netcdf Write Time is 37.90728 at Fcst 02:00
parallel netcdf Write Time is 42.14662 at Fcst 02:00
total Write Time is 131.89296 at Fcst 02:00
parallel netcdf Write Time is 50.03225 at Fcst 03:00
parallel netcdf Write Time is 39.72588 at Fcst 03:00
total Write Time is 141.78540 at Fcst 03:00
Using chunksize 3D:(imo,jmo,1,nlevs), 2D:(imo,jmo,1)
parallel netcdf Write Time is 31.30396 at Fcst 03:00
parallel netcdf Write Time is 72.84347 at Fcst 03:00
total Write Time is 158.10736 at Fcst 03:00
Using 3D chunk size (imo,jmo,1,nlevs), sequential write 2D:
parallel netcdf Write Time is 29.84425 at Fcst 03:00
netcdf Write Time is 46.99665 at Fcst 03:00
total Write Time is 131.50041 at Fcst 03:00
…On Sun, Jan 26, 2020 at 9:43 PM Jeffrey Whitaker ***@***.***> wrote:
Also added ichunk3d,jchunk3d,kchunk3d to set 3d variable chunksize.
Default is ichunk3d=ichunk2d, jchunk3d=jchunk2d, kchunk3d=nlevs. This
results in the fastest writes for me on hera:
parallel netcdf Write Time is 24.97020 at Fcst 03:03
parallel netcdf Write Time is 9.98413 at Fcst 03:03
total Write Time is 35.23754 at Fcst 03:03
To restore the previous behavior, set ichunk3d=imo,jchunk3d=jmo,kchunk3d=1.
Writes are slower for this setting, but reading 2d horizontal slices is
much faster.
@junwang-noaa <https://github.com/junwang-noaa> - could you run your test
again on WCOSS with these new default chunksizes?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=AI7D6TO7GUC5M5GG7QZCOTLQ7ZC35A5CNFSM4JZGFTH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ6FQ4I#issuecomment-578574449>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI7D6TJTN2PC2URQKOF7SZLQ7ZC35ANCNFSM4JZGFTHQ>
.
|
did you mean (imo,jmo,nlevs,1) for the 3d chunk size? |
Sorry,I am using an old version, I think it is (im,jm,1,1). It looks to me
writing 3D fields with default chunksize is slower on dell compared to
previous version.
@@ -176,7 +173,7 @@ module module_write_netcdf_parallel
ncerr = nf90_def_var(ncid, trim(fldName), NF90_FLOAT, &
(/im_dimid,jm_dimid,pfull_dimid,time_dimid/),
varids(i), &
shuffle=.false.,deflate_level=ideflate,&
- chunksizes=(/im,jm,1,1/),cache_size=40*im*jm);
NC_ERR_STOP(ncerr)
+ chunksizes=(/ichunk3d,jchunk3d,kchunk3d,1/));
NC_ERR_STOP(ncerr)
! compression filters require collective access.
…On Mon, Jan 27, 2020 at 10:22 AM Jeffrey Whitaker ***@***.***> wrote:
did you mean (imo,jmo,nlevs,1) for the 3d chunk size?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=AI7D6TLDIHT3N7U4KEU24JTQ73333A5CNFSM4JZGFTH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ74QNQ#issuecomment-578799670>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI7D6TPH4BNU7R2X4AAQ7MLQ73333ANCNFSM4JZGFTHQ>
.
|
Hmm. Wonder why I'm getting ~4x faster writes on hera with the new default chunksizes and 12 write tasks (total write time of 35 secs vs 140 secs on WCOSS). |
Jeff,
The 140s on dell includes 50s inline post time. So the total time is about
90s for writing netcdf files.
…On Mon, Jan 27, 2020 at 11:11 AM Jeffrey Whitaker ***@***.***> wrote:
Hmm. Wonder why I'm getting ~4x faster writes on hera with the new default
chunksizes and 12 write tasks (total write time of 35 secs vs 140 secs on
WCOSS).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=AI7D6TMQRHG74DIIXHWV3V3Q74BRRA5CNFSM4JZGFTH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKACARQ#issuecomment-578822214>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI7D6TNFC5LAQJGKMAEAN33Q74BRRANCNFSM4JZGFTHQ>
.
|
Here are results on dell using default chunk size for 2D file, and
(im,jm,1,1) for 3D files, basically writing netcdf files takes 60-70s. In
this run, I am using 2 write groups instead of 7 groups used in the initial
test from fv3_parallel (reducing 300 tasks).
parallel netcdf Write Time is 32.15252 at Fcst 00:00
parallel netcdf Write Time is 45.53429 at Fcst 00:00
total Write Time is 132.93790 at Fcst 00:00
parallel netcdf Write Time is 31.60762 at Fcst 01:00
parallel netcdf Write Time is 43.13410 at Fcst 01:00
total Write Time is 127.48863 at Fcst 01:00
parallel netcdf Write Time is 30.07048 at Fcst 02:00
parallel netcdf Write Time is 33.14977 at Fcst 02:00
total Write Time is 114.95780 at Fcst 02:00
parallel netcdf Write Time is 32.54118 at Fcst 03:00
parallel netcdf Write Time is 37.68903 at Fcst 03:00
total Write Time is 122.18182 at Fcst 03:00
parallel netcdf Write Time is 30.96448 at Fcst 04:00
parallel netcdf Write Time is 31.85908 at Fcst 04:00
total Write Time is 114.86909 at Fcst 04:00
parallel netcdf Write Time is 32.27664 at Fcst 05:00
parallel netcdf Write Time is 25.77598 at Fcst 05:00
total Write Time is 110.33424 at Fcst 05:00
parallel netcdf Write Time is 27.19671 at Fcst 06:00
parallel netcdf Write Time is 20.22734 at Fcst 06:00
total Write Time is 99.69328 at Fcst 06:00
On Mon, Jan 27, 2020 at 11:28 AM Jun Wang - NOAA Federal <[email protected]>
wrote:
… Jeff,
The 140s on dell includes 50s inline post time. So the total time is about
90s for writing netcdf files.
On Mon, Jan 27, 2020 at 11:11 AM Jeffrey Whitaker <
***@***.***> wrote:
> Hmm. Wonder why I'm getting ~4x faster writes on hera with the new
> default chunksizes and 12 write tasks (total write time of 35 secs vs 140
> secs on WCOSS).
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#23?email_source=notifications&email_token=AI7D6TMQRHG74DIIXHWV3V3Q74BRRA5CNFSM4JZGFTH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKACARQ#issuecomment-578822214>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AI7D6TNFC5LAQJGKMAEAN33Q74BRRANCNFSM4JZGFTHQ>
> .
>
|
To recap, netcdf chunksizes (for parallel and serial compressed IO) can be set at runtime by specifying parameters ichunk2d,jchunk2d,ichunk3d,jchunk3d,kchunk3d in model_configure. The default values (if these parameters are not given) are the MPI decomposition size. If the parameters are set to a negative value, then the netcdf C library will choose the chunksize. If compression is turned off, the netcdf C library chooses the chunksize (the chunking parameters are not used). My tests on hera show that the default values produced the fastest parallel IO throughput. However, this might not be true on other platforms (and Jun's tests suggest it may not be true on WCOSS) Note that for parallel IO, the chunksize that produces the fastest write speed may not be optimal for read speed (depending on the access pattern). For example, my tests indicate that setting the chunksize for 3d variables to imo,jmo,1,1 greatly speeds up reads for 2d slices (a very common access pattern), but slows down the writes by 25% or so on hera. In general, the write speeds for parallel IO with compression appear to be quite sensitive to chunksize (much less so for serial IO). The nccopy utility can be used to change the chunking in an existing netcdf file. |
To compile on hera, I made the following change to
This, and corresponding changes to the wcoss modulefiles, plus the addition of PARALLEL_NETCDF to the cmake files, need to be included in a companion pull request to https://github.com/ufs-community/ufs-weather-model. |
The netcdf-c branch named "ejh_parallel_zlib" described in this comment: does not exist anymore. Which version of netcdf-c should we use? |
Use the netcdf-c master branch. All my changes have been merged to master. |
https://github.com/NOAA-GSD/netcdf-c I see NOAA-GSD:master is 6 commits behind Unidata:master |
Use the Unidata master. THe NOAA-GSD one is my fork that I use for working on the Unidata one. |
Ed, just to confirm, I am building netcdf-c from unidata on hera, the revision is 2a34eb2a. .../nems/emc.nemspara/soft/netcdf_parallel/netcdf-c> git clone https://github.com/Unidata/netcdf-c
commit 2a34eb2ac5996dc23339bdb72918eb5503393d77
|
I have problem to build the hdf5/1.10.6 on cray, I have module load PrgEnv-intel export FC=ftn but I got error: Please verify that both the operating system and the processor support Intel(R) MOVBE, FMA, BMI, LZCNT and AVX2 instructions. configure:4725: $? = 1 Does anybody have any idea? |
@junwang-noaa you do have the correct netcdf. However, I don't know what the HDF5 build problem is. Have you asked HDF5 support? |
@junwang-noaa - have a look at config.log file in the build directory after configure fails to find more information as to the cause of failure. Search for "cannot" and examine the lines preceding it. |
@jswhit BTW I'm still working on szip and netcdf-fortran. There are some complexities but I hope to have a working branch for you soon... |
A detailed configuration testing on wcoss dell is at: https://docs.google.com/document/d/18vqajgOv3flbS35eNPMnYpFyNiprkJpHkVZpP--dx5o/edit |
@jswhit2 The error message I listed above is from the config.log. Not sure why the executable compiled from c program can't run on cray. |
@edwardhartnett Can you create a tag from the master? |
@jswhit2 there is now a branch ejh_szip on netcdf-fortran which has the szip code in the fortran APIs. @junwang-noaa I cannot create a tag. I am not part of Unidata any longer. ;-) However, I believe they will be doing a release in the next few weeks. (No guarantee though.) |
Code is committed. I will open a new issue for installing the hdf/netcdf lib on cray. |
@jswhit2 the szip changes have been merged into master branch on Unidata's netcdf-fortran project. So just grab that, and build it against the netcdf-c master you have already built. Then you can call nf90_def_var_szip() on a variable. Make sure you also turn off deflate. You can't use both deflate and szip. |
Parallel write capability is needed in module_write_netcdf.F90. The current version of the netcdf library does not support parallel writing of compressed files, but uncompressed parallel writes should work. Here are some steps needed to implement this:
The text was updated successfully, but these errors were encountered: