Cannot build ET: Assumed-rank argument requires an explicit interface at (1)

Create issue
Issue #2455 resolved
He Jia created an issue

Hi ET Experts,

I’m trying to build ET, on RHEL 7.3 with GCC 4.8.5, but encountered the following issue:

COMPILING Cactus/util/PointerTo.F90
/gpfs/share/home/1600011339/EinsteinToolkit/Cactus/configs/sim/build/Cactus/util/PointerTo.f90:6.27:

  address = transfer(c_loc(var), address)
                           1
Error: Assumed-rank argument requires an explicit interface at (1)
make[3]: *** [PointerTo.F90.o] Error 1
make[2]: *** [util/make.checked] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/gpfs/share/home/1600011339/EinsteinToolkit/Cactus/configs/sim/lib/libthorn_Cactus.a] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [sim] Error 2

I once successfully built ET on the same machine a few months ago, so I guess it’s some recent updates in PointerTo.F90 that leads to this issue. Please let me know if you need any other information to debug this, thanks!

Comments (12)

  1. Roland Haas

    This code as added to support gfortran-10.

    I am not quite sure I fully understand the error message that gfortran-4.8.5 produces, namely the code that it complains about is:

    CCTK_POINTER function CCTK_PointerTo(var)
      use iso_c_binding, only: c_loc
    
      implicit none
    
      type(*), dimension(..), TARGET :: var
      CCTK_POINTER :: address
    
      address = transfer(c_loc(var), address)
    
      CCTK_PointerTo = address
    end function
    

    which has full specification for var and an interface for c_loc from the iso_c_binding module.

    If possible I would suggest using a newer compiler, eg gfortran-6 should work. If that is not possible you will have to either go back to check out ET_2020_05_v0 instead of the branch ET_2020_05 or (manually) edit configs/sim/config-data/cctk_Config.h and change HAVE_CCTK_F_TYPE_STAR from 1 to 0.

  2. Roland Haas

    Note: search for the error string with Google finds: https://gcc.gnu.org/legacy-ml/fortran/2012-06/msg00144.html which has

    @@ -2990,6 +3008,15 @@ gfc_procedure_use (gfc_symbol *sym, gfc_actual_arglist **ap, locus *where)
              gfc_error ("MOLD argument to NULL required at %L", &a->expr->where);
              return;
            }
    +
    +     /* TS 29113, C407b.  */
    +     if (a->expr && a->expr->expr_type == EXPR_VARIABLE
    +         && symbol_rank (a->expr->symtree->n.sym) == -1)
    +       {
    +         gfc_error ("Assumed-rank argument requires an explicit interface "
    +            "at %L", &a->expr->where);
    +         return;
    +       }
        }
    
           return;
    

    and text in the email seems to indicate that the code is not fully functional at that point: “it only adds parsing support for "dimension(..)" and a sorry message.”

    Support for assumed-rank was only experimental in gfortran-4.8: https://gcc.gnu.org/wiki/GFortran/News#gfortran_4.8

  3. Roland Haas

    This pull request contains a workaround for master:

    https://bitbucket.org/cactuscode/cactus/pull-requests/109/cactus-test-full-cctk_pointerto-function

    it ends up testing the full code for CCTK_PointerTo in configure and only enables it if it compiles. Compilers that do not support it are assumed old enough to not enforce consistent arguments to Fortran subroutines and the flesh falls back to the pre-gfortran-10 code for CCTK_PointerTo in the same way it does if a compiler does not support type(*) or dimension(..).

  4. Roland Haas

    Downgrading this since the only compiler affected is gcc 4.8, which is very old. gcc 4.9 is fine, all machines in the release announcement are fine.

  5. He Jia reporter

    Thanks for the information! I just did git fetch && git checkout rhaas/test_full_pointerto under Cactus/repos/flesh/ and tried to rebuild ET (still using GCC 4.8.5), but then got the following error:

    ********************************************************************************
    Running configuration script for thorn HDF5:
    Additional requested language support:  Fortran
    HDF5 selected, but HDF5_DIR not set. Checking pkg-config ...
    HDF5 not found. Checking standard paths ...
    HDF5 found.
    Finished running configuration script for thorn HDF5.
    Checking consistency...
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "GiRaFFEfood" attempted to EXTEND or USE parameter "GAMMA_SPEED_LIMIT" from implementation "GIRAFFE" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "GiRaFFEfood" attempted to EXTEND or USE parameter "KerrSchild_radial_shift" from implementation "SHIFTEDKERRSCHILD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "GiRaFFEfood" attempted to EXTEND or USE parameter "BH_mass" from implementation "SHIFTEDKERRSCHILD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "GiRaFFEfood" attempted to EXTEND or USE parameter "BH_spin" from implementation "SHIFTEDKERRSCHILD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_GiRaFFE" attempted to EXTEND or USE parameter "Sym_Bz" from implementation "GIRAFFE" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_GiRaFFE" attempted to EXTEND or USE parameter "GAMMA_SPEED_LIMIT" from implementation "GIRAFFE" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "rho_b_max" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "rho_b_atm" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "tau_atm" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "K_poly" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "neos" from implementation "ILLINOISGRMHD" having type "INT" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "gamma_th" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "Sym_Bz" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "GAMMA_SPEED_LIMIT" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "Psi6threshold" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "update_Tmunu" from implementation "ILLINOISGRMHD" having type "BOOLEAN" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ML_BSSN_Helper" attempted to EXTEND or USE parameter "conformalMethod" from implementation "ML_BSSN" having type "INT" using incorrect type "REAL"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ML_CCZ4_Helper" attempted to EXTEND or USE parameter "conformalMethod" from implementation "ML_CCZ4" having type "INT" using incorrect type "REAL"
    
    
    
    ------------------------------------------------------
    There were 18 errors during execution of the CST
    These must be corrected before compilation can proceed
    ------------------------------------------------------
    
    
    
    ------------------------------------------------------
    Warnings were generated during execution of the CST
    ------------------------------------------------------
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "GiRaFFEfood" attempted to EXTEND or USE parameter "GAMMA_SPEED_LIMIT" from implementation "GIRAFFE" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "GiRaFFEfood" attempted to EXTEND or USE parameter "KerrSchild_radial_shift" from implementation "SHIFTEDKERRSCHILD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "GiRaFFEfood" attempted to EXTEND or USE parameter "BH_mass" from implementation "SHIFTEDKERRSCHILD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "GiRaFFEfood" attempted to EXTEND or USE parameter "BH_spin" from implementation "SHIFTEDKERRSCHILD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_GiRaFFE" attempted to EXTEND or USE parameter "Sym_Bz" from implementation "GIRAFFE" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_GiRaFFE" attempted to EXTEND or USE parameter "GAMMA_SPEED_LIMIT" from implementation "GIRAFFE" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "rho_b_max" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "rho_b_atm" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "tau_atm" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "K_poly" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "neos" from implementation "ILLINOISGRMHD" having type "INT" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "gamma_th" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "Sym_Bz" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "GAMMA_SPEED_LIMIT" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "Psi6threshold" from implementation "ILLINOISGRMHD" having type "REAL" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ID_converter_ILGRMHD" attempted to EXTEND or USE parameter "update_Tmunu" from implementation "ILLINOISGRMHD" having type "BOOLEAN" using incorrect type "KEYWORD"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ML_BSSN_Helper" attempted to EXTEND or USE parameter "conformalMethod" from implementation "ML_BSSN" having type "INT" using incorrect type "REAL"
    
    
    CST error in /gpfs/share/home/1600011339/EinsteinToolkit/Cactus/repos/flesh/lib/sbin/ImpParamConsistency.pl (at 81)
      -> Thorn "ML_CCZ4_Helper" attempted to EXTEND or USE parameter "conformalMethod" from implementation "ML_CCZ4" having type "INT" using incorrect type "REAL"
    
    ------------------------------------------------------
    
    make[1]: *** [/gpfs/share/home/1600011339/EinsteinToolkit/Cactus/configs/sim/config-data/make.thornlist] Error 1
    make: *** [sim] Error 2
    

  6. Roland Haas

    @He Jia these errors indicate that your wvuthorns and other repositorys (mclachlan) is not on the newest master and in particular is lacking some commits.

    I am afraid the branch rhaas/test_full_pointerto is only applicable to a master checkout of the toolkit and not an ET_2020_05 checkout.

    For using the release code, and if you really need to use the old gcc 4.8 compiler (which I advise against), please try one of the two alternatives I had suggested: if that is not possible you will have to either go back to check out ET_2020_05_v0 instead of the branch ET_2020_05 or (manually) edit configs/sim/config-data/cctk_Config.h and change HAVE_CCTK_F_TYPE_STAR from 1 to 0.

    Note that in my tests gcc 4.9 works fine with the release code.

    To checkout out ET_2020_05_v0 (not the _v0) you will have to edit the thornlist einsteintoolkit.th that GetComponents uses to set RELEASE_BRANCH to ET_2020_05_v0 instead of ET_2020_05.

  7. He Jia reporter

    @Roland Haas Thanks for the super detailed explanation! Finally I solved this issue by switching to gcc 7.2.0.

  8. Log in to comment