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.
[AGRIF] `recipe for target 'lib_cray.f90' failed` – Message List – Discussion – NEMO

Beginner (#1) - [AGRIF] recipe for target 'lib_cray.f90' failed (#20) - Message List

[AGRIF] recipe for target 'lib_cray.f90' failed
 solved

Dear all,

i am trying to build NEMO with AGRIF from an existing setup, using the following CPP keys:

key_bdy key_vvl key_dynspg_ts key_ldfslp  key_zdfgls  key_diainstant key_mpp_mpi key_iomput key_traldf_c2d key_dynldf_c2d key_tide key_agrif

This leads to the following makenemo crash:

->Parse configuration: start
Config file (bld): /home/momo/NEMOGCM/TOOLS/COMPILE/bld_preproagr.cfg
Config file (bld): /home/momo/NEMOGCM/TOOLS/COMPILE/arch_nemo.fcm
Config file (bld): /home/momo/NEMOGCM/TOOLS/COMPILE/cpp.fcm
ERROR: /home/momo/NEMOGCM/TOOLS/COMPILE/bld_preproagr.cfg: LINE 35:
       bld::pp::nemo/agrif2model: invalid sub-package in declaration.
ERROR: /home/momo/NEMOGCM/TOOLS/COMPILE/bld_preproagr.cfg: LINE 82:
       bld::src_type::nemo/agrif2model.F90: invalid sub-package in declaration.
->Parse configuration: 0 second
->TOTAL: 0 second
Build failed on Tue Aug  1 12:46:03 2017

I thought that there's a key conflict between key_agrif and (key_bdy,key_tide,key_vvl) so i removed these keys but this did not solve the issue. Can anyone perhaps suggest what's going on?

Thanks, nice regards!

Matjaz

Tree View Flat View (newer first) Flat View (older first)
  • Message #219

    Robinson Hordoir came across this error again with NEMO 4.0. This solution worked for him. Posting it here in case others come across this in the future.

    if you have this line in your arch file:

    %FPPFLAGS            -P -C -traditional
    

    then just remove -C

    The root cause of this seems to be comments in the *.f90 files before the "MODULE" line.

  • Message #37

    Marked as solved without further updates.

  • Message #28

    Dear Nicolas,

    yes, i can compile ORCA2_LIM without key_agrif. My FCM file is as follows:

    # Ventus SGI HPC Custer, Slovenian Environment Agency
    #
    # NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
    # HDF5_HOME   root directory containing lib and include subdirectories for HDF5
    # XIOS_HOME   root directory containing lib for XIOS
    # OASIS_HOME  root directory containing lib for OASIS
    #
    # NCDF_INC    netcdf4 include file
    # NCDF_LIB    netcdf4 library
    # XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
    # XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
    # OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
    # OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
    #
    # FC          Fortran compiler command
    # FCFLAGS     Fortran compiler flags
    # FFLAGS      Fortran 77 compiler flags
    # LD          linker
    # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
    # FPPFLAGS    pre-processing flags
    # AR          assembler
    # ARFLAGS     assembler flags
    # MK          make
    # USER_INC    complete list of include files
    # USER_LIB    complete list of libraries to pass to the linker
    # CC          C compiler used to compile conv for AGRIF
    # CFLAGS      compiler flags used with CC
    #
    # Note that:
    #  - unix variables "$.." are accpeted and will be evaluated before calling fcm.
    #  - fcm variables are starting with a % (and not a $)
    #
    %NCDF_HOME           /sw/local/netcdf-4.4.1.1/
    %HDF5_HOME           /sw/local/hdf5-1.8.18-ifort
    %XIOS_HOME           /home/jjerman/compile/xios-1.0
    # %OASIS_HOME          $WORKDIR/now/models/oa3mct
    %NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include -I/sw/local/netcdf-fortran-4.4.4-ifort/include
    %NCDF_LIB            -L%NCDF_HOME/lib -lnetcdf -L/sw/local/netcdf-fortran-4.4.4-ifort/lib -lnetcdff -L%HDF5_HOME/lib -lhdf5_hl -lhdf5 -lhdf5
    %XIOS_INC            -I%XIOS_HOME/inc
    %XIOS_LIB            -L%XIOS_HOME/lib -lxios -lcurl
    # %OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
    # %OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
    %CPP               cpp
    %FC                  mpif90 -c -cpp
    # for Curie Fat Node
    #%FCFLAGS             -i4 -r8 -O3 -fp-model precise -xSSE4.2 
    # for Curie Thin Node
    #%FCFLAGS             -i4 -r8 -O3 -fp-model precise -xAVX
    # for Curie all Node
    %FCFLAGS             -i4 -r8 -O0 -fp-model precise
    %FFLAGS              %FCFLAGS
    %LD                  mpif90
    %LDFLAGS             -lstdc++
    %FPPFLAGS            -P -C -traditional
    %AR                  ar
    %ARFLAGS             rs
    %MK                  make
    # %USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
    %USER_INC            %XIOS_INC %NCDF_INC
    # %USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
    %USER_LIB            %XIOS_LIB %NCDF_LIB
    %CC                  cc
    %CFLAGS              -O0
    

    If you see anything incorrect, i'll be very grateful for your remarks.

    Matjaz

  • Message #27

    Hello Matjaz,

    I'm not sure your issue is related to the ticket you mentioned, and it will be better if someone can reproduce it before opening a ticket.

    What is your computing architecture ? Please add the content of FCM file you use to compile NEMO.
    Also could you confirm that you can compile ORCA2_LIM on standard mode (without key_agrif) ?

  • Message #26

    Dear Nicolas,

    i've tried both recipes you suggested and i end up with the same error i was mentioning above:

    ->Generate Fortran interface: start
    Use of uninitialized value in uc at /home/momo/NEMOGCM/EXTERNAL/fcm/bin/../lib/Fcm/BuildSrc.pm line 396.
    ->Generate Fortran interface: 0 second
    ->Make: start
    touch /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/flags/FC.flags
    touch /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/flags/FFLAGS.flags
    touch /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/flags/FFLAGS__nemo.flags
    touch /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/flags/FFLAGS__nemo__lib_cray.flags
    fcm_internal compile:F nemo /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/ppsrc/nemo/lib_cray.f90 lib_cray.f90
    /home/momo/NEMOGCM/TOOLS/COMPILE/agrifpp.sh  lib_cray.f90 /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/inc  /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/ppsrc/nemo/lib_cray.f90
    fcm_internal compile failed (256)
    /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/Makefile:1462: recipe for target 'lib_cray.f90' failed
    make: *** [lib_cray.f90] Error 1
    make -f /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/Makefile -j 1 all failed (2) at /home/momo/NEMOGCM/EXTERNAL/fcm/bin/../lib/Fcm/Build.pm line 597.
    ->Make: 0 second
    ->TOTAL: 23 seconds
    Build failed on Fri Aug 11 07:31:32 2017.
    /home/momo/NEMOGCM/CONFIG
    

    As I pointed out above, this error was already an object of an earlier ticket. Is this worth another ticket?

    Best regards,

    Matjaz

  • Message #25

    Wonderful, i'll try it this way, thanks so much for your reply!

  • Message #24

    Hi Matjaz,

    Perhaps someone might find this useful sometime: to include NST_SRC in the build one needs to modify ./CONFIG/cfg.txt source list next to the reference configuration...

    I'm not an AGRIF expert but you should not modified the engines selected (OPA, LIM, TOP, NST, ...) for the ref. cfgs. in cfg.txt. You have 2 proper ways to create your own AGRIF configuration with NST engine:

    • Based on a ORCA2_LIM ref. cfg.
      ./makenemo -n 'AGRIF' -r ORCA2_LIM add_key 'key_agrif' # LIM2
      
    • Directly from scratch by choosing your components
      ./makenemo -n 'AGRIF' -d 'OPA_SRC LIM_SRC_2 NST_SRC' add_key 'key_agrif' # LIM2
      
  • Message #22

    Perhaps someone might find this useful sometime: to include NST_SRC in the build one needs to modify ./CONFIG/cfg.txt source list next to the reference configuration...

    This unfortunately only led me to the following compilation fail:

    cm_internal compile:F nemo /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/ppsrc/nemo/lib_cray.f90 lib_cray.f90
    /home/momo/NEMOGCM/TOOLS/COMPILE/agrifpp.sh  lib_cray.f90 /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/inc  /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/ppsrc/nemo/lib_cray.f90
    fcm_internal compile failed (256)
    /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/Makefile:1435: recipe for target 'lib_cray.f90' failed
    make: *** [lib_cray.f90] Error 1
    make -f /home/momo/NEMOGCM/CONFIG/AGRIF/OPAFILES/Makefile -j 1 all failed (2) at /home/momo/NEMOGCM/EXTERNAL/fcm/bin/../lib/Fcm/Build.pm line 597.
    ->Make: 0 second
    ->TOTAL: 10 seconds
    Build failed on Mon Aug  7 11:37:31 2017.
    

    This might to be related to the ticket here #1530 which was marked as resolved but i still seem to be ending up with the same error. If anyone can help, i'd be much obliged...

    Regards, M.

  • Message #20

    Hi Tim,

    thanks very much for your reply. The NST_SRC is indeed not included in the build. Can you perhaps suggest how to include it properly? I suppose just linking the NST_SRC/* to WORK/* is not appropriate...

    matjaz

  • Message #18

    Hi Matjaz,

    I'm not sure about the cause of this but one thought comes to mind. Do you have the files from NST_SRC included in your build?

    You can check this by looking in /home/momo/NEMOGCM/CONFIG/NEW_AGRIF_CONFIG/WORK. You should see agrif2model.F90 as the first file (and a few more file names starting with agrif). If not you will need to add NST_SRC to your build.

    Tim

Tree View Flat View (newer first) Flat View (older first)

Attachments

No attachments created.