IMPORTANT: Update arguments to intrisic function PACK
- Several versions of gfortran failed when the Fortran intrinsic function PACK had a pointer as the first argument. The PACK function is used when reading NetCDF files, and the CHECKSUM option is activated. So, for example, in nf_fread2d.F, we need to have instead:
IF (Lchecksum) THEN
# ifdef DISTRIBUTE
Npts=(Imax-Imin+1)*(Jmax-Jmin+1)
IF (.not.allocated(Cwrk)) allocate ( Cwrk(Npts) )
Cwrk = PACK(Adat(Imin:Imax, Jmin:Jmax), .TRUE.)
CALL get_hash (Cwrk, Npts, checksum, .TRUE.)
# else
Npts=(Ie-Is+1)*(Je-Js+1)
IF (.not.allocated(Cwrk)) allocate ( Cwrk(Npts) )
Cwrk = PACK(Adat(Is:Ie, Js:Je), .TRUE.)
CALL get_hash (Cwrk, Npts, checksum)
# endif
IF (allocated(Cwrk)) deallocate (Cwrk)
END IF
- Updated the gfortarn make configuration script to comment the -fsanitize compiling flags:
# FFLAGS += -fsanitize=address -fsanitize=undefined
The sanitization in a newer version for gfortran requires a couple of libraries during compilation and execution.
- Added compiler option -fallow-argument-mismatch to CMmake configuration file Compilers/compiler_flags_GNU_Fortran.cmake.
- Added verbose (-v) option to CMake build scripts cbuild_roms.csh and cbuild_roms.sh.
Change History
(4)
Description: |
modified (diff)
|
Resolution: |
→ Fixed
|
Status: |
new → closed
|
Summary: |
IMPORTANT: Update arguments to intrisic functio PACK → IMPORTANT: Update arguments to intrisic function PACK
|
Description: |
modified (diff)
|
We have fixed the issue with the -p option in cbuild_roms.csh and compiling with gfortran by passing the compiler argument to the CMake call.