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.
#2617 (PPR does not compile with gcc) – NEMO

Opened 4 years ago

Closed 4 years ago

#2617 closed Bug (fixed)

PPR does not compile with gcc

Reported by: smasson Owned by: systeam
Priority: low Milestone:
Component: MULTIPLE Version: trunk
Severity: minor Keywords:
Cc:

Description (last modified by smasson)

Context

There are multiple errors messages when compiling PPR with gcc

Error: Type mismatch in argument 'aa' at (1); passed REAL(16) to REAL(8)

Analysis

PPR uses the notation .d (for example 1.d0) to promote double precision.
As NEMO is compiled in double precision by default, this means that these ".d" variables are promoted to real*16.
All reals in PPR are declared as real*8 which creates the compilation error seen above.

Note that ifort does not complain when compiling PPR but I guess it is doing implicite real*8 <-> real*16 conversions...

Fix

replace all .d by a .e in all PPR/src files, for example with this small piece of shell :

for ff in ext/PPR/src/*90
do
   sed -e "s/\.d/.e/g" $ff > tmp
   mv tmp $ff
done

Commit History (1)

ChangesetAuthorTimeChangeLog
14387smasson2021-02-03T16:51:56+01:00

PPR: suppress real*8 <-> real*16 compilation errors or implicit conversions, see #2617

Change History (3)

comment:1 Changed 4 years ago by smasson

  • Description modified (diff)

comment:2 Changed 4 years ago by smasson

In 14387:

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

comment:3 Changed 4 years ago by smasson

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.