Main menu

Navigation

CESM 1.2 and GNU Compilers Issue

1 post / 0 new
mordech3@...
CESM 1.2 and GNU Compilers Issue

Hello Everyone,

 

Yesterday I managed to port CESM 1.2 and have it running on our local cluster, here at NBI, Copenhagen.

For the sake of simplicity, I used GNU compilers set (gfortran etc., version 4.6.3, it's Ubuntu 12.04 LTS) to compile the software, including NetCDF and HDF5.

A simple example was running using MPI as described on the website (User Guide).

 

However, few issues came up while porting:

1) Had to specify additional flags for FORTRAN code compilation to succeed: -fno-range-check -fcray-pointer

    Otherwise, compilation would fail, with arithmetic error (some bit representation of infinite doubles/floats), or some usage of pointers.

2) Had to modify models/ocn/pop2/mpi/mpi2s_gshalo.F90, since handle variable is defined with intent(in), but requires to be (inout), since structure fields are being assigned to in the code.

    I read that gfortran had some compilation bug for misinterpreting intents for pointers in different cases, but it might be for older versions. From my unprofessional perspective, it looks like a reasonable issue.

    Still, I suppose that no one had experienced such behavior with other vendor's compilers.

 

I attach an svn diff for that file:

"

Index: models/ocn/pop2/mpi/mpi2s_gshalo.F90
===================================================================
--- models/ocn/pop2/mpi/mpi2s_gshalo.F90    (revision 161)
+++ models/ocn/pop2/mpi/mpi2s_gshalo.F90    (working copy)
@@ -71,7 +71,7 @@
 
 ! !INPUT PARAMETERS:
 
-      type (Schedule_t), intent(in) :: handle
+      type (Schedule_t), intent(inout) :: handle
       real(r8), intent(inout) :: array(:)
       integer(i4), intent(in), optional :: mytag !tag for messages
 
@@ -142,7 +142,7 @@
 
 
 ! !INPUT PARAMETERS:
-      type (Schedule_t), intent(in) :: handle
+      type (Schedule_t), intent(inout) :: handle
       integer(i4), intent(inout) :: array(:)
       integer(i4), intent(in), optional :: mytag !tag for messages
      
@@ -260,7 +260,7 @@
      
 ! !INPUT PARAMS
 
-      type (Schedule_t), intent(in) :: handle
+      type (Schedule_t), intent(inout) :: handle
       real(r8), intent(inout) :: array(:)
       integer(i4), intent (in) :: a_size
       integer(i4), intent(in), optional::  tag

"

 

Any comments are welcome.

Regards,

Moti.

Who's new

  • lwheele@...
  • afroberts@...
  • richard.allard@...
  • tracy@...
  • 498749303@...