-
-
Notifications
You must be signed in to change notification settings - Fork 122
701 lines (577 loc) · 18.6 KB
/
UnitTests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
name: Unit Tests
on:
pull_request:
paths:
- '.github/workflows/UnitTests.yml'
- 'bin/**'
- 'deps/**'
- 'src/**'
- 'test/**'
- 'lib/**'
push:
branches:
- master
- release-*
paths:
- '.github/workflows/UnitTests.yml'
- 'bin/**'
- 'deps/**'
- 'src/**'
- 'test/**'
- 'lib/**'
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: always.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-default:
timeout-minutes: 20
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
julia_version:
- "1.6"
- "1"
- "nightly"
julia_arch: [x64, x86]
exclude:
- os: macos-latest
julia_arch: x86
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
with:
arch: ${{ matrix.julia_arch }}
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- uses: julia-actions/julia-runtest@latest
test-openmpi-jll:
timeout-minutes: 20
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
julia_version:
- "1.6"
- "1"
- "nightly"
julia_arch: [x64, x86]
exclude:
- os: macos-latest
julia_arch: x86
fail-fast: false
env:
JULIA_MPI_TEST_BINARY: OpenMPI_jll
JULIA_MPI_TEST_ABI: OpenMPI
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
with:
arch: ${{ matrix.julia_arch }}
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use OpenMPI_jll
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
using MPIPreferences
MPIPreferences.use_jll_binary("OpenMPI_jll", export_prefs=true)
rm("test/Manifest.toml")
- uses: julia-actions/julia-runtest@latest
test-system-brew:
timeout-minutes: 20
strategy:
matrix:
mpi:
- mpich
- openmpi
julia_version:
- "1"
fail-fast: false
runs-on: macos-latest
env:
JULIA_MPI_TEST_BINARY: system
ZES_ENABLE_SYSMAN: 1 # https://github.com/open-mpi/ompi/issues/10142
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install MPI via homebrew
run: brew install $MPI
env:
MPI: ${{ matrix.mpi }}
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use system MPI
shell: julia --color=yes --project=. {0}
run: |
using MPIPreferences
MPIPreferences.use_system_binary()
- uses: julia-actions/julia-runtest@latest
env:
# TODO: Only disable this test for MPICH. OpenMPI works fine.
JULIA_MPI_TEST_DISABLE_REDUCE_ON_APPLE: 1
test-system-apt:
timeout-minutes: 20
strategy:
matrix:
mpi:
- libmpich-dev
- libopenmpi-dev
julia_version:
- "1"
fail-fast: false
runs-on: ubuntu-20.04
env:
JULIA_MPI_TEST_BINARY: system
OMPI_MCA_btl_base_warn_component_unused: 0
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install MPI via apt
run: |
sudo apt-get update
sudo apt-get install $MPI
env:
MPI: ${{ matrix.mpi }}
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use system MPI
shell: julia --color=yes --project=. {0}
run: |
using MPIPreferences
MPIPreferences.use_system_binary()
- uses: julia-actions/julia-runtest@latest
test-intel-linux:
timeout-minutes: 20
strategy:
matrix:
julia_version:
- "1"
fail-fast: false
runs-on: ubuntu-latest
env:
JULIA_MPI_TEST_BINARY: system
JULIA_MPI_TEST_ABI: MPICH
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Intel MPI
id: cache-intelmpi
uses: actions/cache@v3
with:
path: l_mpi_2019.9.304.tgz
key: ${{ runner.os }}-intelmpi-2019.9.304
- name: Download Intel MPI
if: steps.cache-intelmpi.outputs.cache-hit != 'true'
run: wget https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/17263/l_mpi_2019.9.304.tgz
- name: Install Intel MPI
run: |
tar -xzf l_mpi_2019.9.304.tgz
pushd l_mpi_2019.9.304
cat << EOF > intel.conf
ACCEPT_EULA=accept
CONTINUE_WITH_OPTIONAL_ERROR=yes
PSET_INSTALL_DIR=${HOME}/intel
CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes
PSET_MODE=install
ARCH_SELECTED=ALL
COMPONENTS=;intel-conda-index-tool__x86_64;intel-comp-l-all-vars__noarch;intel-comp-nomcu-vars__noarch;intel-imb__x86_64;intel-mpi-rt__x86_64;intel-mpi-sdk__x86_64;intel-mpi-doc__x86_64;intel-mpi-samples__x86_64;intel-mpi-installer-license__x86_64;intel-conda-impi_rt-linux-64-shadow-package__x86_64;intel-conda-impi-devel-linux-64-shadow-package__x86_64;intel-mpi-psxe__x86_64;intel-psxe-common__noarch;intel-compxe-pset
EOF
./install.sh --silent intel.conf
popd
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use system MPI
run: |
source ${HOME}/intel/compilers_and_libraries/linux/mpi/intel64/bin/mpivars.sh release
julia --color=yes --project=. -e '
using MPIPreferences
MPIPreferences.use_system_binary()'
# we can't use the usual actions here as we need to ensure the environment variables are set
- name: "Run tests"
run: |
source ${HOME}/intel/compilers_and_libraries/linux/mpi/intel64/bin/mpivars.sh release
julia --color=yes --project -e 'using Pkg; Pkg.test()'
test-oneapi-linux:
timeout-minutes: 20
strategy:
matrix:
julia_version:
- "1"
fail-fast: false
runs-on: ubuntu-latest
env:
JULIA_MPI_TEST_BINARY: system
JULIA_MPI_TEST_ABI: MPICH
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache oneAPI MPI
id: cache-oneapi-mpi
uses: actions/cache@v3
with:
path: l_mpi_oneapi_p_2021.7.0.8711_offline.sh
key: ${{ runner.os }}-oneapi-mpi-2021.7.0.08711
- name: Download oneAPI MPI
if: steps.cache-oneapi-mpi.outputs.cache-hit != 'true'
run: wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18926/l_mpi_oneapi_p_2021.7.0.8711_offline.sh
- name: Install oneAPI MPI
run: |
chmod +x l_mpi_oneapi_p_2021.7.0.8711_offline.sh
./l_mpi_oneapi_p_2021.7.0.8711_offline.sh \
-a \
--silent \
--eula accept \
--ignore-errors \
--install-dir ${HOME}/oneapi \
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use system MPI
run: |
source ${HOME}/oneapi/setvars.sh
julia --color=yes --project=. -e '
using MPIPreferences
MPIPreferences.use_system_binary()'
# we can't use the usual actions here as we need to ensure the environment variables are set
- name: "Run tests"
run: |
source ${HOME}/oneapi/setvars.sh
julia --color=yes --project -e 'using Pkg; Pkg.test()'
test-system-msmpi:
timeout-minutes: 20
strategy:
matrix:
julia_version:
- "1"
fail-fast: false
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download Microsoft MPI
run: (new-object net.webclient).DownloadFile("https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe", "msmpisetup.exe")
shell: powershell
- name: Install Microsoft MPI
run: msmpisetup.exe -unattend -minimal
shell: cmd
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: add MPIPreferences, use system
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
using MPIPreferences
MPIPreferences.use_system_binary(;
export_prefs=true,
mpiexec="C:\\Program Files\\Microsoft MPI\\Bin\\mpiexec"
)
rm("test/Manifest.toml")
- uses: julia-actions/julia-runtest@latest
test-mpitrampoline-jll:
timeout-minutes: 20
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
mpi: [mpitrampoline]
julia_version:
- "1.6"
- "1"
- "nightly"
julia_arch:
- x64
- x86
exclude:
- os: macos-latest
julia_arch: x86
fail-fast: false
runs-on: ${{ matrix.os }}
env:
JULIA_MPI_TEST_BINARY: MPItrampoline_jll
JULIA_MPI_TEST_ABI: MPItrampoline
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use MPItrampoline_jll
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
using MPIPreferences
MPIPreferences.use_jll_binary("MPItrampoline_jll", export_prefs=true)
rm("test/Manifest.toml")
- uses: julia-actions/julia-runtest@latest
test-mpitrampoline-system-apt:
timeout-minutes: 20
strategy:
matrix:
mpi:
- libmpich-dev
- libopenmpi-dev
julia_version:
- "1"
# We don't need to test all combinations
# - "1.7"
# - "nightly"
MPIWrapper:
- "2.10.3"
fail-fast: false
runs-on: ubuntu-20.04
env:
JULIA_MPI_TEST_BINARY: MPItrampoline_jll
JULIA_MPI_TEST_ABI: MPItrampoline
MPITRAMPOLINE_LIB: /usr/local/lib/libmpiwrapper.so
MPITRAMPOLINE_MPIEXEC: /usr/bin/mpiexec
OMPI_MCA_btl_base_warn_component_unused: 0
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install MPI via apt
run: |
sudo apt-get update
sudo apt-get install $MPI
env:
MPI: ${{ matrix.mpi }}
- name: Build MPIwrapper
run: |
wget https://github.com/eschnett/MPIwrapper/archive/refs/tags/v${MPIWrapper}.tar.gz
tar xzf v${MPIWrapper}.tar.gz
cd MPIwrapper-*
cmake -DMPIEXEC_EXECUTABLE=mpiexec -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/local .
cmake --build .
sudo cmake --install .
env:
MPIWrapper: ${{matrix.MPIWrapper}}
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use MPItrampoline_jll
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
using MPIPreferences
MPIPreferences.use_jll_binary("MPItrampoline_jll", export_prefs=true)
rm("test/Manifest.toml")
- uses: julia-actions/julia-runtest@latest
test-mpitrampoline-intel-linux:
timeout-minutes: 20
strategy:
matrix:
julia_version:
- "1.6"
# We don't need to test all combinations
# - "1.7"
# - "nightly"
MPIWrapper:
- "2.10.3"
fail-fast: false
runs-on: ubuntu-latest
env:
JULIA_MPI_TEST_BINARY: MPItrampoline_jll
JULIA_MPI_TEST_ABI: MPItrampoline
MPITRAMPOLINE_LIB: /usr/local/lib/libmpiwrapper.so
MPITRAMPOLINE_MPIEXEC: /home/runner/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/bin/mpiexec
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Intel MPI
id: cache-intelmpi
uses: actions/cache@v3
with:
path: l_mpi_2019.9.304.tgz
key: ${{ runner.os }}-intelmpi-2019.9.304
- name: Download Intel MPI
if: steps.cache-intelmpi.outputs.cache-hit != 'true'
run: wget https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/17263/l_mpi_2019.9.304.tgz
- name: Install Intel MPI
run: |
tar -xzf l_mpi_2019.9.304.tgz
pushd l_mpi_2019.9.304
cat << EOF > intel.conf
ACCEPT_EULA=accept
CONTINUE_WITH_OPTIONAL_ERROR=yes
PSET_INSTALL_DIR=${HOME}/intel
CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes
PSET_MODE=install
ARCH_SELECTED=ALL
COMPONENTS=;intel-conda-index-tool__x86_64;intel-comp-l-all-vars__noarch;intel-comp-nomcu-vars__noarch;intel-imb__x86_64;intel-mpi-rt__x86_64;intel-mpi-sdk__x86_64;intel-mpi-doc__x86_64;intel-mpi-samples__x86_64;intel-mpi-installer-license__x86_64;intel-conda-impi_rt-linux-64-shadow-package__x86_64;intel-conda-impi-devel-linux-64-shadow-package__x86_64;intel-mpi-psxe__x86_64;intel-psxe-common__noarch;intel-compxe-pset
EOF
./install.sh --silent intel.conf
popd
- name: Build MPIwrapper
run: |
source ${HOME}/intel/compilers_and_libraries/linux/mpi/intel64/bin/mpivars.sh release
wget https://github.com/eschnett/MPIwrapper/archive/refs/tags/v${MPIWrapper}.tar.gz
tar xzf v${MPIWrapper}.tar.gz
cd MPIwrapper-*
cmake \
-DMPIEXEC_EXECUTABLE=mpiexec \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr/local \
.
cmake --build .
sudo cmake --install .
env:
MPIWrapper: ${{matrix.MPIWrapper}}
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
# https://discourse.julialang.org/t/recommendation-cache-julia-artifacts-in-ci-services/35484
- name: Cache artifacts
uses: actions/cache@v3
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use MPItrampoline_jll
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
using MPIPreferences
MPIPreferences.use_jll_binary("MPItrampoline_jll", export_prefs=true)
rm("test/Manifest.toml")
# We can't use the usual actions here as we need to ensure the environment variables are set
- name: "Build package"
run: |
source ${HOME}/intel/compilers_and_libraries/linux/mpi/intel64/bin/mpivars.sh release
julia --color=yes --project -e 'using Pkg; Pkg.instantiate(verbose=true); Pkg.build(verbose=true)'
- name: "Run tests"
run: |
source ${HOME}/intel/compilers_and_libraries/linux/mpi/intel64/bin/mpivars.sh release
julia --color=yes --project -e 'using Pkg; Pkg.test()'
test-spack-mvapich:
timeout-minutes: 60
strategy:
matrix:
julia_version:
- "1"
fail-fast: false
runs-on: ubuntu-22.04
env:
JULIA_MPI_TEST_BINARY: system
JULIA_MPI_TEST_EXCLUDE: test_spawn.jl
MV2_SMP_USE_CMA: 0
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache MVAPICH
uses: actions/cache@v3
with:
path: |
.ci/mvapich/opt
.ci/mvapich/.spack-env
key: ${{ runner.os }}-mvapich-2.3.7
- name: Install MVAPICH dependencies
run: |
sudo apt-get update
sudo apt-get install libibverbs-dev libpciaccess-dev libxml2-dev pkgconf rdma-core zlib1g-dev
- name: Install MVAPICH via Spack
run: |
git clone -c feature.manyFiles=true --depth 1 https://github.com/spack/spack.git
spack/bin/spack -e .ci/mvapich concretize -f
spack/bin/spack -e .ci/mvapich install
- name: Set PATH and LD_LIBRARY_PATH
run: |
echo "PATH=$(realpath .ci/mvapich/.spack-env/view/bin):${PATH}" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$(realpath .ci/mvapich/.spack-env/view/lib):${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
Pkg.precompile()
- name: use system MPI
shell: julia --color=yes --project=. {0}
run: |
using MPIPreferences
MPIPreferences.use_system_binary()
- uses: julia-actions/julia-runtest@latest