Skip to content

Commit bad7f50

Browse files
author
Damian Rouson
authored
Merge branch 'main' into issue-733-impl-random-init
2 parents 6c4b523 + ef8069d commit bad7f50

File tree

5 files changed

+48
-12
lines changed

5 files changed

+48
-12
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on: push
4+
5+
jobs:
6+
Build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: true
10+
11+
env:
12+
FC: gfortran
13+
GCC_V: 10
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Install Dependencies
20+
run: |
21+
sudo apt install -y gfortran-${GCC_V} cmake mpich
22+
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} 100
23+
24+
- name: Build and Test
25+
run: |
26+
mkdir build
27+
cd build
28+
cmake -Wdev -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" -DCMAKE_BUILD_TYPE:STRING="Debug" ..
29+
make -j $(nproc)
30+
ctest --output-on-failure --schedule-random --repeat-until-fail 1 --timeout 200
31+
make install
32+
make uninstall

prerequisites/build-functions/set_or_print_downloader.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ set_or_print_downloader()
1111

1212
package_name="${arg_p:-${arg_D:-${arg_P:-${arg_U:-${arg_V}}}}}"
1313

14-
if [[ "${package_name}" == "gcc" ]]; then
15-
arg_b=${arg_b:-releases/gcc-${version_to_build}}
16-
elif [[ "${package_name}" == "ofp" ]]; then
14+
if [[ "${package_name}" == "ofp" ]]; then
1715
"${OPENCOARRAYS_SRC_DIR}/prerequisites/install-ofp.sh" "${@}"
1816
exit 0
1917
fi
@@ -36,7 +34,7 @@ set_or_print_downloader()
3634
tried="curl, wget, and ftp"
3735
fi
3836

39-
if [[ "${package_name}" == "gcc" ]]; then
37+
if [[ "${package_name}" == "gcc" && ! -z ${arg_b:-} ]]; then
4038
if type git &> /dev/null; then
4139
fetch=git
4240
else

prerequisites/build-functions/set_or_print_url.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ else
2121
major_minor="${version_to_build%.*}"
2222
fi
2323
package_url_head=(
24-
"gcc;https://gcc.gnu.org/git/"
24+
"gcc;https://ftp.gnu.org/gnu/gcc/gcc-${version_to_build-}/"
2525
"wget;https://ftpmirror.gnu.org/gnu/wget/"
2626
"m4;https://ftpmirror.gnu.org/gnu/m4/"
2727
"pkg-config;https://pkgconfig.freedesktop.org/releases/"
@@ -44,9 +44,13 @@ else
4444
fi
4545
done
4646

47+
if [[ ! -z ${arg_b:-} && ${package_to_build} == 'gcc' ]]; then
48+
url_head="https://gcc.gnu.org/git/"
49+
fi
50+
4751
# Set differing tails for GCC release downloads versus development branch checkouts
4852
package_url_tail=(
49-
"gcc;gcc"
53+
"gcc;gcc-${version_to_build-}.tar.gz"
5054
"wget;wget-${version_to_build-}.tar.gz"
5155
"m4;m4-${version_to_build-}.tar.bz2"
5256
"pkg-config;pkg-config-${version_to_build-}.tar.gz"
@@ -71,6 +75,9 @@ else
7175
fi
7276
done
7377

78+
if [[ ! -z ${arg_b:-} && ${package_to_build} == 'gcc' ]]; then
79+
url_tail="gcc"
80+
fi
7481

7582
if [[ -z "${url_head:-}" || -z "${url_tail}" ]]; then
7683
emergency "Package ${package_name:-} not recognized. Use --l or --list-packages to list the allowable names."

prerequisites/install-functions/build_opencoarrays.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ build_opencoarrays()
1919
MPIFC_show=($("$MPIFC" -show))
2020
MPICC_show=($("$MPICC" -show))
2121
if [[ "${MPIFC_show[0]}" != *gfortran* ]]; then
22-
emergency "build_opencoarrays.sh: MPI doesn't wrap gfortran/gcc: \${MPIFC_show}=${MPIFC_show[*]}"
22+
export fortran_compiler_identity="$(${MPIFC_show[0]} --version)"
23+
if [[ $fortran_compiler_identity != "GNU Fortran"* ]]; then
24+
emergency "build_opencoarrays.sh: MPI doesn't wrap gfortran/gcc: \${MPIFC_show}=${MPIFC_show[*]}"
25+
fi
2326
fi
2427
if [[ -z "${OPENCOARRAYS_DEVELOPER:-}" ]]; then
2528
# We should examine the value too, but CMake has many ways of saying "true"

prerequisites/install-functions/report_results.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
report_results()
33
{
44
fully_qualified_FC="$(type -P "${FC}")"
5-
if [[ ${fully_qualified_FC} != *gfortran* ]]; then
6-
emergency "report_results.sh: non-gfortran compiler: \${fully_qualified_FC}=${fully_qualified_FC}"
7-
fi
8-
# Set path_to_FC fully-qualified gfortran location
9-
compiler_install_root="${fully_qualified_FC%bin/gfortran*}"
5+
compiler_install_root="${fully_qualified_FC%bin/${FC}}"
106

117
fully_qualified_MPIFC="$(type -P "${MPIFC}")"
128
mpi_install_root="${fully_qualified_MPIFC%bin/mpifort*}"

0 commit comments

Comments
 (0)