Merge branch 'confifox' into 'develop'

[skip-CI] Added option --with-fox to configure

See merge request QEF/q-e!1901
This commit is contained in:
giannozz 2022-07-03 07:36:03 +00:00
commit ebfa3d8978
7 changed files with 89 additions and 29 deletions

View File

@ -378,7 +378,7 @@ common to all packages:
\texttt{KS\_Solvers/}& Iterative diagonalization routines\\ \texttt{KS\_Solvers/}& Iterative diagonalization routines\\
\texttt{UtilXlib/} & Miscellaneous timing, error handling, MPI utilites\\ \texttt{UtilXlib/} & Miscellaneous timing, error handling, MPI utilites\\
\texttt{XClib/} & Exchange-correlation functionals (excepted van der Waals)\\ \texttt{XClib/} & Exchange-correlation functionals (excepted van der Waals)\\
\texttt{MBD/} & Routines for many-body dispersions \texttt{MBD/} & Routines for many-body dispersions\\
\texttt{LR\_Modules/}& Fortran modules and utilities used by linear-response codes\\ \texttt{LR\_Modules/}& Fortran modules and utilities used by linear-response codes\\
\texttt{install/} & installation scripts and utilities\\ \texttt{install/} & installation scripts and utilities\\
\texttt{pseudo}/ & pseudopotential files used by examples\\ \texttt{pseudo}/ & pseudopotential files used by examples\\
@ -400,7 +400,7 @@ while others are specific to a single package:
\texttt{CPV/} & \CP\ package\\ \texttt{CPV/} & \CP\ package\\
\texttt{atomic/} & \texttt{atomic} package\\ \texttt{atomic/} & \texttt{atomic} package\\
\texttt{GUI/} & \texttt{PWGui} package\\ \texttt{GUI/} & \texttt{PWGui} package\\
\texttt{HP/} & \texttt{HP} package \texttt{HP/} & \texttt{HP} package\\
\texttt{QEHeat/} & \texttt{QEHeat} package\\ \texttt{QEHeat/} & \texttt{QEHeat} package\\
\texttt{KCW/} & \texttt{KCW} package \texttt{KCW/} & \texttt{KCW} package
\end{tabular} \end{tabular}
@ -503,10 +503,11 @@ in any \texttt{Makefile}, type \texttt{make depend}, or run
It is convenient to use "parallel make" to speed up compilation: It is convenient to use "parallel make" to speed up compilation:
\texttt{make -jN} compiles in parallel on N processors. Note that \texttt{make -jN} compiles in parallel on N processors. Note that
if you interrupt \make, depending upon what it was doing if you interrupt \make, you may run into trouble the next time you
you may run into trouble the next time you type \make (for instance, type \make (for instance, if \make\ is interrupted while unpacking
if \make\ is interrupted while unpacking and compiling the FoX library). and compiling an external library).
If so, run \texttt{make clean} before running \make\ again. If so, run \texttt{make clean}, or even \texttt{make distclean},
before running \make\ again.
You should always be able to compile the \qe\ suite You should always be able to compile the \qe\ suite
of programs without having to edit any of the generated files. However you of programs without having to edit any of the generated files. However you
@ -529,7 +530,7 @@ Some environment variables that are relevant to \configure\ are:
\begin{tabular}{ll} \begin{tabular}{ll}
\texttt{ARCH}& label identifying the machine type (see below)\\ \texttt{ARCH}& label identifying the machine type (see below)\\
\texttt{F90, F77, CC} &names of Fortran, Fortran-77, and C compilers\\ \texttt{F90, CC} &names of Fortran and C compilers\\
\texttt{MPIF90} & name of parallel Fortran 90 compiler (using MPI)\\ \texttt{MPIF90} & name of parallel Fortran 90 compiler (using MPI)\\
\texttt{CPP} & source file preprocessor (defaults to \$CC -E)\\ \texttt{CPP} & source file preprocessor (defaults to \$CC -E)\\
\texttt{LD} & linker (defaults to \$MPIF90)\\ \texttt{LD} & linker (defaults to \$MPIF90)\\
@ -557,8 +558,8 @@ compilation.
If your machine type is unknown to \configure, you may use the If your machine type is unknown to \configure, you may use the
\texttt{ARCH} \texttt{ARCH}
variable to suggest an architecture among supported ones. Some large variable to suggest an architecture among supported ones. Some
parallel machines using a front-end (e.g. Cray XT) will actually parallel machines using a front-end may actually
need it, or else \configure\ will correctly recognize the front-end need it, or else \configure\ will correctly recognize the front-end
but not the specialized compilation environment of those machines. but not the specialized compilation environment of those machines.
In some cases, cross-compilation requires to specify the target machine In some cases, cross-compilation requires to specify the target machine
@ -605,7 +606,8 @@ is between bracket:\\
\\ \\
and the following optional packages:\\ and the following optional packages:\\
\begin{tabular}{ll} \begin{tabular}{ll}
\texttt{--with-scalapack}& (yes$|$no$|$intel) Use scalapack if available. \\ \texttt{--with-fox} & Use official FoX library instead of built-in replacement (default:yes)\\
\texttt{--with-scalapack}& (yes$|$no$|$intel) Use scalapack if available. \\
&Set to \texttt{intel} to use Intel MPI and BLACS (default: use OpenMPI)\\ &Set to \texttt{intel} to use Intel MPI and BLACS (default: use OpenMPI)\\
\texttt{--with-elpa-include}& Specify full path of ELPA include and modules \texttt{--with-elpa-include}& Specify full path of ELPA include and modules
headers (no)\\ headers (no)\\

