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.
#1929 (O2L3P cfg. compilation crash with GCC in trcbc.f90) – NEMO

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#1929 closed Bug (fixed)

O2L3P cfg. compilation crash with GCC in trcbc.f90

Reported by: nicolasmartin Owned by: nicolasmartin
Priority: low Milestone:
Component: TOP Version: trunk
Severity: minor Keywords: compilation GCC
Cc: systeam

Description

Context


I gave a try to run ORCA2_LIM3_PISCES configuration for some tests on my personal laptop but failed to compile it successfully.

/home/ntm/Workspace/NEMO/trunk/NEMOGCM/CONFIG/O2L3P/BLD/ppsrc/nemo/trcbc.f90:90.38:

      NAMELIST/namtrc_bdy/ cn_trc_dflt, cn_trc, nn_trcdmp_bdy
                                      1
Error: NAMELIST attribute conflicts with ALLOCATABLE attribute in 'cn_trc_dflt' at (1)
/home/ntm/Workspace/NEMO/trunk/NEMOGCM/CONFIG/O2L3P/BLD/ppsrc/nemo/trcbc.f90:137.38:

         READ ( numnat_ref, namtrc_bdy, IOSTAT = ios, ERR = 903)
                                      1
Error: Symbol 'namtrc_bdy' at (1) has no IMPLICIT type


Analysis


My GCC compiler is a bit old (v4.4.7 20120313) and the Trusting monitoring couldn't detect it because it uses only ifort.

Fix


With Christian, we found a workaround by removing the dynamical allocation on trc.f90 (compliant with BDY routines)

  • ../NEMO/TOP_SRC/trc.F90

     
    99   !!---------------------------------------------------------------------- 
    1010   USE par_oce 
    1111   USE par_trc 
    12    USE bdy_oce, only: ln_bdy, nb_bdy, OBC_DATA 
     12   USE bdy_oce, only: jp_bdy, ln_bdy, nb_bdy, OBC_DATA 
    1313    
    1414   IMPLICIT NONE 
    1515   PUBLIC 
     
    168168   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::  avs_temp      !: salinity vertical diffusivity coeff. at w-point   [m/s] 
    169169# endif 
    170170   ! 
    171    CHARACTER(len=20), PUBLIC, ALLOCATABLE,  SAVE,  DIMENSION(:)   ::  cn_trc_dflt          ! Default OBC condition for all tracers 
    172    CHARACTER(len=20), PUBLIC, ALLOCATABLE,  SAVE,  DIMENSION(:)   ::  cn_trc               ! Choice of boundary condition for tracers 
    173    INTEGER,           PUBLIC, ALLOCATABLE,  SAVE,  DIMENSION(:)   ::  nn_trcdmp_bdy        !: =T Tracer damping 
     171   CHARACTER(len=20), PUBLIC, DIMENSION(jp_bdy) :: cn_trc_dflt   ! Default OBC condition for all tracers 
     172   CHARACTER(len=20), PUBLIC, DIMENSION(jp_bdy) :: cn_trc        ! Choice of boundary condition for tracers 
     173   INTEGER,           PUBLIC, DIMENSION(jp_bdy) :: nn_trcdmp_bdy !: =T Tracer damping 
    174174!$AGRIF_DO_NOT_TREAT 
    175175   ! External data structure of BDY for TOP. Available elements: cn_obc, ll_trc, trcnow, dmp 
    176176   TYPE(OBC_DATA),    PUBLIC, ALLOCATABLE, DIMENSION(:,:), TARGET ::  trcdta_bdy           !: bdy external data (local process) 
     
    205205         &      STAT = ierr(1)  ) 
    206206      ! 
    207207      IF ( ln_bdy ) THEN 
    208          ALLOCATE( cn_trc_dflt(nb_bdy)   , cn_trc(nb_bdy)     , nn_trcdmp_bdy(nb_bdy) ,       & 
    209          &      trcdta_bdy(jptra,nb_bdy)                                              ,       & 
    210          &      STAT = ierr(2)  ) 
     208         ALLOCATE( trcdta_bdy(jptra, jp_bdy), STAT = ierr(2) ) 
    211209      ENDIF 
    212210      ! 
    213211      IF (jp_dia3d > 0 ) ALLOCATE( trc3d(jpi,jpj,jpk,jp_dia3d), STAT = ierr(3) ) 

Commit History (2)

ChangesetAuthorTimeChangeLog
8665nicolasmartin2017-10-27T18:34:41+02:00

Fix for GCC compilation issue on O2L3P [close #1929]

8328rblod2017-07-13T13:32:56+02:00

Fix default config in makenemo see ticket #1929

Change History (10)

comment:1 Changed 5 years ago by flavoni

  • Resolution set to fixed
  • Status changed from new to closed

fix by rachid, see @8328.

comment:2 Changed 5 years ago by nicolasmartin

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:3 Changed 5 years ago by nicolasmartin

The r8328 does not concern this ticket, there is a typo in the ticket number.
Unfortunately Rachid is not able to fix a bug before we identified it :-P

comment:4 Changed 5 years ago by nicolasmartin

  • Owner changed from nemo to nicolasmartin
  • Status changed from reopened to assigned

comment:5 Changed 5 years ago by nicolasmartin

  • Milestone set to 2017 WP

comment:6 Changed 5 years ago by nicolasmartin

  • Milestone 2017 WP deleted
  • Resolution set to wontfix
  • Severity set to minor
  • Status changed from assigned to closed

Unable to reproduce the issue while trying just now with the same environment.

So the issue was somewhere else in the code and probably fixed by latest commits as trcbc.f90 has not evolved since last MP.

comment:7 Changed 5 years ago by nicolasmartin

  • Resolution wontfix deleted
  • Status changed from closed to reopened

Probably need a bit rest by the end of this week.

The issue were on trc.F90 and still there.

comment:8 Changed 5 years ago by nicolasmartin

  • Resolution set to fixed
  • Status changed from reopened to closed

In 8665:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:9 Changed 5 years ago by nicolasmartin

  • Cc systeam added

comment:10 Changed 5 years ago by nicolasmartin

The commit message has closed the ticket as expected with [close #1929] but no notification has been send.

Seems to be difficult to divert from Trac core thanks to plugins and get everything working as planned.

Note: See TracTickets for help on using tickets.