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.
#2201 (Compilation failure (lib_mpp, iom etc)) – NEMO

Opened 5 years ago

Last modified 5 years ago

#2201 closed Defect

Compilation failure (lib_mpp, iom etc) — at Version 1

Reported by: rblod Owned by: systeam
Priority: normal Milestone: Unscheduled
Component: LBC Version: trunk
Severity: major Keywords: compilation
Cc:

Description (last modified by rblod)

Context

Compilation fails with gfortran 4.8 and key_mpp_mpi activated with message:
CHARACTER(len=*), DIMENSION(nbdelay), PUBLIC :: c_delaylist = (/ 'cflice', 'fwb'/)

1

Error: Different CHARACTER lengths (6/3) in array constructor at (1)

Same error in iom_nf90.f90 and may other places with same initialisation using character array constructor

Analysis

my guess, It's not allowed by fortran standard (just an intel extension)

Recommendation

Not sure, this syntax makes it but is f2003 : CHARACTER(len=*), DIMENSION(nbdelay), PUBLIC :: c_delaylist = (/ character(32):: 'cflice', 'fwb'/)

Commit History (1)

ChangesetAuthorTimeChangeLog
10521smasson2019-01-16T08:58:14+01:00

trunk: bugfix for compilation with (at least) gcc, see #2201

Change History (1)

comment:1 in reply to: ↑ description Changed 5 years ago by rblod

  • Description modified (diff)

Replying to rblod:

Context

Compilation fails with gfortran 4.8 and key_mpp_mpi activated with message:
CHARACTER(len=*), DIMENSION(nbdelay), PUBLIC :: c_delaylist = (/ 'cflice', 'fwb'/)

1

Error: Different CHARACTER lengths (6/3) in array constructor at (1)

Same error in iom_nf90.f90 and may other places with same initialisation using character array constructor

Analysis

my guess, It's not allowed by fortran standard (just an intel extension)

Recommendation

Not sure, this syntax makes it but is f2003

CHARACTER(len=32), DIMENSION(nbdelay), PUBLIC
c_delaylist = (/character(32):: 'cflice', 'fwb' /)

Note: See TracTickets for help on using tickets.