next up previous contents
Next: Installing zlib 1.2.3 Up: NetCDF performance and installation Previous: NetCDF performance and installation   Contents


NetCDF 3.6.2 performance on HECToR

The serial performance of netCDF version 3.6.2 is investigated by means of a simple benchmark which reads and writes a netCDF file of varying size (Mbytes). Versions of netCDF compiled with the PGI and PathScale compilers are tested to determine whether the choice of compiler has any influence on the performance. The library is also compiled with various optimisation levels to determine where compiler optimisations can improve the performance.

One of the netCDF tester codes (in nc_test/large_files.c) writes and reads a large netCDF file. The size of the file can be altered by varying the value of I_LEN. Timers (MPI_Wtime) have been inserted into this code to enable the write/read times to be computed. Table 8 gives the write/read time in seconds for various compilers and compiler flags for a file of size 4 Gbytes. The timings are taken from the best (fastest) of three runs.


Table 8: Comparison of write/read performance of netCDF for various compilers and compiler flags.
Compiler Compiler flags Write time Read time
PGI ftn i.e. -O1 32.951 28.549
Pathscale ftn i.e. -O2 17.652 14.269
PGI ftn -O3 12.823 12.351


Table 8 shows that the performance of netCDF 3.6.2 compiled with the default compiler options is significantly poorer than that compiled with -O3. The PathScale compiler gives the best performance for this example.

The variation in performance for varying file sizes has also been investigated for both the PGI and PathScale compiler suites. Figure 8 gives the results of this experiment. From figure 8 it is clear the write/read time varies approximately linearly with file size and that netCDF 3.6.2 compiled with the PathScale compiler is consistently faster than that compiled with the PGI compiler.

Figure 8: Variation of write/read time with filesize for netCDF 3.6.2 compiled with the PGI and PathScale compiler suites.
Image netcdf_filesize_perf

The results given table 8 suggest that using an optimised version of netCDF 3.6.2 may be beneficial to NEMO. To test this, NEMO was recompiled using a version of netCDF 3.6.2 compiled with -O3. Note, to ensure object file compatibility, NEMO must be compiled with the same compiler suite that is used to compile netCDF. The runtime was found to be almost identical to that obtained with the unoptimised version of netCDF 3.6.2 which is unsurprising. The test codes are serial, whereas NEMO is a parallel code. Furthermore, NEMO writes out many files simultaneously rather than one single large file and also does computation whereas the test code is purely carrying out I/O operations. Even although the netCDF optimisation level appears to have little effect on the peformance of NEMO we will still compile netCDF 4.0 using -O2 as it may be beneficial to other users of the library.


next up previous contents
Next: Installing zlib 1.2.3 Up: NetCDF performance and installation Previous: NetCDF performance and installation   Contents