View File

@ -190,7 +190,7 @@ pw4gwwlib : phlibs
if test -d GWW ; then \ if test -d GWW ; then \
( cd GWW ; $(MAKE) pw4gwwa || exit 1 ) ; fi ( cd GWW ; $(MAKE) pw4gwwa || exit 1 ) ; fi
mods : libfox libutil libla libfft libupf libmbd librxc mods : $(FOX) libutil libla libfft libupf libmbd librxc
( cd Modules ; $(MAKE) TLDEPS= all || exit 1 ) ( cd Modules ; $(MAKE) TLDEPS= all || exit 1 )
libks_solvers : libutil libla libks_solvers : libutil libla

View File

@ -227,11 +227,6 @@ TLDEPS= libfox libla libfft libutil libmbd librxc libupf
all : libqemod.a all : libqemod.a
## The following is needed only for lapack compiled from sources
dlamch.o : dlamch.f
$(F77) $(FFLAGS_NOOPT) -c $<
libqemod.a: $(MODULES) $(OBJS) $(RISMLIB) libqemod.a: $(MODULES) $(OBJS) $(RISMLIB)
$(AR) $(ARFLAGS) $@ $? $(AR) $(ARFLAGS) $@ $?
$(RANLIB) $@ $(RANLIB) $@

1
install/aclocal.m4 vendored
View File

@ -26,6 +26,7 @@ m4_include([m4/x_ac_qe_environ.m4])
m4_include([m4/x_ac_qe_f90.m4]) m4_include([m4/x_ac_qe_f90.m4])
m4_include([m4/x_ac_qe_f90rule.m4]) m4_include([m4/x_ac_qe_f90rule.m4])
m4_include([m4/x_ac_qe_fft.m4]) m4_include([m4/x_ac_qe_fft.m4])
m4_include([m4/x_ac_qe_fox.m4])
m4_include([m4/x_ac_qe_hdf5.m4]) m4_include([m4/x_ac_qe_hdf5.m4])
m4_include([m4/x_ac_qe_lapack.m4]) m4_include([m4/x_ac_qe_lapack.m4])
m4_include([m4/x_ac_qe_ld.m4]) m4_include([m4/x_ac_qe_ld.m4])

77
install/configure vendored
View File

