File: build-run.sh

package info (click to toggle)
armci-mpi 0.3.1~beta-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,868 kB
  • sloc: ansic: 13,028; sh: 243; makefile: 94; fortran: 44
file content (57 lines) | stat: -rwxr-xr-x 1,336 bytes parent folder | download | duplicates (3)
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
#! /bin/sh

# Exit on error
set -ev

os=`uname`
TRAVIS_ROOT="$1"
MPI_IMPL="$2"

# Environment variables
export CFLAGS="-std=c99 -Wall -Wextra"
#export MPICH_CC=$CC
export MPICC=mpicc

# PROGRESS is disabled for Linux testing
case "$os" in
    Darwin)
       PROGRESS=yes
        ;;
    Linux)
       PROGRESS=no
       export PATH=$TRAVIS_ROOT/mpich/bin:$PATH
       export PATH=$TRAVIS_ROOT/open-mpi/bin:$PATH
       ;;
esac

# Capture details of build
case "$MPI_IMPL" in
    mpich)
        mpichversion
        mpicc -show
        export HWLOC_COMPONENTS=no_os
        export OVERSUBSCRIBE=""
        ;;
    openmpi)
        # this is missing with Mac build it seems
        #ompi_info --arch --config
        mpicc --showme:command
        # see https://github.com/open-mpi/ompi/issues/2956
        # fixes issues e.g. https://travis-ci.org/jeffhammond/armci-mpi/jobs/211165004
        export TMPDIR=/tmp
        # see https://github.com/open-mpi/ompi/issues/6275
        # workaround Open-MPI 4.0.0 RMA bug
        export OMPI_MCA_osc=sm,pt2pt
        export OVERSUBSCRIBE="--oversubscribe"
        ;;
esac

# Configure and build
./autogen.sh
./configure --with-progress=$PROGRESS
make V=1

# Run unit tests
export ARMCI_VERBOSE=1
make check MPIEXEC="mpirun ${OVERSUBSCRIBE} -n 2"
make check MPIEXEC="mpirun ${OVERSUBSCRIBE} -n 4"