Skip to content

Commit 33cc3ed

Browse files
author
Alessandro Fanfarillo
committed
Merge branch 'opencoarrays-teams' of https://github.com/sourceryinstitute/OpenCoarrays into opencoarrays-teams
2 parents 828ee38 + 2a3b4b2 commit 33cc3ed

File tree

101 files changed

+12102
-2869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+12102
-2869
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.log
2+
log.*
3+
.git
4+
.gitignore
5+
hooks
6+
*~
7+
Untitled*.ipynb
8+
Makefile
9+
#*#
10+
\#*\#
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
FROM jupyter/minimal-notebook:da2c5a4d00fa
2+
3+
MAINTAINER Izaak Beekman <[email protected]>
4+
5+
USER root
6+
ENV GCC_VERSION 7.2.0
7+
8+
ENV NB_USER jovyan
9+
ENV NB_UID 1000
10+
ENV HOME /home/${NB_USER}
11+
12+
RUN DEBIAN_FRONTEND=noninteractive transientBuildDeps="file" \
13+
&& set -v \
14+
&& cat /etc/issue \
15+
&& uname -a \
16+
&& echo "${DEBIAN_FRONTEND}" \
17+
&& apt-get update -y \
18+
&& apt-get install -y \
19+
software-properties-common \
20+
&& add-apt-repository ppa:ubuntu-toolchain-r/test -y \
21+
&& apt-get update -y \
22+
&& apt-get install -y \
23+
build-essential \
24+
gcc-7=${GCC_VERSION}-1ubuntu1~16.04 \
25+
gfortran-7=${GCC_VERSION}-1ubuntu1~16.04 \
26+
g++-7=${GCC_VERSION}-1ubuntu1~16.04 \
27+
mpich \
28+
${transientBuildDeps} \
29+
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-7 \
30+
&& update-alternatives --set gcc "/usr/bin/gcc-7" \
31+
&& gcc --version \
32+
&& gfortran --version \
33+
&& mpiexec --version \
34+
&& mpifort --version \
35+
&& mpicc --version \
36+
&& apt-get clean \
37+
&& apt-get purge -y --auto-remove ${transientBuildDeps} \
38+
&& rm -rf /var/lib/apt/lists/* /var/log/* /tmp/*
39+
40+
# Build-time metadata as defined at http://label-schema.org
41+
ARG BUILD_DATE
42+
ARG VCS_REF
43+
ARG VCS_URL
44+
ARG VCS_VERSION=latest
45+
LABEL org.label-schema.schema-version="1.0" \
46+
org.label-schema.build-date="${BUILD_DATE}" \
47+
org.label-schema.name="" \
48+
org.label-schema.description="Coarray Fortran compiler with GFortran ${GCC_VERSION}, OpenCoarrays and MPICH backend" \
49+
org.label-schema.url="https://github.com/sourceryinstitute/OpenCoarrays#readme/" \
50+
org.label-schema.vcs-ref="${VCS_REF}" \
51+
org.label-schema.vcs-url="${VCS_URL}" \
52+
org.label-schema.version="${VCS_VERSION}" \
53+
org.label-schema.vendor="SourceryInstitute" \
54+
org.label-schema.license="BSD" \
55+
org.label-schema.docker.cmd="docker run -i -t -p 8888:8888 sourceryinstitute/opencoarrays-notebook"
56+
57+
ARG RUN_TESTS=false
58+
59+
RUN DEBIAN_FRONTEND=noninteractive transientBuildDeps="cmake git" \
60+
&& set -v \
61+
&& echo "${DEBIAN_FRONTEND}" \
62+
&& apt-get update && apt-get install -y \
63+
${transientBuildDeps} \
64+
&& cmake --version \
65+
&& gcc --version \
66+
&& gfortran --version \
67+
&& git clone --single-branch https://github.com/sourceryinstitute/OpenCoarrays \
68+
&& mkdir OpenCoarrays/build \
69+
&& cd OpenCoarrays/build \
70+
&& FC="$(which gfortran)" CC="$(which gcc)" cmake -DCMAKE_BUILD_TYPE=Release .. \
71+
&& make -j "$(nproc)" install \
72+
&& if [ "${RUN_TESTS}" = "true" ] ; then ctest --output-on-failure ; fi \
73+
&& cd ../.. \
74+
&& caf --version \
75+
&& cafrun --version \
76+
&& rm -rf OpenCoarrays \
77+
&& apt-get clean \
78+
&& apt-get purge -y --auto-remove ${transientBuildDeps} \
79+
&& rm -rf /var/lib/apt/lists/* /var/log/* /tmp/*
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
SHELL := /usr/local/bin/bash -o pipefail
2+
NAME = sourceryinstitute/opencoarrays-notebook
3+
#UBADGER_ENDPOINT = "https://hooks.microbadger.com/images/sourceryinstitute/jupyter-caf-kernel/CEL6DIVw-OVbUIXieZhZwvDXl3I="
4+
GIT_MASTER_HEAD_SHA:=$(shell git rev-parse --short=12 --verify HEAD)
5+
6+
.PHONY: help build push run runclean clean
7+
.DEFAULT_GOAL := help
8+
9+
# Add the following 'help' target to your Makefile
10+
# And add help text after each target name starting with '\#\#'
11+
12+
help: ## This help message
13+
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
14+
15+
build: $(subst /,_,$(NAME))-build.stamp ## Build docker file. Depending on which packages are rebuilt this may take a long time
16+
17+
$(subst /,_,$(NAME))-build.stamp: Dockerfile .dockerignore hooks/build ## Target for doing & timestamping the build
18+
touch $@
19+
hooks/build 2>&1 | tee $(subst stamp,log,$@) || rm -rf $@
20+
docker tag $(NAME):latest $(NAME):$(GIT_MASTER_HEAD_SHA)
21+
22+
push: $(subst /,_,$(NAME))-push.stamp ## Push prebuild docker image up to hub.docker.com
23+
24+
$(subst /,_,$(NAME))-push.stamp: $(subst /,_,$(NAME))-build.stamp Dockerfile .dockerignore hooks/build ## Target for doing & timestamping the push
25+
touch $@
26+
docker push $(NAME):latest | tee $(subst stamp,log,$@) || rm -rf $@
27+
docker push $(NAME):$(GIT_MASTER_HEAD_SHA) | tee -a $(subst stamp,log,$@) || rm -rf $@
28+
-curl -X POST "$(UBADGER_ENDPOINT)"
29+
30+
run: ## Target to run jupyter-hub docker server
31+
docker run -i -t -p 8888:8888 $(NAME) | tee $(subst /,_,$(NAME))-run.log
32+
33+
runclean: ## Target to run jupyter-hub docker server, discarding changes
34+
docker run --rm -i -t -p 8888:8888 $(NAME) | tee $(subst /,_,$(NAME))-runclean.log
35+
36+
clean:
37+
-rm -rf $(subst /,_,$(NAME))*.stamp
38+
-find . -name 'Untitled*.ipynd' -exec rm -f {} \;
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/bash
2+
# See https://github.com/rossf7/label-schema-automated-build
3+
# or https://medium.com/microscaling-systems/labelling-automated-builds-on-docker-hub-f3d073fb8e1#.wgkzfdnfr
4+
# for more details.
5+
6+
# $IMAGE_NAME var is injected into the build so the tag is correct.
7+
8+
set -o verbose
9+
set -o pipefail
10+
set -o errexit
11+
set -x
12+
13+
git fetch -v --all --tags
14+
git fetch -v --all --depth=9999999 --update-shallow
15+
git tag --list
16+
git branch
17+
18+
d_repo='sourceryinstitute/OpenCoarrays'
19+
d_git_remotes=($(git remote show))
20+
echo "${#d_git_remotes[@]} git remotes found."
21+
n_remotes=${#d_git_remotes[@]}
22+
if (( n_remotes > 0 )) ; then
23+
echo "Using remote: ${d_git_remotes[0]}"
24+
d_vcs_url="$(git remote -v | awk 'FNR == 1 {print $2}')"
25+
fi
26+
27+
if [[ -z "${d_vcs_url:-}" ]]; then
28+
d_vcs_url="https://github.com/${DOCKER_REPO:-${d_repo}}"
29+
fi
30+
31+
branch_name="$(git symbolic-ref -q HEAD)" || true
32+
branch_name="${branch_name##refs/heads/}"
33+
branch_name="${branch_name:-DETACHED-HEAD}"
34+
35+
d_vcs_describe="$(git describe --tags --always || true)"
36+
d_tag="${IMAGE_NAME##*:}"
37+
d_tag="${d_tag:-${branch_name}-$(date +%s)}"
38+
d_vcs_tag="$(git rev-parse --short=12 --verify HEAD)"
39+
40+
if [[ ${IMAGE_NAME:-} ]]; then
41+
export RUN_TESTS=false
42+
else
43+
export RUN_TESTS=${RUN_TESTS:-false}
44+
fi
45+
46+
47+
opencoarrays_version="${d_vcs_describe}"
48+
if [[ -n "${open_coarrays_version:-}" ]]; then
49+
opencoarrays_version=1.9.2
50+
fi
51+
52+
echo "Build hook running"
53+
docker build --build-arg OPENCOARRAYS_VERSION="${opencoarrays_version}" \
54+
--build-arg RUN_TESTS=${RUN_TESTS} \
55+
--build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
56+
--build-arg VCS_REF="${SOURCE_COMMIT:-$(git rev-parse --short HEAD)}" \
57+
--build-arg VCS_URL="${d_vcs_url}" \
58+
--build-arg VCS_VERSION="${d_vcs_describe:-${d_tag}}" \
59+
--rm \
60+
--pull \
61+
-t "${IMAGE_NAME:-$(tr '[:upper:]' '[:lower:]' <<< "${d_repo}:latest")}" .
62+
docker tag "${IMAGE_NAME:-$(tr '[:upper:]' '[:lower:]' <<< "${d_repo}:latest")}" "${IMAGE_NAME:-$(tr '[:upper:]' '[:lower:]' <<< "${d_repo}:${d_vcs_tag}")}"

.VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
$Format:%d%n%n$
22
# Fall back version, probably last release:
3-
1.9.0
3+
1.9.3
44

55
# OpenCoarrays version file. This project uses semantic
66
# versioning. For details see http://semver.org

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ developer-scripts export-ignore
3232
codecov.yml export-ignore
3333
*.enc export-ignore
3434
.github export-ignore
35+
makefile export-ignore
36+
Makefile export-ignore
37+
make.inc* export-ignore
38+
.Dockerfiles export-ignore
39+
40+
# Experimental conduits/backends
41+
src/gasnet export-ignore
42+
src/openshmem export-ignore
3543

3644
# Perform substitutions when `git export`ing these files
3745
.VERSION export-subst

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ This pull request (PR) is a:
3636

3737
### I certify that ###
3838

39-
- [ ] I have reviewed the [contributing guidelines] and followed the
40-
policies on:
41-
- Pull request (PR) naming to indicate work in progress (WIP),
42-
and to attach the PR to the appropriate bug report, or feature
43-
request [issue]
39+
- [ ] I reviewed and followed the [contributing guidelines], including
40+
- Increasing test coverage for all feature-addition PRs
41+
- Increasing test coverage for all bug-fix PRs for which there
42+
does not already exist a related test that failed before the PR
43+
- At least maintaining test coverage for all other PRs
44+
- Ensuring that all tests pass when run locally
45+
- Naming PR to indicate work in progress (WIP) and to attach the PR
46+
to the appropriate bug report or feature request [issue]
4447
- White space (no trailing white space or white space errors may
4548
be introduced)
4649
- Commenting code where it is non-obvious and non-trivial
47-
- Running tests locally, to ensure all of them pass
48-
- Maintaining or increasing test coverage
4950
- Logically atomic, self consistent and coherent commits
5051
- Commit message content
51-
- Waiting 24 hours before self-approving the pull request to
52-
give another OpenCoarrays developer a chance to review my
53-
proposed code
52+
- Waiting 24 hours before self-approving the PR to give another
53+
OpenCoarrays developer a chance to review my proposed code

0 commit comments

Comments
 (0)