mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-01-03 00:55:38 +01:00
Fixes for ARM
This commit is contained in:
parent
9ebbdbf49f
commit
b817f87fd4
@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
[COMMON]
|
[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
|
LAPACK_LIB : -lblas -llapack
|
||||||
IRPF90 : irpf90
|
IRPF90 : irpf90
|
||||||
IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED
|
IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED
|
||||||
@ -22,7 +22,7 @@ IRPF90_FLAGS : --ninja --align=32 --assert -DSET_NESTED
|
|||||||
# 0 : Deactivate
|
# 0 : Deactivate
|
||||||
#
|
#
|
||||||
[OPTION]
|
[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
|
CACHE : 0 ; Enable cache_compile.py
|
||||||
OPENMP : 1 ; Append OpenMP flags
|
OPENMP : 1 ; Append OpenMP flags
|
||||||
|
|
||||||
|
62
config/gfortran_openblas.cfg
Normal file
62
config/gfortran_openblas.cfg
Normal 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
26
configure
vendored
@ -16,6 +16,25 @@ export CC=gcc
|
|||||||
git submodule init
|
git submodule init
|
||||||
git submodule update
|
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()
|
function help()
|
||||||
{
|
{
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
@ -235,10 +254,9 @@ EOF
|
|||||||
execute <<EOF
|
execute <<EOF
|
||||||
source "${QP_ROOT}"/quantum_package.rc
|
source "${QP_ROOT}"/quantum_package.rc
|
||||||
cd "${QP_ROOT}"/external/
|
cd "${QP_ROOT}"/external/
|
||||||
tar --gunzip --extract --file qp2-dependencies/ocaml-bundle_x86.tar.gz
|
tar --gunzip --extract --file qp2-dependencies/opampack.tar.gz
|
||||||
echo "" | ./ocaml-bundle/bootstrap.sh "${QP_ROOT}"
|
cd "${QP_ROOT}"/external/opampack
|
||||||
./ocaml-bundle/configure.sh "${QP_ROOT}"
|
./install.sh
|
||||||
echo "" | ./ocaml-bundle/compile.sh "${QP_ROOT}"
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
elif [[ ${PACKAGE} = bse ]] ; then
|
elif [[ ${PACKAGE} = bse ]] ; then
|
||||||
|
@ -2,11 +2,9 @@
|
|||||||
|
|
||||||
if [[ -z $OPAMROOT ]]
|
if [[ -z $OPAMROOT ]]
|
||||||
then
|
then
|
||||||
|
export PATH="${QP_ROOT}/external/opampack/:$PATH"
|
||||||
# Comment these lines if you have a system-wide OCaml installation
|
if [[ -f "${QP_ROOT}/external/opampack/opam" ]] ; then
|
||||||
export PATH="${QP_ROOT}/external/ocaml-bundle/bootstrap/bin:$PATH"
|
eval $("${QP_ROOT}/external/opampack/opam" env --root "${QP_ROOT}/external/opampack/opamroot" --set-root)
|
||||||
if [[ -f "${QP_ROOT}/external/ocaml-bundle/bootstrap/bin/opam" ]] ; then
|
|
||||||
eval $(opam env --root "${QP_ROOT}/external/ocaml-bundle/opam" --set-root)
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
|
source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
|
||||||
|
2
external/qp2-dependencies
vendored
2
external/qp2-dependencies
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 90ee61f5041c7c94a0c605625a264860292813a0
|
Subproject commit 57a1466d8707a8b0b1dfef8eede8e4f770b349cf
|
Loading…
Reference in New Issue
Block a user