@ -664,6 +664,8 @@ mpi_line
mpi_libs mpi_libs
mass_line mass_line
mass_libs mass_libs
foxlibs
extfox
libxc_line libxc_line
LIBS_LIBXC LIBS_LIBXC
fft_line fft_line
@ -737,6 +739,7 @@ infodir
docdir docdir
oldincludedir oldincludedir
includedir includedir
runstatedir
localstatedir localstatedir
sharedstatedir sharedstatedir
sysconfdir sysconfdir
@ -773,8 +776,8 @@ enable_openacc
with_libxc with_libxc
with_libxc_prefix with_libxc_prefix
with_libxc_include with_libxc_include
with_fox
with_scalapack with_scalapack
with_scalapack_qrcp
with_elpa_include with_elpa_include
with_elpa_lib with_elpa_lib
with_elpa_version with_elpa_version
@ -835,6 +838,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc' sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com' sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var' localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include' includedir='${prefix}/include'
oldincludedir='/usr/include' oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@ -1087,6 +1091,15 @@ do
| -silent | --silent | --silen | --sile | --sil) | -silent | --silent | --silen | --sile | --sil)
silent=yes ;; silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;; ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@ -1224,7 +1237,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \ datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir libdir localedir mandir runstatedir
do do
eval ac_val=\$$ac_var eval ac_val=\$$ac_var
# Remove trailing slashes. # Remove trailing slashes.
@ -1377,6 +1390,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var] --localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib] --libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include] --includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include] --oldincludedir=DIR C header files for non-gcc [/usr/include]
@ -1435,6 +1449,7 @@ Optional Packages:
--with-libxc-include=DIR --with-libxc-include=DIR
Directory where libxc Fortran headers were Directory where libxc Fortran headers were
installed. installed.
--with-fox use FoX library (default: yes)
--with-scalapack (yes|no|intel) Use scalapack if available. Set to --with-scalapack (yes|no|intel) Use scalapack if available. Set to
"intel" to use Intel MPI and blacs (default: use "intel" to use Intel MPI and blacs (default: use
openMPI) openMPI)
@ -2352,7 +2367,7 @@ $as_echo "${arch}" >&6; }
try_dflags="" try_dflags=""
# Add needed include directories # Add needed include directories
try_iflags="-I. -I\$(TOPDIR)/include -I\$(TOPDIR)/FoX/finclude " try_iflags="-I. -I\$(TOPDIR)/include"
# Checking archiver... # Checking archiver...
@ -6316,6 +6331,40 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu
fi fi
# Setting FoX...
# Check whether --with-fox was given.
if test "${with_fox+set}" = set; then :
withval=$with_fox; if test "$withval" = "no" ; then
with_fox=0
else
with_fox=1
fi
else
with_fox=1
fi
# Use internal code for xml read/write
if test "$with_fox" -eq 0 ; then
try_dflags="$try_dflags -D__outfoxed"
extfox=""
foxlibs=""
else
extfox="libfox"
foxlibs="-L\$(TOPDIR)/FoX/lib -lFoX_dom -lFoX_sax -lFoX_wxml \
-lFoX_common -lFoX_utils -lFoX_fsys "
try_iflags="$try_iflags -I\$(TOPDIR)/FoX/finclude "
fi
# Checking for IBM MASS library... # Checking for IBM MASS library...
@ -7016,16 +7065,24 @@ fi
done done
# Enable QRCP with scalapack if --with-scalapack-qrcp==yes is set. # Enable QRCP with scalapack if --with-scalapack-qrcp==yes is set.
# Requires Scalapack >= 2.1.0 or MKL >= 2020, but the version is not checked.
# If an old version is used, QRCP results might be buggy. # Check whether --with-scalapack was given.
if test "${with_scalapack_qrcp+set}" = set; then : if test "${with_scalapack+set}" = set; then :
withval=$with_scalapack_qrcp withval=$with_scalapack; if test "$withval" = "yes" ; then
if test "$withval" = "yes" && test "$have_scalapack" -eq 1; then with_scalapack_qrcp=1
try_dflags="$try_dflags -D__SCALAPACK_QRCP" else
fi with_scalapack_qrcp=0
fi
else
with_scalapack_qrcp=0
fi fi
if test "$have_scalapack" -eq 1 && test "$with_scalapack_qrcp" -eq 1; then
try_dflags="$try_dflags -D__SCALAPACK_QRCP"
fi
# Configuring output message # Configuring output message
if test "$have_scalapack" -eq 1; then if test "$have_scalapack" -eq 1; then
scalapack_line="SCALAPACK_LIBS=$scalapack_libs" scalapack_line="SCALAPACK_LIBS=$scalapack_libs"

View File

@ -27,7 +27,7 @@ X_AC_QE_ARCH()
try_dflags="" try_dflags=""
# Add needed include directories # Add needed include directories
try_iflags="-I. -I\$(TOPDIR)/include -I\$(TOPDIR)/FoX/finclude " try_iflags="-I. -I\$(TOPDIR)/include"
# Checking archiver... # Checking archiver...
X_AC_QE_AR() X_AC_QE_AR()
@ -73,6 +73,9 @@ X_AC_QE_FFT()
# Setting libxc... # Setting libxc...
ACX_LIBXC() ACX_LIBXC()
# Setting FoX...
X_AC_QE_FOX()
# Checking for IBM MASS library... # Checking for IBM MASS library...
X_AC_QE_MASS() X_AC_QE_MASS()

View File

@ -157,8 +157,10 @@ FFT_LIBS = @fft_libs@
# HDF5 # HDF5
HDF5_LIBS = @hdf5_libs@ HDF5_LIBS = @hdf5_libs@
FOX_LIB = -L$(TOPDIR)/FoX/lib -lFoX_dom -lFoX_sax -lFoX_wxml -lFoX_common\
-lFoX_utils -lFoX_fsys # FOX
FOX = @extfox@
FOX_LIB = @foxlibs@
FOX_FLAGS = @foxflags@ FOX_FLAGS = @foxflags@
# ENVIRON # ENVIRON