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.
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.
![]() |
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.