9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-21 11:03:29 +01:00

Merge branch 'dev-stable' of github.com:quantumpackage/qp2 into dev-stable

This commit is contained in:
Anthony Scemama 2023-11-10 14:34:25 +01:00
commit bcdc172aec
288 changed files with 230 additions and 41 deletions

4
bin/python Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
exec python3 $@

View File

@ -127,6 +127,7 @@ def main(arguments):
l_repository = list(d_tmp.keys()) l_repository = list(d_tmp.keys())
if l_repository == []: if l_repository == []:
l_result = [] l_result = []
l_plugins = []
else: else:
m_instance = ModuleHandler(l_repository) m_instance = ModuleHandler(l_repository)
l_plugins = [module for module in m_instance.l_module] l_plugins = [module for module in m_instance.l_module]

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
export QP_ROOT=$(dirname "$(readlink -f "$0")")/.. REALPATH=$( cd "$(dirname "$0")" ; pwd -P )
export QP_ROOT=${REALPATH}/..
bash --init-file <(cat << EOF bash --init-file <(cat << EOF
[[ -f /etc/bashrc ]] && source /etc/bashrc [[ -f /etc/bashrc ]] && source /etc/bashrc

23
bin/zcat Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
# On Darwin: try gzcat if available, otherwise use Python
if [[ $(uname -s) = Darwin ]] ; then
which gzcat &> /dev/null
if [[ $? -eq 0 ]] ; then
exec gzcat $@
else
exec python3 << EOF
import sys
import gzip
with gzip.open("$1", "rt") as f:
print(f.read())
EOF
fi
else
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
command=$(which -a zcat | grep -v "$SCRIPTPATH/" | head -1)
exec $command $@
fi

View File

@ -10,7 +10,7 @@
# #
# #
[COMMON] [COMMON]
FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native -std=legacy
LAPACK_LIB : -lblas -llapack LAPACK_LIB : -lblas -llapack
IRPF90 : irpf90 IRPF90 : irpf90
IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED

View File

@ -13,7 +13,7 @@
# #
# #
[COMMON] [COMMON]
FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native -std=legacy
LAPACK_LIB : -larmpl_lp64_mp LAPACK_LIB : -larmpl_lp64_mp
IRPF90 : irpf90 IRPF90 : irpf90
IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED

View File

@ -10,7 +10,7 @@
# #
# #
[COMMON] [COMMON]
FC : gfortran -ffree-line-length-none -I . -mavx -g -fPIC FC : gfortran -ffree-line-length-none -I . -mavx -g -fPIC -std=legacy
LAPACK_LIB : -llapack -lblas LAPACK_LIB : -llapack -lblas
IRPF90 : irpf90 IRPF90 : irpf90
IRPF90_FLAGS : --ninja --align=32 -DSET_NESTED IRPF90_FLAGS : --ninja --align=32 -DSET_NESTED

View File

@ -10,7 +10,7 @@
# #
# #
[COMMON] [COMMON]
FC : gfortran -g -ffree-line-length-none -I . -fPIC FC : gfortran -g -ffree-line-length-none -I . -fPIC -std=legacy
LAPACK_LIB : -lblas -llapack LAPACK_LIB : -lblas -llapack
IRPF90 : irpf90 IRPF90 : irpf90
IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED

62
config/gfortran_macos.cfg Normal file
View File

@ -0,0 +1,62 @@
# Common flags
##############
#
# -ffree-line-length-none : Needed for IRPF90 which produces long lines
# -lblas -llapack : Link with libblas and liblapack libraries provided by the system
# -I . : Include the curent directory (Mandatory)
#
# --ninja : Allow the utilisation of ninja. (Mandatory)
# --align=32 : Align all provided arrays on a 32-byte boundary
#
#
[COMMON]
FC : gfortran -ffree-line-length-none -I . -g -fPIC -std=legacy
LAPACK_LIB : -llapack -lblas
IRPF90 : irpf90
IRPF90_FLAGS : --ninja --align=32 -DSET_NESTED -DMACOS
# Global options
################
#
# 1 : Activate
# 0 : Deactivate
#
[OPTION]
MODE : OPT ; [ OPT | PROFILE | DEBUG ] : Chooses the section below
CACHE : 0 ; Enable cache_compile.py
OPENMP : 1 ; Append OpenMP flags
# Optimization flags
####################
#
# -Ofast : Disregard strict standards compliance. Enables all -O3 optimizations.
# It also enables optimizations that are not valid
# for all standard-compliant programs. It turns on
# -ffast-math and the Fortran-specific
# -fno-protect-parens and -fstack-arrays.
[OPT]
FCFLAGS : -Ofast -march=native
# Profiling flags
#################
#
[PROFILE]
FC : -p -g
FCFLAGS : -Ofast
# Debugging flags
#################
#
# -fcheck=all : Checks uninitialized variables, array subscripts, etc...
# -g : Extra debugging information
#
[DEBUG]
FCFLAGS : -fcheck=all -g
# OpenMP flags
#################
#
[OPENMP]
FC : -fopenmp
IRPF90_FLAGS : --openmp

View File

@ -10,7 +10,7 @@
# #
# #
[COMMON] [COMMON]
FC : mpif90 -ffree-line-length-none -I . -g -fPIC FC : mpif90 -ffree-line-length-none -I . -g -fPIC -std=legacy
LAPACK_LIB : -lblas -llapack LAPACK_LIB : -lblas -llapack
IRPF90 : irpf90 IRPF90 : irpf90
IRPF90_FLAGS : --ninja --align=32 -DMPI -DSET_NESTED IRPF90_FLAGS : --ninja --align=32 -DMPI -DSET_NESTED

View File

@ -10,7 +10,7 @@
# #
# #
[COMMON] [COMMON]
FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native -std=legacy
LAPACK_LIB : -lopenblas LAPACK_LIB : -lopenblas
IRPF90 : irpf90 IRPF90 : irpf90
IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED

19
configure vendored
View File

@ -19,7 +19,11 @@ git submodule init
git submodule update git submodule update
# Update ARM or x86 dependencies # Update ARM or x86 dependencies
ARCHITECTURE=$(uname -m) SYSTEM=$(uname -s)
if [[ $SYSTEM = "Linux" ]] ; then
SYSTEM=""
fi
ARCHITECTURE=$(uname -m)$SYSTEM
cd ${QP_ROOT}/external/qp2-dependencies cd ${QP_ROOT}/external/qp2-dependencies
git checkout master git checkout master
git pull git pull
@ -191,7 +195,7 @@ if [[ "${PACKAGES}.x" != ".x" ]] ; then
fi fi
if [[ ${PACKAGES} = all ]] ; then if [[ ${PACKAGES} = all ]] ; then
PACKAGES="zlib ninja zeromq f77zmq gmp ocaml docopt resultsFile bats trexio qmckl" PACKAGES="zlib ninja zeromq f77zmq gmp ocaml docopt resultsFile bats trexio"
fi fi
@ -275,6 +279,7 @@ EOF
cd "\${QP_ROOT}"/external cd "\${QP_ROOT}"/external
tar --gunzip --extract --file qp2-dependencies/zeromq-4.2.5.tar.gz tar --gunzip --extract --file qp2-dependencies/zeromq-4.2.5.tar.gz
cd zeromq-* cd zeromq-*
[[ "${SYSTEM}" = "Darwin" ]] && ./autogen.sh
./configure --prefix="\$QP_ROOT" --without-libsodium --enable-libunwind=no ./configure --prefix="\$QP_ROOT" --without-libsodium --enable-libunwind=no
make -j 8 make -j 8
make install make install
@ -397,11 +402,11 @@ if [[ ${TREXIO} = $(not_found) ]] ; then
fail fail
fi fi
QMCKL=$(find_lib -lqmckl) #QMCKL=$(find_lib -lqmckl)
if [[ ${QMCKL} = $(not_found) ]] ; then #if [[ ${QMCKL} = $(not_found) ]] ; then
error "QMCkl (qmckl | qmckl-intel) is not installed." # error "QMCkl (qmckl | qmckl-intel) is not installed."
fail # fail
fi #fi
F77ZMQ=$(find_lib -lzmq -lf77zmq -lpthread) F77ZMQ=$(find_lib -lzmq -lf77zmq -lpthread)
if [[ ${F77ZMQ} = $(not_found) ]] ; then if [[ ${F77ZMQ} = $(not_found) ]] ; then

View File

@ -32,7 +32,7 @@ export PYTHONPATH=$(qp_prepend_export "PYTHONPATH" "${QP_EZFIO}/Python":"${QP_PY
export PATH=$(qp_prepend_export "PATH" "${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml) export PATH=$(qp_prepend_export "PATH" "${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml)
export LD_LIBRARY_PATH=$(qp_prepend_export "LD_LIBRARY_PATH" "${QP_ROOT}"/lib) export LD_LIBRARY_PATH=$(qp_prepend_export "LD_LIBRARY_PATH" "${QP_ROOT}"/lib:"${QP_ROOT}"/lib64)
export LIBRARY_PATH=$(qp_prepend_export "LIBRARY_PATH" "${QP_ROOT}"/lib:"${QP_ROOT}"/lib64) export LIBRARY_PATH=$(qp_prepend_export "LIBRARY_PATH" "${QP_ROOT}"/lib:"${QP_ROOT}"/lib64)

1
plugins/.gitignore vendored
View File

@ -1,2 +1 @@
*

Some files were not shown because too many files have changed in this diff Show More