Skip to content

Commit

Permalink
Set up 32-bit architectures correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Nov 22, 2023
1 parent b537a8c commit 06e7d48
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 deletions.
9 changes: 4 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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;; \
Expand All @@ -31,18 +31,17 @@ 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

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
Expand Down
18 changes: 18 additions & 0 deletions docker/test-all.sh
Original file line number Diff line number Diff line change
@@ -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
12 changes: 4 additions & 8 deletions mpiabi/mpiabif_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 06e7d48

Please sign in to comment.