Skip to content

Commit b46c726

Browse files
committed
modification
1 parent 05b0095 commit b46c726

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

toolchain/scripts/stage0/install_amd.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# TODO: Review and if possible fix shellcheck errors.
44
# shellcheck disable=all
55

6+
# Last Update in 2025-0308
7+
# NOTICE: flang cannot be used when compiling ELPA
8+
69
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=${0}
710
SCRIPT_DIR="$(cd "$(dirname "${SCRIPT_NAME}")/.." && pwd -P)"
811

@@ -30,7 +33,9 @@ case "${with_amd}" in
3033
echo "==================== Finding AMD compiler from system paths ===================="
3134
check_command clang "amd" && CC="$(realpath $(command -v clang))" || exit 1
3235
check_command clang++ "amd" && CXX="$(realpath $(command -v clang++))" || exit 1
33-
check_command flang "amd" && FC="$(realpath $(command -v flang))" || exit 1
36+
check_command gfortran "gcc" && FC="gfortran" || exit 1
37+
add_lib_from_paths GCC_LDFLAGS "libgfortran.*" ${LIB_PATHS}
38+
#check_command flang "amd" && FC="$(realpath $(command -v flang))" || exit 1
3439
F90="${FC}"
3540
F77="${FC}"
3641
;;
@@ -45,7 +50,8 @@ case "${with_amd}" in
4550
check_dir "${pkg_install_dir}/include"
4651
check_command ${pkg_install_dir}/bin/clang "amd" && CC="${pkg_install_dir}/bin/clang" || exit 1
4752
check_command ${pkg_install_dir}/bin/clang++ "amd" && CXX="${pkg_install_dir}/bin/clang++" || exit 1
48-
check_command ${pkg_install_dir}/bin/flang "amd" && FC="${pkg_install_dir}/bin/flang" || exit 1
53+
check_command gfortran "gcc" && FC="$(command -v gfortran)" || exit 1
54+
#check_command ${pkg_install_dir}/bin/flang "amd" && FC="${pkg_install_dir}/bin/flang" || exit 1
4955
F90="${FC}"
5056
F77="${FC}"
5157
AMD_CFLAGS="-I'${pkg_install_dir}/include'"
@@ -58,7 +64,8 @@ if [ "${with_amd}" != "__DONTUSE__" ]; then
5864
echo "CXX is ${CXX}"
5965
[ $(realpath $(command -v clang++) | grep -e aocc-compiler) ] || echo "Check the AMD C++ compiler path"
6066
echo "FC is ${FC}"
61-
[ $(realpath $(command -v flang) | grep -e aocc-compiler) ] || echo "Check the AMD Fortran compiler path"
67+
#[ $(realpath $(command -v flang) | grep -e aocc-compiler) ] || echo "Check the AMD Fortran compiler path"
68+
[ $(realpath $(command -v gfortran) | grep -e aocc-compiler) ] || echo "Check the AMD Fortran compiler path"
6269
cat << EOF > "${BUILDDIR}/setup_amd"
6370
export CC="${CC}"
6471
export CXX="${CXX}"

toolchain/scripts/stage1/install_openmpi.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,8 @@ case "${with_openmpi}" in
106106
check_command mpifort "openmpi" && MPIFC="$(command -v mpifort)" || exit 1
107107
MPIFORT="${MPIFC}"
108108
MPIF77="${MPIFC}"
109-
# Fortran code in ABACUS is built via the mpifort wrapper, but we may need additional
110-
# libraries and linker flags for C/C++-based MPI codepaths, pull them in at this point.
111-
OPENMPI_CFLAGS="$(mpicxx --showme:compile)"
112-
OPENMPI_LDFLAGS="$(mpicxx --showme:link)"
109+
# OPENMPI_CFLAGS="$(mpicxx --showme:compile)"
110+
# OPENMPI_LDFLAGS="$(mpicxx --showme:link)"
113111
;;
114112
__DONTUSE__)
115113
# Nothing to do

toolchain/scripts/stage2/install_aocl.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ MKL_FFTW="yes"
2424
! [ -d "${BUILDDIR}" ] && mkdir -p "${BUILDDIR}"
2525
cd "${BUILDDIR}"
2626

27-
# Not Completed
27+
# Not Completed
28+
# Only need to deal with LAPACK in AOCL, ScaLAPACK and FFTW can use other scripts

0 commit comments

Comments
 (0)