From 06e7d48278c5d7d0c8b36803f211231dbda98d63 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 22 Nov 2023 17:58:47 -0500 Subject: [PATCH] Set up 32-bit architectures correctly --- docker/Dockerfile | 9 ++++----- docker/test-all.sh | 18 ++++++++++++++++++ mpiabi/mpiabif_constants.h | 12 ++++-------- 3 files changed, 26 insertions(+), 13 deletions(-) create mode 100755 docker/test-all.sh diff --git a/docker/Dockerfile b/docker/Dockerfile index f806912..e7ca6f5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -# docker build --build-arg cpuarch=amd64 --build-arg GITHASH=$(git rev-parse HEAD) --build-arg mpivendor=MPICH --tag mpitrampoline6 --progress plain . +# docker build --build-arg cpuarch=amd64 --build-arg githash=$(git rev-parse HEAD) --build-arg mpivendor=MPICH --tag mpitrampoline6 --progress plain . # docker run --interactive --rm --tty mpitrampoline6 # amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, riscv64 @@ -22,7 +22,7 @@ RUN apt update && \ ninja-build # Install system MPI -RUN case $mpivendor in \ +RUN case ${mpivendor} in \ MPICH) pkgs=libmpich-dev;; \ OpenMPI) pkgs=libopenmpi-dev;; \ *) exit 1;; \ @@ -31,10 +31,10 @@ RUN case $mpivendor in \ # 2. Download MPItrampoline -ARG GITHASH +ARG githash RUN git clone -b eschnett/MPItrampoline6 https://github.com/eschnett/MPItrampoline && \ cd MPItrampoline && \ - git checkout ${GITHASH} + git checkout ${githash} # 3. Build MPIwrapper @@ -42,7 +42,6 @@ WORKDIR /MPItrampoline/mpiwrapper RUN cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_C_COMPILER=mpicc \ - -DCMAKE_CXX_COMPILER=mpic++ \ -DCMAKE_Fortran_COMPILER=mpifort \ -DCMAKE_INSTALL_PREFIX=/usr/local RUN cmake --build build diff --git a/docker/test-all.sh b/docker/test-all.sh new file mode 100755 index 0000000..bb6f4c6 --- /dev/null +++ b/docker/test-all.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +cpuarchs="amd64 arm32v5 arm32v7 arm64v8 i386 mips64le ppc64le riscv64 s390x" +mpivendors="MPICH OpenMPI" + +githash=$(git rev-parse HEAD) +for cpuarch in ${cpuarchs}; do + for mpivendor in ${mpivendors}; do + tag="mpi-test-suite-debian.cpuarch-${cpuarch}.mpivendor-${mpivendor}" + rm -f "${tag}".* + { + docker build --build-arg cpuarch=${cpuarch} --build-arg githash=${githash} --build-arg mpivendor=${mpivendor} --tag mpitrampoline6-${cpuarch}-${mpivendor} --progress plain . && + : >"${tag}.succeeded" || + : >"${tag}.failed"; + } 2>&1 | + tee "${tag.log" + done +done diff --git a/mpiabi/mpiabif_constants.h b/mpiabi/mpiabif_constants.h index a67872b..42cf42d 100644 --- a/mpiabi/mpiabif_constants.h +++ b/mpiabi/mpiabif_constants.h @@ -5,18 +5,14 @@ ! Variable Address Size ! Define these first because they are used in other definitions. - integer MPIABI_DUMMY_INTEGER - parameter (MPIABI_DUMMY_INTEGER = 0) - integer*8 MPIABI_DUMMY_INTEGER8 - parameter (MPIABI_DUMMY_INTEGER8 = 0) integer MPIABI_ADDRESS_KIND - parameter (MPIABI_ADDRESS_KIND = kind(MPIABI_DUMMY_INTEGER8)) + parameter (MPIABI_ADDRESS_KIND = kind(loc(MPIABI_ADDRESS_KIND))) integer MPIABI_COUNT_KIND - parameter (MPIABI_COUNT_KIND = kind(MPIABI_DUMMY_INTEGER8)) + parameter (MPIABI_COUNT_KIND = MPIABI_ADDRESS_KIND) integer MPIABI_INTEGER_KIND - parameter (MPIABI_INTEGER_KIND = kind(MPIABI_DUMMY_INTEGER)) + parameter (MPIABI_INTEGER_KIND = kind(0)) integer MPIABI_OFFSET_KIND - parameter (MPIABI_OFFSET_KIND = kind(MPIABI_DUMMY_INTEGER8)) + parameter (MPIABI_OFFSET_KIND = MPIABI_ADDRESS_KIND) ! Error classes