OrderN / CONQUEST-release

Full public release of large scale and linear scaling DFT code CONQUEST
http://www.order-n.org/
MIT License
94 stars 24 forks source link

pseudo_tm_info uses XC #313

Open tkoskela opened 3 months ago

tkoskela commented 3 months ago

The change made in #302 is missing XC_COMPFLAGS to pseudo_tm_info.o, since libxc is used in

https://github.com/OrderN/CONQUEST-release/blob/6bf8f4a8c20fd4fa8f1c7baeb8a6b1f23a6d2408/src/pseudo_tm_info.f90#L996-L997

The build fails on this for me on Kathleen

davidbowler commented 3 months ago

I don't understand why XC_COMPFLAGS is needed to compile this module: all it sets is some include paths which aren't needed for pseudo_tm_info.f90. What was the compilation error?

tkoskela commented 3 months ago

It looks like I'm only getting an error when I use LibXC_v4, with LibXC_v5 it builds without errors. The error is

mpif90 -c pseudo_tm_info.f90
pseudo_tm_info.f90(996): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [XC_F90_TYPES_M]
      use XC, ONLY: functional_lda_pw92, functional_gga_pbe96, functional_gga_pbe96_rev98, &
----------^
pseudo_tm_info.f90(1038): error #6406: Conflicting attributes or multiple declaration of name.   [FUNCTIONAL_LDA_PW92]
                     xc_func = functional_lda_pw92
-------------------------------^
pseudo_tm_info.f90(1040): error #6406: Conflicting attributes or multiple declaration of name.   [FUNCTIONAL_GGA_PBE96]
                     xc_func = functional_gga_pbe96
-------------------------------^
pseudo_tm_info.f90(1042): error #6406: Conflicting attributes or multiple declaration of name.   [FUNCTIONAL_GGA_PBE96_REV98]
                     xc_func = functional_gga_pbe96_rev98
-------------------------------^
pseudo_tm_info.f90(1044): error #6406: Conflicting attributes or multiple declaration of name.   [FUNCTIONAL_GGA_PBE96_R99]
                     xc_func = functional_gga_pbe96_r99
-------------------------------^
pseudo_tm_info.f90(1046): error #6406: Conflicting attributes or multiple declaration of name.   [FUNCTIONAL_GGA_PBE96_WC]
                     xc_func = functional_gga_pbe96_wc
-------------------------------^
pseudo_tm_info.f90(996): error #6580: Name in only-list does not exist or is not accessible.   [FUNCTIONAL_LDA_PW92]
      use XC, ONLY: functional_lda_pw92, functional_gga_pbe96, functional_gga_pbe96_rev98, &
--------------------^
pseudo_tm_info.f90(996): error #6580: Name in only-list does not exist or is not accessible.   [FUNCTIONAL_GGA_PBE96]
      use XC, ONLY: functional_lda_pw92, functional_gga_pbe96, functional_gga_pbe96_rev98, &
-----------------------------------------^
pseudo_tm_info.f90(996): error #6580: Name in only-list does not exist or is not accessible.   [FUNCTIONAL_GGA_PBE96_REV98]
      use XC, ONLY: functional_lda_pw92, functional_gga_pbe96, functional_gga_pbe96_rev98, &
---------------------------------------------------------------^
pseudo_tm_info.f90(997): error #6580: Name in only-list does not exist or is not accessible.   [FUNCTIONAL_GGA_PBE96_R99]
           functional_gga_pbe96_r99, functional_gga_pbe96_wc
-----------^
pseudo_tm_info.f90(997): error #6580: Name in only-list does not exist or is not accessible.   [FUNCTIONAL_GGA_PBE96_WC]
           functional_gga_pbe96_r99, functional_gga_pbe96_wc
-------------------------------------^
tkoskela commented 3 months ago

I admit I don't understand what the error is about. You are right that it's only trying to use some parameter values from the CONQUEST XC module. I double checked that with

mpif90 -I/shared/ucl/apps/libxc/4.2.3/intel-2018/include -c pseudo_tm_info.f90

It compiles successfully