Skip to content

Commit

Permalink
Merge branch 'main' into issue-733-impl-random-init
Browse files Browse the repository at this point in the history
  • Loading branch information
rouson committed Oct 18, 2021
2 parents 6c4b523 + ef8069d commit bad7f50
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 12 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on: push

jobs:
Build:
runs-on: ubuntu-latest
strategy:
fail-fast: true

env:
FC: gfortran
GCC_V: 10

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Dependencies
run: |
sudo apt install -y gfortran-${GCC_V} cmake mpich
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} 100
- name: Build and Test
run: |
mkdir build
cd build
cmake -Wdev -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" -DCMAKE_BUILD_TYPE:STRING="Debug" ..
make -j $(nproc)
ctest --output-on-failure --schedule-random --repeat-until-fail 1 --timeout 200
make install
make uninstall
6 changes: 2 additions & 4 deletions prerequisites/build-functions/set_or_print_downloader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ set_or_print_downloader()

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

if [[ "${package_name}" == "gcc" ]]; then
arg_b=${arg_b:-releases/gcc-${version_to_build}}
elif [[ "${package_name}" == "ofp" ]]; then
if [[ "${package_name}" == "ofp" ]]; then
"${OPENCOARRAYS_SRC_DIR}/prerequisites/install-ofp.sh" "${@}"
exit 0
fi
Expand All @@ -36,7 +34,7 @@ set_or_print_downloader()
tried="curl, wget, and ftp"
fi

if [[ "${package_name}" == "gcc" ]]; then
if [[ "${package_name}" == "gcc" && ! -z ${arg_b:-} ]]; then
if type git &> /dev/null; then
fetch=git
else
Expand Down
11 changes: 9 additions & 2 deletions prerequisites/build-functions/set_or_print_url.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ else
major_minor="${version_to_build%.*}"
fi
package_url_head=(
"gcc;https://gcc.gnu.org/git/"
"gcc;https://ftp.gnu.org/gnu/gcc/gcc-${version_to_build-}/"
"wget;https://ftpmirror.gnu.org/gnu/wget/"
"m4;https://ftpmirror.gnu.org/gnu/m4/"
"pkg-config;https://pkgconfig.freedesktop.org/releases/"
Expand All @@ -44,9 +44,13 @@ else
fi
done

if [[ ! -z ${arg_b:-} && ${package_to_build} == 'gcc' ]]; then
url_head="https://gcc.gnu.org/git/"
fi

# Set differing tails for GCC release downloads versus development branch checkouts
package_url_tail=(
"gcc;gcc"
"gcc;gcc-${version_to_build-}.tar.gz"
"wget;wget-${version_to_build-}.tar.gz"
"m4;m4-${version_to_build-}.tar.bz2"
"pkg-config;pkg-config-${version_to_build-}.tar.gz"
Expand All @@ -71,6 +75,9 @@ else
fi
done

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

if [[ -z "${url_head:-}" || -z "${url_tail}" ]]; then
emergency "Package ${package_name:-} not recognized. Use --l or --list-packages to list the allowable names."
Expand Down
5 changes: 4 additions & 1 deletion prerequisites/install-functions/build_opencoarrays.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ build_opencoarrays()
MPIFC_show=($("$MPIFC" -show))
MPICC_show=($("$MPICC" -show))
if [[ "${MPIFC_show[0]}" != *gfortran* ]]; then
emergency "build_opencoarrays.sh: MPI doesn't wrap gfortran/gcc: \${MPIFC_show}=${MPIFC_show[*]}"
export fortran_compiler_identity="$(${MPIFC_show[0]} --version)"
if [[ $fortran_compiler_identity != "GNU Fortran"* ]]; then
emergency "build_opencoarrays.sh: MPI doesn't wrap gfortran/gcc: \${MPIFC_show}=${MPIFC_show[*]}"
fi
fi
if [[ -z "${OPENCOARRAYS_DEVELOPER:-}" ]]; then
# We should examine the value too, but CMake has many ways of saying "true"
Expand Down
6 changes: 1 addition & 5 deletions prerequisites/install-functions/report_results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
report_results()
{
fully_qualified_FC="$(type -P "${FC}")"
if [[ ${fully_qualified_FC} != *gfortran* ]]; then
emergency "report_results.sh: non-gfortran compiler: \${fully_qualified_FC}=${fully_qualified_FC}"
fi
# Set path_to_FC fully-qualified gfortran location
compiler_install_root="${fully_qualified_FC%bin/gfortran*}"
compiler_install_root="${fully_qualified_FC%bin/${FC}}"

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

0 comments on commit bad7f50

Please sign in to comment.