Skip to content

Commit f1e16c6

Browse files
committed
aocc install setup
1 parent 2519fc2 commit f1e16c6

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

toolchain/install_abacus_toolchain.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ USAGE:
5959
6060
$(basename $SCRIPT_NAME) [options]
6161
62-
Or a more RECOMMENDED way is to use it by pre-setting workflow scripts:
62+
A MORE RECOMMENDED way is to use it by pre-setting workflow scripts:
6363
> gcc-openmpi-openblas environments: toolchain_gnu.sh
6464
> intel-mkl-mpi environments: toolchain_intel.sh
6565
> intel-mpich environments: toolchain_intel_mpich.sh
66+
> AMD environments: toolchain_amd.sh [in development]
6667
6768
OPTIONS:
6869
@@ -148,9 +149,9 @@ The --with-PKG options follow the rules:
148149
--with-PKG The option keyword alone will be equivalent to
149150
--with-PKG=install
150151
151-
--with-gcc The GCC compiler to use to compile ABACUS.
152+
--with-gcc Use the GNU compiler to use to build ABACUS.
152153
Default = system
153-
--with-intel Use the Intel compiler to compile ABACUS.
154+
--with-intel Use the Intel compiler to build ABACUS.
154155
Default = system
155156
--with-intel-classic Use the classic Intel compiler (icc, icpc, ifort) to compile ABACUS.
156157
Default = no
@@ -603,7 +604,7 @@ export ENABLE_CRAY="${enable_cray}"
603604
# ------------------------------------------------------------------------
604605
# Compiler conflicts
605606
if [ "${with_intel}" != "__DONTUSE__" ] && [ "${with_gcc}" = "__INSTALL__" ]; then
606-
echo "You have chosen to use the Intel compiler, therefore the installation of the GCC compiler will be skipped."
607+
echo "You have chosen to use the Intel compiler, therefore the installation of the GNU compiler will be skipped."
607608
with_gcc="__SYSTEM__"
608609
fi
609610
if [ "${with_amd}" != "__DONTUSE__" ] && [ "${with_gcc}" = "__INSTALL__" ]; then
@@ -627,7 +628,7 @@ if [ "${MPI_MODE}" = "no" ]; then
627628
else
628629
# if gcc is installed, then mpi needs to be installed too
629630
if [ "${with_gcc}" = "__INSTALL__" ]; then
630-
echo "You have chosen to install the GCC compiler, therefore MPI libraries have to be installed too"
631+
echo "You have chosen to install the GNU compiler, therefore MPI libraries have to be installed too"
631632
case ${MPI_MODE} in
632633
mpich)
633634
with_mpich="__INSTALL__"

toolchain/scripts/stage0/install_stage0.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
./scripts/stage0/install_gcc.sh
77
./scripts/stage0/install_intel.sh
8+
./scripts/stage0/install_amd.sh
89
./scripts/stage0/setup_buildtools.sh
910
./scripts/stage0/install_cmake.sh
1011

toolchain/scripts/stage0/setup_buildtools.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ if [ "${with_intel}" != "__DONTUSE__" ]; then
3333
CFLAGS="${CFLAGS} -march=${TARGET_CPU} -mtune=${TARGET_CPU}"
3434
fi
3535
FFLAGS="${CFLAGS}"
36+
elif [ "${with_amd}" != "__DONTUSE__" ]; then
37+
CFLAGS="-O2 -fPIC -fopenmp -g -mtune=${TARGET_CPU}"
38+
FFLAGS="${CFLAGS}"
3639
else
3740
CFLAGS="-O2 -fPIC -fno-omit-frame-pointer -fopenmp -g"
3841
if [ "${TARGET_CPU}" = "generic" ]; then
@@ -47,15 +50,15 @@ F77FLAGS="${FFLAGS}"
4750
F90FLAGS="${FFLAGS}"
4851
FCFLAGS="${FFLAGS}"
4952

50-
if [ "${with_intel}" == "__DONTUSE__" ]; then
53+
if [ "${with_intel}" == "__DONTUSE__" ] && [ "${with_amd}" == "__DONTUSE__" ]; then
5154
export CFLAGS="$(allowed_gcc_flags ${CFLAGS})"
5255
export FFLAGS="$(allowed_gfortran_flags ${FFLAGS})"
5356
export F77FLAGS="$(allowed_gfortran_flags ${F77FLAGS})"
5457
export F90FLAGS="$(allowed_gfortran_flags ${F90FLAGS})"
5558
export FCFLAGS="$(allowed_gfortran_flags ${FCFLAGS})"
5659
export CXXFLAGS="$(allowed_gxx_flags ${CXXFLAGS})"
5760
else
58-
# TODO Check functions for allowed Intel compiler flags
61+
# TODO Check functions for allowed Intel or AMD compiler flags
5962
export CFLAGS
6063
export FFLAGS
6164
export F77FLAGS

0 commit comments

Comments
 (0)