Skip to content

Commit

Permalink
fix build issues with ariel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
plavin committed Sep 25, 2024
1 parent 668a9a2 commit c4adcdc
Show file tree
Hide file tree
Showing 21 changed files with 290 additions and 396 deletions.
10 changes: 4 additions & 6 deletions config/sst_check_ariel_mpi.m4
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ AC_DEFUN([SST_CHECK_ARIEL_MPI], [
dnl will save them in new variables.
ARIEL_MPICC=$MPICC
ARIEL_MPICXX=$MPICXX
ARIEL_MPI_CFLAGS=$($MPICC -showme:compile)
ARIEL_MPI_LIBS=$($MPICC -showme:link)
dnl ARIEL_MPI_CFLAGS=$MPICC
dnl ARIEL_MPI_LIBS=$MPICXX
AC_MSG_NOTICE([-> Patrick <- ARIEL_MPI_CFLAGS is $ARIEL_MPI_CFLAGS])
AC_MSG_NOTICE([-> Patrick <- ARIEL_MPI_LIBS is $ARIEL_MPI_LIBS])
AS_IF([test "$sst_check_ariel_mpi_happy" = "yes"], [
ARIEL_MPI_CFLAGS=$($MPICC -showme:compile)
ARIEL_MPI_LIBS=$($MPICC -showme:link)
])
AS_IF([test "$sst_check_ariel_mpi_happy" = "yes"], [
AC_DEFINE([ENABLE_ARIEL_MPI], [1], [Enable Ariel MPI features])
Expand Down
1 change: 1 addition & 0 deletions src/sst/elements/ariel/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ tests/testIO/rank_0_thread_0
tests/testMPI/rank_0_thread_0
tests/testopenMP/ompmybarrier/ompmybarrier
frontend/simple/malloc.txt
api/*.a
4 changes: 2 additions & 2 deletions src/sst/elements/ariel/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ libariel_la_SOURCES = \
EXTRA_DIST = \
api/arielapi.c \
api/arielapi.h \
api/Makefile \
frontend/pin3/fesimple.cc \
frontend/simple/fesimple.cc \
frontend/simple/examples/multicore.py \
Expand All @@ -83,7 +82,8 @@ EXTRA_DIST = \
tests/testsuite_testio_Ariel.py \
tests/testsuite_mpi_Ariel.py \
tests/testopenMP/ompmybarrier/ompmybarrier.c \
tests/testopenMP/ompmybarrier/Makefile
tests/testopenMP/ompmybarrier/Makefile \
tests/testMPI/Makefile

libariel_la_LDFLAGS = -module -avoid-version
libariel_la_LIBADD = $(SHM_LIB)
Expand Down
4 changes: 2 additions & 2 deletions src/sst/elements/ariel/api/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if SST_USE_ARIEL_MPI
CC_LOCAL = $(ARIEL_MPICC)
CFLAGS_LOCAL = -fopenmp $(ARIEL_MPI_CFLAGS)
CFLAGS_LOCAL = -fopenmp $(ARIEL_MPI_CFLAGS) -DENABLE_ARIEL_MPI=1
else
CC_LOCAL = $(CC)
CFLAGS_LOCAL =
Expand All @@ -9,7 +9,7 @@ endif
all-local: libarielapi.so libarielapi.a

libarielapi.so: arielapi.c arielapi.h
$(CC_LOCAL) $(CFLAGS_LOCAL) -fPIC -shared -o libarielapi.so arielapi.c
$(CC_LOCAL) $(CFLAGS_LOCAL) -fPIC -shared -o libarielapi.so $(LDFLAGS) arielapi.c

arielapi.o: arielapi.c arielapi.h
$(CC_LOCAL) $(CFLAGS_LOCAL) -c -o arielapi.o arielapi.c
Expand Down
4 changes: 2 additions & 2 deletions src/sst/elements/ariel/api/arielapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#if ENABLE_ARIEL_MPI
#ifdef ENABLE_ARIEL_MPI
#include <mpi.h>
#endif

Expand Down Expand Up @@ -84,7 +84,7 @@ int MPI_Init(int *argc, char ***argv) {
omp_parallel_region();
return PMPI_Init(argc, argv);
#else
printf("Error: arielapi.c: MPI_Init called in arielapi.c but this file was compiled without MPI. Please recompile the API with `CC=mpicc make`12341234.\n");
printf("Error: arielapi.c: MPI_Init called in arielapi.c but this file was compiled without MPI.\n");
exit(1);
#endif
}
Expand Down
5 changes: 3 additions & 2 deletions src/sst/elements/ariel/configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ AC_DEFUN([SST_ariel_CONFIG], [
AC_SUBST([ARIEL_MPI_CFLAGS])
AC_SUBST([ARIEL_MPI_LIBS])
AC_CONFIG_LINKS([src/sst/elements/ariel/api/arielapi.c:src/sst/elements/ariel/api/arielapi.c])
AC_CONFIG_LINKS([src/sst/elements/ariel/api/arielapi.h:src/sst/elements/ariel/api/arielapi.h])
AC_CONFIG_FILES([src/sst/elements/ariel/api/Makefile])
AC_CONFIG_FILES([src/sst/elements/ariel/mpi/Makefile])
AC_CONFIG_FILES([src/sst/elements/ariel/tests/testMPI/Makefile])
AC_CONFIG_FILES([src/sst/elements/ariel/frontend/simple/examples/stream/Makefile])
AS_IF([test "$sst_check_ariel" = "yes"], [$1], [$2])
])
12 changes: 12 additions & 0 deletions src/sst/elements/ariel/frontend/simple/examples/stream/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
API_DIR = ../../../../api

all: stream stream_mlm

clean:
rm -f stream stream_mlm

stream:
g++ stream.c -o stream $(CFLAGS_LOCAL)

stream_mlm:
g++ stream_malloc.c -o stream_mlm $(CFLAGS_LOCAL) -I$(API_DIR) -L. -L$(API_DIR) -larielapi
12 changes: 0 additions & 12 deletions src/sst/elements/ariel/frontend/simple/examples/stream/Makefile.am

This file was deleted.

Loading

0 comments on commit c4adcdc

Please sign in to comment.