Opened 15 months ago

Last modified 15 months ago

#932 closed defect

IMPORTANT: Update arguments to intrisic functio PACK — at Initial Version

Reported by: arango Owned by:
Priority: major Milestone: Release ROMS/TOMS 4.1
Component: Nonlinear Version: 4.0
Keywords: Cc:

Description

  • 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.

Change History (0)

Note: See TracTickets for help on using tickets.