EXEC_BIN = /work/n01/n01/fionanem/NEMO/ORCA025/bin/orca025k64 # netcdf library and includes NCDF_INC = /home/n01/n01/sga/PACKAGES/include NCDF_LIB = -L/home/n01/n01/sga/PACKAGES/lib -lnetcdf P_C = ftn -Mcpp=comment P_O = M_K = gmake F_C = ftn -c F_L = ftn A_C = ar -r F_O = -O3 -r8 -I $(MODDIR) -I$(MODDIR)/oce -I$(NCDF_INC) L_X = -O3 -r8
The Fortran wrapper script ftn invokes the pgf90 compiler and includes the appropriate paths to the MPI library which means that this doesn't need to be added in at link time. NCDF_INC and NCDF_LIB specify the location of the netCDF library and associated include files. The pre-processor option -Mcpp=comment ensures that C-style comments are retained in the pre-processed output. The -O3 flag specifies the level of optimisation applied. The -r8 flag ensures that all variables specified as REAL are interpreted as DOUBLE PRECISION.
For the problem we are concentrating on, processor counts of less than 96 currently will not compile with the PGI compiler. The error message obtained is of the form:
/opt/pgi/7.0.4/linux86-64/7.0-4/lib/libpgf90.a(initpar.o)(.text+0x2): In function `__hpf_myprocnum': : relocation truncated to fit: R_X86_64_PC32 __hpf_lcpu
The reason for this error is that when NEMO is compiled for smaller processor counts, more than 2 GB of address space is required. This is a known feature of the PGI compiler and will be fixed in future releases of PGI compiler and system libraries. At present, the PathScale compiler is the only alternative if runs using smaller processor counts are required.