Menu

Error in compiling elk-8.8.26

Elk Users
2023-05-29
2023-05-29
  • Mohamed Elhanoty

    Dear Elk community,
    I try to compile elk-8.8.26 on my local computer using the gfortran compiler (version 11.3.0) on Ubuntu 11.3.0-1ubuntu1~22.04.1 but it fails due to some errors in routines related to the type of the variables. For example,
    hartfock.f90:199:17:

    123 | call mpi_bcast(evalsv(:,ik),nstsv,mpi_double_precision,lp,mpicom,ierror)
    | 2
    ......
    199 | call mpi_bcast(tlast,1,mpi_logical,0,mpicom,ierror)
    | 1
    Error: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/REAL(8)).


    Note that when I remove the file hartfock.f90 from the Makefile inside the src directroy, i get similar errors with other variables in other subroutines.

    I use the attached make.inc
    I appreciate your help to fix that

     

    Last edit: Mohamed Elhanoty 2023-05-29
  • J. K. Dewhurst

    J. K. Dewhurst - 2023-05-29

    Hi Mohamed,

    This is an annoyance that was added to gfortran version 10 and up. You now have to include the option

    -fallow-argument-mismatch
    

    with the gfortran command line to compile Elk.

    Regards,
    Kay.

     
  • Mohamed Elhanoty

    Hi Kay,
    Thanks for the reply and suggestion. It indeed worked.
    Best regards

     

Log in to post a comment.