Fix HPL MPI stub header and keep full build logs
This commit is contained in:
@@ -236,10 +236,9 @@ cd "${SRC_DIR}"
|
|||||||
|
|
||||||
# Write a minimal single-process MPI stub so we don't need an MPI package.
|
# Write a minimal single-process MPI stub so we don't need an MPI package.
|
||||||
# HPL only needs these functions for single-process execution.
|
# HPL only needs these functions for single-process execution.
|
||||||
cat > "${BUILD_TMP}/mpi_stub.c" <<'MPISTUB'
|
cat > "${BUILD_TMP}/mpi.h" <<'MPIHEADER'
|
||||||
#include <stdlib.h>
|
#ifndef BEE_MPI_STUB_H
|
||||||
#include <string.h>
|
#define BEE_MPI_STUB_H
|
||||||
#include <sys/time.h>
|
|
||||||
|
|
||||||
typedef int MPI_Comm;
|
typedef int MPI_Comm;
|
||||||
typedef int MPI_Datatype;
|
typedef int MPI_Datatype;
|
||||||
@@ -259,6 +258,32 @@ typedef int MPI_Request;
|
|||||||
#define MPI_ANY_TAG -1
|
#define MPI_ANY_TAG -1
|
||||||
#define MPI_STATUS_IGNORE ((MPI_Status*)0)
|
#define MPI_STATUS_IGNORE ((MPI_Status*)0)
|
||||||
|
|
||||||
|
int MPI_Init(int *argc, char ***argv);
|
||||||
|
int MPI_Finalize(void);
|
||||||
|
int MPI_Comm_rank(MPI_Comm c, int *rank);
|
||||||
|
int MPI_Comm_size(MPI_Comm c, int *size);
|
||||||
|
int MPI_Bcast(void *b, int n, MPI_Datatype t, int r, MPI_Comm c);
|
||||||
|
int MPI_Reduce(const void *s, void *r, int n, MPI_Datatype t, MPI_Op op, int root, MPI_Comm c);
|
||||||
|
int MPI_Allreduce(const void *s, void *r, int n, MPI_Datatype t, MPI_Op op, MPI_Comm c);
|
||||||
|
int MPI_Send(const void *b, int n, MPI_Datatype t, int d, int tag, MPI_Comm c);
|
||||||
|
int MPI_Recv(void *b, int n, MPI_Datatype t, int s, int tag, MPI_Comm c, MPI_Status *st);
|
||||||
|
int MPI_Sendrecv(const void *sb, int sn, MPI_Datatype st2, int dest, int stag,
|
||||||
|
void *rb, int rn, MPI_Datatype rt, int src, int rtag,
|
||||||
|
MPI_Comm c, MPI_Status *status);
|
||||||
|
int MPI_Irecv(void *b, int n, MPI_Datatype t, int s, int tag, MPI_Comm c, MPI_Request *req);
|
||||||
|
int MPI_Wait(MPI_Request *req, MPI_Status *st);
|
||||||
|
int MPI_Abort(MPI_Comm c, int code);
|
||||||
|
double MPI_Wtime(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
MPIHEADER
|
||||||
|
|
||||||
|
cat > "${BUILD_TMP}/mpi_stub.c" <<'MPISTUB'
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include "mpi.h"
|
||||||
|
|
||||||
int MPI_Init(int *argc, char ***argv) { (void)argc; (void)argv; return MPI_SUCCESS; }
|
int MPI_Init(int *argc, char ***argv) { (void)argc; (void)argv; return MPI_SUCCESS; }
|
||||||
int MPI_Finalize(void) { return MPI_SUCCESS; }
|
int MPI_Finalize(void) { return MPI_SUCCESS; }
|
||||||
int MPI_Comm_rank(MPI_Comm c, int *rank) { (void)c; *rank = 0; return MPI_SUCCESS; }
|
int MPI_Comm_rank(MPI_Comm c, int *rank) { (void)c; *rank = 0; return MPI_SUCCESS; }
|
||||||
@@ -342,7 +367,7 @@ gcc -O2 -c -o "${BUILD_TMP}/mpi_stub.o" "${BUILD_TMP}/mpi_stub.c"
|
|||||||
|
|
||||||
# build HPL
|
# build HPL
|
||||||
echo "=== building HPL ${HPL_VERSION} ==="
|
echo "=== building HPL ${HPL_VERSION} ==="
|
||||||
make -j"$(nproc)" arch=bee 2>&1 | tail -20
|
make -j"$(nproc)" arch=bee
|
||||||
|
|
||||||
XHPL_BIN="bin/bee/xhpl"
|
XHPL_BIN="bin/bee/xhpl"
|
||||||
[ -x "${XHPL_BIN}" ] || { echo "ERROR: xhpl not found after build"; exit 1; }
|
[ -x "${XHPL_BIN}" ] || { echo "ERROR: xhpl not found after build"; exit 1; }
|
||||||
|
|||||||
Reference in New Issue
Block a user