Fixes for ARM

This commit is contained in:
Anthony Scemama 2023-01-31 08:42:39 +01:00
parent 9ebbdbf49f
commit b817f87fd4
5 changed files with 90 additions and 12 deletions

View File

@ -10,7 +10,7 @@
#
#
[COMMON]
FC : gfortran -g -ffree-line-length-none -I . -fPIC
FC : gfortran -g -ffree-line-length-none -I . -fPIC -march=native
LAPACK_LIB : -lblas -llapack
IRPF90 : irpf90
IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED
@ -22,7 +22,7 @@ IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED
# 0 : Deactivate
#
[OPTION]
MODE : DEBUG ; [ OPT | PROFILE | DEBUG ] : Chooses the section below
MODE : OPT ; [ OPT | PROFILE | DEBUG ] : Chooses the section below
CACHE : 0 ; Enable cache_compile.py
OPENMP : 1 ; Append OpenMP flags

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 -g -ffree-line-length-none -I . -fPIC -march=native
LAPACK_LIB : -lopenblas
IRPF90 : irpf90
IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED
# 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
# Profiling flags
#################
#
[PROFILE]
FC : -p -g
FCFLAGS : -Ofast
# Debugging flags
#################
#
# -fcheck=all : Checks uninitialized variables, array subscripts, etc...
# -g : Extra debugging information
#
[DEBUG]
FCFLAGS : -g -march=native -fcheck=all -Waliasing -Wampersand -Wconversion -Wsurprising -Wintrinsics-std -Wno-tabs -Wintrinsic-shadow -Wline-truncation -Wreal-q-constant -Wuninitialized -fbacktrace -ffpe-trap=zero,overflow,underflow -finit-real=nan
# OpenMP flags
#################
#
[OPENMP]
FC : -fopenmp
IRPF90_FLAGS : --openmp

26
configure vendored
View File

@ -16,6 +16,25 @@ export CC=gcc
git submodule init
git submodule update
# Update ARM or x86 dependencies
ARCHITECTURE=$(uname -m)
cd ${QP_ROOT}/external/qp2-dependencies
echo "Architecture: $ARCHITECTURE"
case $ARCHITECTURE in
aarch64)
git checkout arm64
;;
x86_64)
git checkout x86
;;
*)
echo "Unknown architecture. Using x86_64."
git checkout x86
;;
esac
cd ${QP_ROOT}
function help()
{
cat <<EOF
@ -235,10 +254,9 @@ EOF
execute <<EOF
source "${QP_ROOT}"/quantum_package.rc
cd "${QP_ROOT}"/external/
tar --gunzip --extract --file qp2-dependencies/ocaml-bundle_x86.tar.gz
echo "" | ./ocaml-bundle/bootstrap.sh "${QP_ROOT}"
./ocaml-bundle/configure.sh "${QP_ROOT}"
echo "" | ./ocaml-bundle/compile.sh "${QP_ROOT}"
tar --gunzip --extract --file qp2-dependencies/opampack.tar.gz
cd "${QP_ROOT}"/external/opampack
./install.sh
EOF
elif [[ ${PACKAGE} = bse ]] ; then

View File

@ -2,11 +2,9 @@
if [[ -z $OPAMROOT ]]
then
# Comment these lines if you have a system-wide OCaml installation
export PATH="${QP_ROOT}/external/ocaml-bundle/bootstrap/bin:$PATH"
if [[ -f "${QP_ROOT}/external/ocaml-bundle/bootstrap/bin/opam" ]] ; then
eval $(opam env --root "${QP_ROOT}/external/ocaml-bundle/opam" --set-root)
export PATH="${QP_ROOT}/external/opampack/:$PATH"
if [[ -f "${QP_ROOT}/external/opampack/opam" ]] ; then
eval $("${QP_ROOT}/external/opampack/opam" env --root "${QP_ROOT}/external/opampack/opamroot" --set-root)
fi
fi
source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true

@ -1 +1 @@
Subproject commit 90ee61f5041c7c94a0c605625a264860292813a0
Subproject commit 57a1466d8707a8b0b1dfef8eede8e4f770b349cf