Main menu

Navigation

Compiling CESM 1.2.2 using Cray compiler fails

4 posts / 0 new
Last post
bleisch@...
Compiling CESM 1.2.2 using Cray compiler fails
Hi,
I'm currently performing some CESM 1.2.2 benchmark tests with different compilers on CSCS - Piz Daint machine (Cray XC40 Nodes) using:
COMPSET=B_1850_BGC-BPRP
RES=0.9x1.25_gx1v6

Everything works with Intel, PGI and GNU compilers.
However, if I use Cray-compiler (with cce 8.5.5), building fails: ... Thu Mar 2 16:53:42 CET 2017 /scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_768_128//ocn.bldlog.170302- 164144 ERROR: pop2.buildexe.csh failed, see /scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_768_128//ocn.bldlog.170302- 164144 ERROR: cat /scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_768_128//ocn.bldlog.170302- 164144 in ocn.bldlog.170302-164144: ... ftn-320 crayftn: ERROR ECOSYS_SET_INTERIOR, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_768_128_10/ocn/source/ecosys_mod.F90, Line = 3979, Column = 53 A vector subscript must be a rank 1 integer expression. ftn-320 crayftn: ERROR ECOSYS_SET_INTERIOR, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_768_128_10/ocn/source/ecosys_mod.F90, Line = 4018, Column = 57 A vector subscript must be a rank 1 integer expression. ... Here the problematic code lines of ecosys.mod: (the %C_ind seems to be the problem) --- Line 3979: + sum(DTRACER_MODULE(:,:,autotrophs(:)*%C_ind*), dim=3) ... Line 4018: + Q * sum(DTRACER_MODULE(:,:,autotrophs(:)*%C_ind*), dim=3) ---
Attached: - log of compilation(BMTEST...log) - ocn.bld.log
bleisch@...

Thanks to Andreas Jocksch (CSCS) I could solve the problem with ecosys.mod:

The problem seems to be that %C_ind is real(kind=8) while an integer is expected. If one add int(), it compiles:

original: sum(DTRACER_MODULE(:,:,autotrophs(:)*%C_ind*), dim=3)

corrected: sum(DTRACER_MODULE(:,:,int(autotrophs(:)*%C_ind*)), dim=3)

bleisch@...

However, compiling now fails at another file:

ftn-790 crayftn: WARNING RI_IWMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 1246, Column = 16
  Unknown or unsupported compiler directive or syntax error.


ftn-790 crayftn: WARNING RI_IWMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 1248, Column = 16
  Unknown or unsupported compiler directive or syntax error.


ftn-790 crayftn: WARNING RI_IWMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 1453, Column = 13
  Unknown or unsupported compiler directive or syntax error.


ftn-1379 crayftn: ERROR RI_IWMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 1455, Column = 10
  The DO-variable was not specified in the COLLAPSE list preceding this loop nest.


ftn-790 crayftn: WARNING RI_IWMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 1456, Column = 13
  Unknown or unsupported compiler directive or syntax error.


ftn-1379 crayftn: ERROR BLDEPTH, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 1737, Column = 10
  The DO-variable was not specified in the COLLAPSE list preceding this loop nest.


ftn-1379 crayftn: ERROR BLDEPTH, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 1915, Column = 13
  The DO-variable was not specified in the COLLAPSE list preceding this loop nest.


ftn-1379 crayftn: ERROR BLDEPTH, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 1928, Column = 13
  The DO-variable was not specified in the COLLAPSE list preceding this loop nest.


ftn-1379 crayftn: ERROR BLMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 2288, Column = 10
  The DO-variable was not specified in the COLLAPSE list preceding this loop nest.


ftn-1379 crayftn: ERROR BLMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 2301, Column = 10
  The DO-variable was not specified in the COLLAPSE list preceding this loop nest.


ftn-1379 crayftn: ERROR BLMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 2337, Column = 13
  The DO-variable was not specified in the COLLAPSE list preceding this loop nest.


ftn-1379 crayftn: ERROR BLMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 2386, Column = 13
  The DO-variable was not specified in the COLLAPSE list preceding this loop nest.


ftn-1379 crayftn: ERROR BLMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 2465, Column = 10
  The DO-variable was not specified in the COLLAPSE list preceding this loop nest.


ftn-1379 crayftn: ERROR BLMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 2493, Column = 7
  The DO-variable was not specified in the COLLAPSE list preceding this loop nest.


ftn-1379 crayftn: ERROR BLMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 2504, Column = 7
  The DO-variable was not specified in the COLLAPSE list preceding this loop nest.


ftn-1379 crayftn: ERROR BLMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 2546, Column = 10
  The DO-variable was not specified in the COLLAPSE list preceding this loop nest.


ftn-790 crayftn: WARNING BLMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 2583, Column = 13
  Unknown or unsupported compiler directive or syntax error.


ftn-790 crayftn: WARNING BLMIX, File = ../../../scratch/snx3000/rbleisch/cesm1.2/BMTEST_BGC_daint_cray_pes_blumer_10/ocn/source/vmix_kpp.F90, Line = 2585, Column = 13
  Unknown or unsupported compiler directive or syntax error.

Cray Fortran : Version 8.5.x.x (20161018192458_ea2a5395960bcf0b21601dab3dff40dd5608597c)
Cray Fortran : Tue Mar 14, 2017  09:04:31
Cray Fortran : Compile time:  0.2720 seconds
Cray Fortran : 3543 source lines
Cray Fortran : 13 errors, 6 warnings, 0 other messages, 0 ansi
Cray Fortran : "explain ftn-message number" gives more information about each message.
/users/rbleisch/cesm1_2_2/scripts/BMTEST_BGC_daint_cray_pes_blumer_10/Tools/Makefile:652: recipe for target 'vmix_kpp.o' failed
gmake: *** [vmix_kpp.o] Error 1
gmake: *** Waiting for unfinished jobs....

there seems to be an issue with some declarations in ocn/source/vmix_kpp.F90

Attached:

- vmix_kpp.F90

- ocn.bld.log

bleisch@...

I could solve this issue by editing vmix_kpp.F90 as following:

- replace all "!DIR$ NODEP" directives by "!DIR$ IVDEP"
- add "(i,j)" to all "!DIR$ COLLAPSE" directives: => "!DIR$ COLLAPSE (i,j)"

Afterwards compilation stops at building rof:
  
  rof.bldlog.xx:
  ftn-505 crayftn: ERROR RTMINI, File = ../../../users/rbleisch/cesm1_2_2/models/rof/rtm/src/riverroute/RtmMod.F90, Line = 402, Column = 15
  Continuation of character context in free source form requires an "&" as the first nonblank character of the next line.

This can be fixed by adapting models/rof/rtm/src/riverroute/RtmMod.F90:
  add a "&" at the begin of line 402
 

Then it stops at building cesm.exe:

cesm.bldlog.xx:
csm_comp_mod.o: In function `t_drvstartf$ccsm_comp_mod_clone_119791_80_':
/users/rbleisch/cesm1_2_2/models/drv/driver/ccsm_comp_mod.F90:2862: undefined reference to `omp_in_parallel_'
...

 

cray-compiler seems to use openmp by default.

As I use MPICH, I had to add a flag "-h noomp" to CPPDEFS,CFLAGS,FFLAGS and LDFLAGS, then it finally worked!

Log in or register to post comments

Who's new

  • xjliu@...
  • raytl@...
  • zhoujian-315@...
  • jonny.williams@...
  • climlee77@...