mirror of
https://github.com/LCPQ/quantum_package
synced 2024-09-27 03:51:01 +02:00
Updated quantum_package.rc
This commit is contained in:
parent
a37c1e3b68
commit
8199ec2b5c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
|||||||
quantum_package.rc
|
|
||||||
config/ifort.cfg
|
config/ifort.cfg
|
||||||
quantum_package_static.tar.gz
|
quantum_package_static.tar.gz
|
||||||
build.ninja
|
build.ninja
|
||||||
|
@ -35,7 +35,7 @@ OPENMP : 1 ; Append OpenMP flags
|
|||||||
# -ffast-math and the Fortran-specific
|
# -ffast-math and the Fortran-specific
|
||||||
# -fno-protect-parens and -fstack-arrays.
|
# -fno-protect-parens and -fstack-arrays.
|
||||||
[OPT]
|
[OPT]
|
||||||
FCFLAGS : -Ofast
|
FCFLAGS : -Ofast -msse4.2
|
||||||
|
|
||||||
# Profiling flags
|
# Profiling flags
|
||||||
#################
|
#################
|
||||||
|
@ -35,7 +35,7 @@ OPENMP : 1 ; Append OpenMP flags
|
|||||||
# -ffast-math and the Fortran-specific
|
# -ffast-math and the Fortran-specific
|
||||||
# -fno-protect-parens and -fstack-arrays.
|
# -fno-protect-parens and -fstack-arrays.
|
||||||
[OPT]
|
[OPT]
|
||||||
FCFLAGS : -Ofast
|
FCFLAGS : -Ofast -mavx
|
||||||
|
|
||||||
# Profiling flags
|
# Profiling flags
|
||||||
#################
|
#################
|
||||||
|
@ -32,7 +32,7 @@ OPENMP : 1 ; Append OpenMP flags
|
|||||||
#
|
#
|
||||||
[OPT]
|
[OPT]
|
||||||
FC : -traceback
|
FC : -traceback
|
||||||
FCFLAGS : -xAVX -O2 -ip -ftz -g
|
FCFLAGS : -xSSE4.2 -O2 -ip -ftz -g
|
||||||
|
|
||||||
# Profiling flags
|
# Profiling flags
|
||||||
#################
|
#################
|
||||||
|
63
config/ifort_avx.cfg
Normal file
63
config/ifort_avx.cfg
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# Common flags
|
||||||
|
##############
|
||||||
|
#
|
||||||
|
# -mkl=[parallel|sequential] : Use the MKL library
|
||||||
|
# --ninja : Allow the utilisation of ninja. It is mandatory !
|
||||||
|
# --align=32 : Align all provided arrays on a 32-byte boundary
|
||||||
|
#
|
||||||
|
[COMMON]
|
||||||
|
FC : ifort
|
||||||
|
LAPACK_LIB : -mkl=parallel
|
||||||
|
IRPF90 : irpf90
|
||||||
|
IRPF90_FLAGS : --ninja --align=32
|
||||||
|
|
||||||
|
# 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
|
||||||
|
####################
|
||||||
|
#
|
||||||
|
# -xHost : Compile a binary optimized for the current architecture
|
||||||
|
# -O2 : O3 not better than O2.
|
||||||
|
# -ip : Inter-procedural optimizations
|
||||||
|
# -ftz : Flushes denormal results to zero
|
||||||
|
#
|
||||||
|
[OPT]
|
||||||
|
FC : -traceback
|
||||||
|
FCFLAGS : -xAVX -O2 -ip -ftz -g
|
||||||
|
|
||||||
|
# Profiling flags
|
||||||
|
#################
|
||||||
|
#
|
||||||
|
[PROFILE]
|
||||||
|
FC : -p -g
|
||||||
|
FCFLAGS : -xSSE4.2 -O2 -ip -ftz
|
||||||
|
|
||||||
|
# Debugging flags
|
||||||
|
#################
|
||||||
|
#
|
||||||
|
# -traceback : Activate backtrace on runtime
|
||||||
|
# -fpe0 : All floating point exaceptions
|
||||||
|
# -C : Checks uninitialized variables, array subscripts, etc...
|
||||||
|
# -g : Extra debugging information
|
||||||
|
# -xSSE2 : Valgrind needs a very simple x86 executable
|
||||||
|
#
|
||||||
|
[DEBUG]
|
||||||
|
FC : -g -traceback
|
||||||
|
FCFLAGS : -xSSE2 -C -fpe0 -implicitnone
|
||||||
|
|
||||||
|
# OpenMP flags
|
||||||
|
#################
|
||||||
|
#
|
||||||
|
[OPENMP]
|
||||||
|
FC : -qopenmp
|
||||||
|
IRPF90_FLAGS : --openmp
|
||||||
|
|
64
config/ifort_avx_mpi.cfg
Normal file
64
config/ifort_avx_mpi.cfg
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# Common flags
|
||||||
|
##############
|
||||||
|
#
|
||||||
|
# -mkl=[parallel|sequential] : Use the MKL library
|
||||||
|
# --ninja : Allow the utilisation of ninja. It is mandatory !
|
||||||
|
# --align=32 : Align all provided arrays on a 32-byte boundary
|
||||||
|
#
|
||||||
|
[COMMON]
|
||||||
|
FC : mpiifort
|
||||||
|
LAPACK_LIB : -mkl=parallel
|
||||||
|
IRPF90 : irpf90
|
||||||
|
IRPF90_FLAGS : --ninja --align=32 -DMPI
|
||||||
|
|
||||||
|
# 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
|
||||||
|
####################
|
||||||
|
#
|
||||||
|
# -xHost : Compile a binary optimized for the current architecture
|
||||||
|
# -O2 : O3 not better than O2.
|
||||||
|
# -ip : Inter-procedural optimizations
|
||||||
|
# -ftz : Flushes denormal results to zero
|
||||||
|
#
|
||||||
|
[OPT]
|
||||||
|
FCFLAGS : -xAVX -O2 -ip -ftz -g -traceback
|
||||||
|
|
||||||
|
# Profiling flags
|
||||||
|
#################
|
||||||
|
#
|
||||||
|
[PROFILE]
|
||||||
|
FC : -p -g
|
||||||
|
FCFLAGS : -xSSE4.2 -O2 -ip -ftz
|
||||||
|
|
||||||
|
|
||||||
|
# Debugging flags
|
||||||
|
#################
|
||||||
|
#
|
||||||
|
# -traceback : Activate backtrace on runtime
|
||||||
|
# -fpe0 : All floating point exaceptions
|
||||||
|
# -C : Checks uninitialized variables, array subscripts, etc...
|
||||||
|
# -g : Extra debugging information
|
||||||
|
# -xSSE2 : Valgrind needs a very simple x86 executable
|
||||||
|
#
|
||||||
|
[DEBUG]
|
||||||
|
FC : -g -traceback
|
||||||
|
FCFLAGS : -xSSE2 -C -fpe0 -implicitnone
|
||||||
|
|
||||||
|
|
||||||
|
# OpenMP flags
|
||||||
|
#################
|
||||||
|
#
|
||||||
|
[OPENMP]
|
||||||
|
FC : -qopenmp
|
||||||
|
IRPF90_FLAGS : --openmp
|
||||||
|
|
@ -32,7 +32,7 @@ OPENMP : 1 ; Append OpenMP flags
|
|||||||
#
|
#
|
||||||
[OPT]
|
[OPT]
|
||||||
FC : -traceback
|
FC : -traceback
|
||||||
FCFLAGS : -xAVX -O2 -ip -ftz -g
|
FCFLAGS : -xSSE4.2 -O2 -ip -ftz -g
|
||||||
|
|
||||||
|
|
||||||
# Profiling flags
|
# Profiling flags
|
||||||
|
@ -33,7 +33,6 @@ OPENMP : 1 ; Append OpenMP flags
|
|||||||
[OPT]
|
[OPT]
|
||||||
FCFLAGS : -xSSE4.2 -O2 -ip -ftz -g -traceback
|
FCFLAGS : -xSSE4.2 -O2 -ip -ftz -g -traceback
|
||||||
|
|
||||||
# !xAVX
|
|
||||||
# Profiling flags
|
# Profiling flags
|
||||||
#################
|
#################
|
||||||
#
|
#
|
||||||
|
24
configure
vendored
24
configure
vendored
@ -3,6 +3,10 @@
|
|||||||
# Quantum Package configuration script
|
# Quantum Package configuration script
|
||||||
#
|
#
|
||||||
|
|
||||||
|
export QP_ROOT="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||||
|
echo "QP_ROOT="$QP_ROOT
|
||||||
|
|
||||||
|
|
||||||
help()
|
help()
|
||||||
{
|
{
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
@ -17,14 +21,16 @@ Options:
|
|||||||
-c <file>, --config <file> define a configuration file, in
|
-c <file>, --config <file> define a configuration file, in
|
||||||
"${QP_ROOT}/config/".
|
"${QP_ROOT}/config/".
|
||||||
-h, --help print the help message
|
-h, --help print the help message
|
||||||
-i <package>, --install <package> install <package>. Use at your own risk.
|
-i <package>, --install <package> install <package>. Use at your own
|
||||||
|
risk: no support will be provided
|
||||||
|
for the installation of dependencies.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
./configure -c config/gfortran.cfg
|
./configure -c config/gfortran.cfg
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
- Using different configuration files for installing dependencies and
|
- Users are encouraged to create their own configuration files instead of
|
||||||
compiling QP can improve the user experience.
|
modifying the existing ones.
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
exit
|
exit
|
||||||
@ -54,20 +60,12 @@ done
|
|||||||
# Trim leading and trailing spaces
|
# Trim leading and trailing spaces
|
||||||
PACKAGES=$(echo $PACKAGES | xargs)
|
PACKAGES=$(echo $PACKAGES | xargs)
|
||||||
|
|
||||||
|
echo "export QP_ROOT=\"$QP_ROOT\"" > ${QP_ROOT}/etc/00.qp_root
|
||||||
|
|
||||||
sed "s!^export QP_ROOT=.*\$!export QP_ROOT=\"$PWD\"!" \
|
|
||||||
quantum_package.rc.default > quantum_package.rc
|
|
||||||
|
|
||||||
echo "quantum_package.rc created."
|
|
||||||
|
|
||||||
source quantum_package.rc
|
source quantum_package.rc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function fail() {
|
function fail() {
|
||||||
echo "Please refer to INSTALL.rst to install the missing dependencies."
|
echo "Please refer to INSTALL.rst to install the missing dependencies."
|
||||||
exit 1
|
exit 1
|
||||||
@ -151,7 +149,7 @@ for PACKAGE in ${PACKAGES} ; do
|
|||||||
elif [[ ${PACKAGE} = irpf90 ]] ; then
|
elif [[ ${PACKAGE} = irpf90 ]] ; then
|
||||||
|
|
||||||
download \
|
download \
|
||||||
"https://gitlab.com/scemama/irpf90/-/archive/v1.7.3/irpf90-v1.7.3.tar.gz" \
|
"https://gitlab.com/scemama/irpf90/-/archive/v1.7.4/irpf90-v1.7.4.tar.gz" \
|
||||||
"${QP_ROOT}"/external/irpf90.tar.gz
|
"${QP_ROOT}"/external/irpf90.tar.gz
|
||||||
(
|
(
|
||||||
cd "${QP_ROOT}"/external
|
cd "${QP_ROOT}"/external
|
||||||
|
1
etc/.gitignore
vendored
Normal file
1
etc/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
00.qp_root
|
1
etc/README.rst
Normal file
1
etc/README.rst
Normal file
@ -0,0 +1 @@
|
|||||||
|
This directory contains all the files to be sourced when the |QP| environment is loaded.
|
15
etc/ezfio.rc
Normal file
15
etc/ezfio.rc
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
if [[ -z $QP_EZFIO ]]
|
||||||
|
then
|
||||||
|
|
||||||
|
export QP_EZFIO=${QP_ROOT}/external/ezfio
|
||||||
|
|
||||||
|
if [[ $SHELL == "/bin/bash" ]] ; then
|
||||||
|
if [[ -f ${QP_EZFIO}/Bash/ezfio.sh ]]; then
|
||||||
|
source ${QP_EZFIO}/Bash/ezfio.sh
|
||||||
|
else
|
||||||
|
echo "EZFIO is not installed."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
8
etc/irpf90.rc
Normal file
8
etc/irpf90.rc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export IRPF90=${QP_ROOT}/bin/irpf90
|
||||||
|
|
||||||
|
# Load irpman shell completion
|
||||||
|
(
|
||||||
|
irpman=$(tail -1 "${QP_ROOT}/bin/irpman" | cut --delimiter " " --field=2)
|
||||||
|
source $(dirname ${irpman})/../irpman-completions.bash
|
||||||
|
)
|
||||||
|
|
9
etc/libraries.rc
Normal file
9
etc/libraries.rc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
if [[ -z $QP_LIB ]]
|
||||||
|
then
|
||||||
|
:
|
||||||
|
|
||||||
|
# Include here the optional external libraries to link with your binaries,
|
||||||
|
# for example
|
||||||
|
# export QP_LIB="$QP_LIB -lint"
|
||||||
|
|
||||||
|
fi
|
11
etc/network.rc
Normal file
11
etc/network.rc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
if [[ -z $QP_NIC ]]
|
||||||
|
then
|
||||||
|
:
|
||||||
|
|
||||||
|
# Choose the correct network interface if the default one is incorrect
|
||||||
|
# export QP_NIC=ib0
|
||||||
|
# export QP_NIC=eth0
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
8
etc/ninja.rc
Normal file
8
etc/ninja.rc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
if [[ -z $NINJA ]]
|
||||||
|
then
|
||||||
|
|
||||||
|
export NINJA=${QP_ROOT}/bin/ninja
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
10
etc/ocaml.rc
Normal file
10
etc/ocaml.rc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
if [[ -z $OPAMROOT ]]
|
||||||
|
then
|
||||||
|
|
||||||
|
# Comment these lines if you have a system-wide OCaml installation
|
||||||
|
export OPAMROOT=${OPAMROOT:-${QP_ROOT}/external/opam}
|
||||||
|
source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
41
etc/paths.rc
Normal file
41
etc/paths.rc
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
if [[ -z $QP_PYTHON ]]
|
||||||
|
then
|
||||||
|
|
||||||
|
# Load dependencies
|
||||||
|
for i in ezfio.rc irpf90.rc network.rc ninja.rc ocaml.rc
|
||||||
|
do
|
||||||
|
source $i
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
export QP_PYTHON=${QP_PYTHON}:${QP_EZFIO}/Python
|
||||||
|
export QP_PYTHON=${QP_PYTHON}:${QP_ROOT}/scripts
|
||||||
|
export QP_PYTHON=${QP_PYTHON}:${QP_ROOT}/scripts/ezfio_interface
|
||||||
|
export QP_PYTHON=${QP_PYTHON}:${QP_ROOT}/scripts/utility
|
||||||
|
export QP_PYTHON=${QP_PYTHON}:${QP_ROOT}/scripts/module
|
||||||
|
export QP_PYTHON=${QP_PYTHON}:${QP_ROOT}/scripts/compilation
|
||||||
|
export QP_PYTHON=${QP_PYTHON}:${QP_ROOT}/external/Python
|
||||||
|
export QP_PYTHON=${QP_PYTHON}:${QP_ROOT}/external/Python/resultsFile
|
||||||
|
|
||||||
|
|
||||||
|
function qp_prepend_export () {
|
||||||
|
eval "value_1="\${$1}""
|
||||||
|
if [[ -z $value_1 ]] ; then
|
||||||
|
echo "${2}:"
|
||||||
|
else
|
||||||
|
echo "${2}:${value_1}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
export PYTHONPATH=$(qp_prepend_export "PYTHONPATH" "${QP_EZFIO}/Python":"${QP_PYTHON}")
|
||||||
|
|
||||||
|
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:"${QP_ROOT}"/lib64)
|
||||||
|
|
||||||
|
export LIBRARY_PATH=$(qp_prepend_export "LIBRARY_PATH" "${QP_ROOT}"/lib:"${QP_ROOT}"/lib64)
|
||||||
|
|
||||||
|
export C_INCLUDE_PATH=$(qp_prepend_export "C_INCLUDE_PATH" "${QP_ROOT}"/include)
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
19
quantum_package.rc
Normal file
19
quantum_package.rc
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# This script loads the Quantum Package environment. It should be invoked as
|
||||||
|
# source quantum_package.rc
|
||||||
|
|
||||||
|
WD=$PWD
|
||||||
|
cd $QP_ROOT/etc
|
||||||
|
for SCRIPT in *.rc
|
||||||
|
do
|
||||||
|
source $SCRIPT
|
||||||
|
done
|
||||||
|
cd $WD
|
||||||
|
|
||||||
|
if [[ -z ${QP_ROOT} ]]
|
||||||
|
then
|
||||||
|
echo The QP_ROOT environment variable is not set. Run
|
||||||
|
|
||||||
|
./configure -help
|
||||||
|
|
||||||
|
fi
|
@ -1,57 +0,0 @@
|
|||||||
# This line should contain the location of your quantum_package directory
|
|
||||||
export QP_ROOT=
|
|
||||||
|
|
||||||
# Include here the optional external libraries to link with your binaries
|
|
||||||
# export QP_LIB=" -lint"
|
|
||||||
|
|
||||||
#### BEGIN Don't modify
|
|
||||||
|
|
||||||
export IRPF90=${QP_ROOT}/bin/irpf90
|
|
||||||
export NINJA=${QP_ROOT}/bin/ninja
|
|
||||||
export QP_EZFIO=${QP_ROOT}/external/ezfio
|
|
||||||
export QP_PYTHON=${QP_ROOT}/scripts:${QP_ROOT}/scripts/ezfio_interface:${QP_ROOT}/scripts/utility:${QP_ROOT}/scripts/module:${QP_ROOT}/scripts/pseudo:${QP_ROOT}/scripts/compilation:${QP_EZFIO}/Python:${QP_ROOT}/external/Python:${QP_ROOT}/external/Python/resultsFile
|
|
||||||
|
|
||||||
function qp_prepend_export () {
|
|
||||||
eval "value_1="\${$1}""
|
|
||||||
if [[ -z $value_1 ]] ; then
|
|
||||||
echo "${2}:"
|
|
||||||
else
|
|
||||||
echo "${2}:${value_1}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
export PYTHONPATH=$(qp_prepend_export "PYTHONPATH" "${QP_EZFIO}/Python":"${QP_PYTHON}")
|
|
||||||
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:"${QP_ROOT}"/lib64)
|
|
||||||
export LIBRARY_PATH=$(qp_prepend_export "LIBRARY_PATH" "${QP_ROOT}"/lib:"${QP_ROOT}"/lib64)
|
|
||||||
export C_INCLUDE_PATH=$(qp_prepend_export "C_INCLUDE_PATH" "${QP_ROOT}"/include)
|
|
||||||
|
|
||||||
function qp() {
|
|
||||||
ezfio $@
|
|
||||||
}
|
|
||||||
|
|
||||||
# EZFIO completion
|
|
||||||
if [[ $SHELL == "/bin/bash" ]] ; then
|
|
||||||
if [[ -f ${QP_EZFIO}/Bash/ezfio.sh ]]; then
|
|
||||||
source ${QP_EZFIO}/Bash/ezfio.sh
|
|
||||||
else
|
|
||||||
echo "EZFIO is not installed."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#### END Don't modify
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Choose the correct network interface if the default one is incorrect
|
|
||||||
# export QP_NIC=ib0
|
|
||||||
# export QP_NIC=eth0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Comment these lines if you have a system-wide OCaml installation
|
|
||||||
export OPAMROOT=${OPAMROOT:-${QP_ROOT}/external/opam}
|
|
||||||
source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user