Skip to content

Commit 2199564

Browse files
simonbyrnegiordano
andauthored
test on mvapich (#700)
Install MVAPICH via Spack, and cache library. Exclude spawn tests (known not to work) Co-authored-by: Mosè Giordano <mose@gnu.org>
1 parent 6f05aa1 commit 2199564

File tree

3 files changed

+237
-1
lines changed

3 files changed

+237
-1
lines changed

.ci/mvapich/spack.yaml

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# This is a Spack Environment file.
2+
#
3+
# It describes a set of packages to be installed, along with
4+
# configuration settings.
5+
spack:
6+
# add package specs to the `specs` list
7+
specs: [mvapich2@2.3.7%gcc@12.1.0]
8+
view: true
9+
concretizer:
10+
unify: true
11+
config:
12+
install_tree:
13+
root: opt/spack
14+
compilers::
15+
- compiler:
16+
spec: clang@12.0.1
17+
paths:
18+
cc: /usr/bin/clang-12
19+
cxx: /usr/bin/clang++-12
20+
f77: null
21+
fc: null
22+
flags: {}
23+
operating_system: ubuntu22.04
24+
target: x86_64
25+
modules: []
26+
environment: {}
27+
extra_rpaths: []
28+
- compiler:
29+
spec: clang@13.0.1
30+
paths:
31+
cc: /usr/bin/clang-13
32+
cxx: /usr/bin/clang++-13
33+
f77: null
34+
fc: null
35+
flags: {}
36+
operating_system: ubuntu22.04
37+
target: x86_64
38+
modules: []
39+
environment: {}
40+
extra_rpaths: []
41+
- compiler:
42+
spec: clang@14.0.0
43+
paths:
44+
cc: /usr/bin/clang
45+
cxx: /usr/bin/clang++
46+
f77: null
47+
fc: null
48+
flags: {}
49+
operating_system: ubuntu22.04
50+
target: x86_64
51+
modules: []
52+
environment: {}
53+
extra_rpaths: []
54+
- compiler:
55+
spec: gcc@9.5.0
56+
paths:
57+
cc: /usr/bin/gcc-9
58+
cxx: /usr/bin/g++-9
59+
f77: /usr/bin/gfortran-9
60+
fc: /usr/bin/gfortran-9
61+
flags: {}
62+
operating_system: ubuntu22.04
63+
target: x86_64
64+
modules: []
65+
environment: {}
66+
extra_rpaths: []
67+
- compiler:
68+
spec: gcc@10.4.0
69+
paths:
70+
cc: /usr/bin/gcc-10
71+
cxx: /usr/bin/g++-10
72+
f77: /usr/bin/gfortran-10
73+
fc: /usr/bin/gfortran-10
74+
flags: {}
75+
operating_system: ubuntu22.04
76+
target: x86_64
77+
modules: []
78+
environment: {}
79+
extra_rpaths: []
80+
- compiler:
81+
spec: gcc@11.3.0
82+
paths:
83+
cc: /usr/bin/gcc
84+
cxx: /usr/bin/g++
85+
f77: /usr/bin/gfortran
86+
fc: /usr/bin/gfortran
87+
flags: {}
88+
operating_system: ubuntu22.04
89+
target: x86_64
90+
modules: []
91+
environment: {}
92+
extra_rpaths: []
93+
- compiler:
94+
spec: gcc@12.1.0
95+
paths:
96+
cc: /usr/bin/gcc-12
97+
cxx: /usr/bin/g++-12
98+
f77: /usr/bin/gfortran-12
99+
fc: /usr/bin/gfortran-12
100+
flags: {}
101+
operating_system: ubuntu22.04
102+
target: x86_64
103+
modules: []
104+
environment: {}
105+
extra_rpaths: []
106+
packages::
107+
bison:
108+
externals:
109+
- spec: bison@3.8.2
110+
prefix: /usr
111+
cmake:
112+
externals:
113+
- spec: cmake@3.25.1
114+
prefix: /usr/local
115+
findutils:
116+
externals:
117+
- spec: findutils@4.8.0
118+
prefix: /usr
119+
flex:
120+
externals:
121+
- spec: flex@2.6.4+lex
122+
prefix: /usr
123+
gettext:
124+
externals:
125+
- spec: gettext@0.21
126+
prefix: /usr
127+
libtool:
128+
externals:
129+
- spec: libtool@2.4.6
130+
prefix: /usr
131+
libpciaccess:
132+
externals:
133+
- spec: libpciaccess@0.16
134+
prefix: /usr
135+
libxml2:
136+
externals:
137+
- spec: libxml2@2.9.13
138+
prefix: /usr
139+
m4:
140+
externals:
141+
- spec: m4@1.4.18
142+
prefix: /usr
143+
perl:
144+
externals:
145+
- spec: perl@5.34.0~cpanm+shared+threads
146+
prefix: /usr
147+
pkgconf:
148+
externals:
149+
- spec: pkgconf@1.8.0
150+
prefix: /usr
151+
python:
152+
externals:
153+
- spec: python@3.10.6+bz2+crypt+ctypes+dbm+lzma+nis+pyexpat+pythoncmd+readline+sqlite3+ssl~tkinter+uuid+zlib
154+
prefix: /usr
155+
rdma-core:
156+
externals:
157+
- spec: rdma-core@39.0
158+
prefix: /usr
159+
tar:
160+
externals:
161+
- spec: tar@1.34
162+
prefix: /usr
163+
xz:
164+
externals:
165+
- spec: xz@5.2.5
166+
prefix: /usr
167+
zlib:
168+
externals:
169+
- spec: zlib@1.2.11
170+
prefix: /usr

.github/workflows/UnitTests.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,3 +626,67 @@ jobs:
626626
run: |
627627
source ${HOME}/intel/compilers_and_libraries/linux/mpi/intel64/bin/mpivars.sh release
628628
julia --color=yes --project -e 'using Pkg; Pkg.test()'
629+
630+
test-spack-mvapich:
631+
timeout-minutes: 60
632+
strategy:
633+
matrix:
634+
julia_version:
635+
- "1"
636+
637+
fail-fast: false
638+
639+
runs-on: ubuntu-22.04
640+
641+
env:
642+
JULIA_MPI_TEST_BINARY: system
643+
JULIA_MPI_TEST_EXCLUDE: test_spawn.jl
644+
MV2_SMP_USE_CMA: 0
645+
646+
steps:
647+
- name: Checkout
648+
uses: actions/checkout@v3
649+
650+
- name: Cache MVAPICH
651+
uses: actions/cache@v3
652+
with:
653+
path: |
654+
.ci/mvapich/opt
655+
.ci/mvapich/.spack-env
656+
key: ${{ runner.os }}-mvapich-2.3.7
657+
658+
- name: Install MVAPICH dependencies
659+
run: |
660+
sudo apt-get update
661+
sudo apt-get install libibverbs-dev libpciaccess-dev libxml2-dev pkgconf rdma-core zlib1g-dev
662+
663+
- name: Install MVAPICH via Spack
664+
uses: vsoch/spack-package-action/envpackage@main
665+
with:
666+
spack_yaml: .ci/mvapich/spack.yaml
667+
deploy: false
668+
669+
- name: Set PATH and LD_LIBRARY_PATH
670+
run: |
671+
echo "PATH=$(realpath .ci/mvapich/.spack-env/view/bin):${PATH}" >> $GITHUB_ENV
672+
echo "LD_LIBRARY_PATH=$(realpath .ci/mvapich/.spack-env/view/lib):${LD_LIBRARY_PATH}" >> $GITHUB_ENV
673+
674+
- uses: julia-actions/setup-julia@latest
675+
with:
676+
version: ${{ matrix.julia_version }}
677+
678+
- uses: julia-actions/cache@v1
679+
- name: add MPIPreferences
680+
shell: julia --color=yes --project=. {0}
681+
run: |
682+
using Pkg
683+
Pkg.develop(path="lib/MPIPreferences")
684+
Pkg.precompile()
685+
686+
- name: use system MPI
687+
shell: julia --color=yes --project=. {0}
688+
run: |
689+
using MPIPreferences
690+
MPIPreferences.use_system_binary()
691+
692+
- uses: julia-actions/julia-runtest@latest

test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ if Sys.isunix()
3636
include("mpiexecjl.jl")
3737
end
3838

39+
excludefiles = split(get(ENV,"JULIA_MPI_TEST_EXCLUDE",""),',')
40+
3941
testdir = @__DIR__
40-
istest(f) = endswith(f, ".jl") && startswith(f, "test_")
42+
istest(f) = endswith(f, ".jl") && startswith(f, "test_") && !in(f, excludefiles)
4143
testfiles = sort(filter(istest, readdir(testdir)))
4244

4345
@testset "$f" for f in testfiles

0 commit comments

Comments
 (0)