Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

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.
 
Top