OrderN / CONQUEST-release

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

Question: compiling tools #158

Closed VictorEijkhout closed 1 year ago

VictorEijkhout commented 1 year ago
mpif90 -O3 -I/usr/local/include -c radial_xc_LibXC_v4_module.f90
ifort: command line warning #10006: ignoring unknown option '-fallow-argument-mismatch'
radial_xc_LibXC_v4_module.f90(4): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [XC_F90_TYPES_M]
  use xc_f90_types_m
------^

I'm not finding this module anywhere in the source. How do I proceed?

smujahed commented 1 year ago

Hi @VictorEijkhout

Would you be able to upload your system.make file here? There may be an issue with your LibXC, either at the point it is linked OR LibXC may have been compiled with a different compiler. The end of the first line looks like it's not finding the LibXC library, so appears to be a linking issue, do you know the path to your LibXC library?

Sorry I can't be of more help right now, but with the system.make file and some more questions I'm sure we can sort this out.

All the best, Shereif.

VictorEijkhout commented 1 year ago

I'm trying to use the internal XC library as it says on your web page:

#

# Set compilers
FC=mpif90
F77=mpif77

# Linking flags
LINKFLAGS=
## -L/usr/local/lib
ARFLAGS=

# Compilation flags
# NB for gcc10 you need to add -fallow-argument-mismatch
COMPFLAGS= -O2 -g $(XC_COMPFLAGS)
COMPFLAGS_F77= $(COMPFLAGS)

# Set BLAS and LAPACK libraries
# MacOS X
# BLAS= -lvecLibFort
# Intel MKL use the Intel tool
BLAS = -mkl
# Generic
# BLAS= -llapack -lblas

# Full library call; remove scalapack if using dummy diag module
LIBS= $(FFT_LIB) $(XC_LIB) $(BLAS) \
    -L${TACC_MKL_LIB} \
    -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 \-lpthread
##  VLE -lscalapack

# LibXC compatibility (LibXC below) or Conquest XC library

# Conquest XC library
XC_LIBRARY = CQ
#XC_LIB =
#XC_COMPFLAGS =

# LibXC compatibility
# Choose LibXC version: v4 or v5
# XC_LIBRARY = LibXC_v4
# XC_LIBRARY = LibXC_v5
# XC_LIB = -lxcf90 -lxc
# XC_COMPFLAGS = -I/usr/local/include

# Set FFT library
FFT_LIB= -L${LMOD_FFTW3_LIB} -lfftw3
FFT_OBJ=fft_fftw3.o

# Matrix multiplication kernel type
MULT_KERN = default
# Use dummy DiagModule or not
DIAG_DUMMY =
smujahed commented 1 year ago

OK, so it looks like XC_COMPFLAGS was left commented out. Could you uncomment that, make clean, then make and report back? It would also be useful to know a little more about the CONQUEST code version (commit hash), compiler and libraries (with versions) used to compile.

Just for clarification, are you compiling CONQUEST's main code (src/) or just the tools (tools/)? My apologies, the issue title could be interpreted either way and we can better help with this clarification.

VictorEijkhout commented 1 year ago

I'm compiling main code & tools. the XC_COMPFLAGS only includes /usr/local/include. I really doubt that Conquest fortran modules are there. In fact, I can't find the xc_f90_lib_m module anywhere in the source tree.

Code version: I'm using the repo version from a couple of days ago. The top entry in the git log is 3a6e1f697e0bd3fd1101715e56bf3c7b7a7fde63

davidbowler commented 1 year ago

You need to set the following in system.make:

XC_LIBRARY = CQ XC_LIB = XC_COMPFLAGS =

Then please try make clean and then make

davidbowler commented 1 year ago

LibXC is not something that we provide with Conquest, but it is easily downloaded and compile (and is often on large HPC installations or in distributions). Once you have identified the LibXC location, the include path (which you need to set for your system) should pick up the module files.