Skip to content

Error "arielapi.c: MPI_Init called in arielapi.c but this file was compiled without MPI." although Ariel was compiled with MPI #2624

Description

@EweLo

In the latest Version of sst-elements (15.1.0) a binary that was compiled with the Ariel API throws the following error even if sst-elements was configured with --enable-ariel-mpi:

Error: arielapi.c: MPI_Init called in arielapi.c but this file was compiled without MPI.

Details

  • sst-core was configured with ./configure --prefix=$SST_CORE_HOME --disable-mpi (mpi needs to be disabled for Ariel to be able to run mpi binaries)
  • sst-elements was configured with ./configure --prefix=$SST_ELEMENTS_HOME --with-sst-core=$SST_CORE_HOME --with-pin=$PIN_HOME --enable-ariel-mpi. The output of the configure command confirmed that MPI for Ariel was enabled: ariel_mpi : YES.
  • My binary that gets run by Ariel gets compiled with the following Makefile target:
    mpi-test: mpi-test.c
            $(MPICC) $(CFLAGS) -Wl,-rpath,$(ARIEL_API_LIB_DIR) -o $@ $^ -I$(ARIEL_API_INCLUDE_DIR) -L$(ARIEL_API_LIB_DIR) -larielapi -fopenmp
  • Ariel in my SST Configuration:
    ariel = sst.Component("ariel0", "ariel.ariel")
    ariel.addParams( {
        "verbose" : "1",
        "maxcorequeue" : "256",
        "maxissuepercycle" : "2",
        "pipetimeout" : "0",
        "corecount" : str(corecount),
        "clock" : clock,
        "executable" : "./mpi-test",
        "arielmode" : "0",
        "arielinterceptcalls" : "0", # Do not intercept malloc/free 
        "launchparamcount" : 1,
        "launchparam0" : "-ifeellucky", # For Pin2.14 on newer hardware
        "mpimode" : 1,
        "mpiranks": 4,
        "mpitracerank" : 1,
    } )

Possible Fix

I'm not familiar with Automake Makefiles, but here is how I was able to fix the issue: In src/sst/elements/ariel/api/Makefile.am I added AM_CFLAGS = $(CFLAGS_LOCAL).

--- Makefile.am.old	2026-01-16 16:49:54.434124538 +0100
+++ Makefile.am	2026-01-16 16:50:03.922150464 +0100
@@ -1,21 +1,23 @@
 if SST_USE_ARIEL_MPI
 CC_LOCAL = $(ARIEL_MPICC)
 CFLAGS_LOCAL = -fopenmp $(ARIEL_MPI_CFLAGS) -DENABLE_ARIEL_MPI=1
 else
 CC_LOCAL = $(CC)
 CFLAGS_LOCAL =
 endif
 
 AM_CPPFLAGS += \
 	$(MPI_CPPFLAGS) \
 	-I$(top_srcdir)/src
 
+AM_CFLAGS = $(CFLAGS_LOCAL)
+
 lib_LTLIBRARIES = libarielapi.la
 
 libarielapi_la_SOURCES = \
     arielapi.c \
     arielapi.h
 
 libarielapi_la_LDFLAGS = -module -avoid-version -shared
 
 include_HEADERS = arielapi.h

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions