New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13573 for branches – NEMO

Changeset 13573 for branches


Ignore:
Timestamp:
2020-10-07T11:36:26+02:00 (4 years ago)
Author:
frrh
Message:

Avoid segfault in trdtra.F90

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package_cce877/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90

    r9163 r13573  
    8888      ! 
    8989      INTEGER  ::   jk   ! loop indices 
    90       REAL(wp), POINTER, DIMENSION(:,:,:)  ::   zwt, zws, ztrdt, ztrds   ! 3D workspace 
    91       !!---------------------------------------------------------------------- 
    92       ! 
    93       CALL wrk_alloc( jpi, jpj, jpk, ztrds ) 
     90      REAL(wp), POINTER, DIMENSION(:,:,:)  ::   zwt, zws, ztrdt  ! 3D workspace 
     91      REAL(wp), DIMENSION(jpi,jpj,jpk)  ::   ztrds   ! 3D workspace ! RSRH special work space 
     92                                                                    ! Converting this from "standard" pointer 
     93                                                                    ! workspace avoids crash with Cray cce8.7.7 
     94                                                                    ! for no obvious reason.  
     95                                                                    ! However, there's no point allocating  
     96                                                                    ! and deallocating this separately 
     97                                                                    ! as it's not optional, AS PER 
     98                                                                    ! CURRENT NEMO 4.0 trunk! 
     99      !!---------------------------------------------------------------------- 
     100      ! 
    94101      !       
    95102      IF( .NOT. ALLOCATED( trdtx ) ) THEN      ! allocate trdtra arrays 
     
    200207# endif 
    201208      ! 
    202       CALL wrk_dealloc( jpi, jpj, jpk, ztrds ) 
    203209      ! 
    204210   END SUBROUTINE trd_tra 
Note: See TracChangeset for help on using the changeset viewer.