From aabfcaa93a3b6a6cdc84b1a484f9c705cf183fd7 Mon Sep 17 00:00:00 2001 From: Eric Berquist Date: Fri, 8 May 2026 21:01:22 -0600 Subject: [PATCH] zodiac: fix compilation with OTF --- config/sst_check_otf.m4 | 21 +++++++++------------ src/sst/elements/zodiac/otfreader.cc | 4 ++-- src/sst/elements/zodiac/zotf.cc | 6 +----- src/sst/elements/zodiac/zotf.h | 5 +---- 4 files changed, 13 insertions(+), 23 deletions(-) diff --git a/config/sst_check_otf.m4 b/config/sst_check_otf.m4 index 6c3d5159ea..3ad863d6a0 100644 --- a/config/sst_check_otf.m4 +++ b/config/sst_check_otf.m4 @@ -8,28 +8,25 @@ AC_DEFUN([SST_CHECK_OTF], AS_IF([test "$with_otf" = "no"], [sst_check_otf_happy="no"]) - CXXFLAGS_saved="$CXXFLAGS" CPPFLAGS_saved="$CPPFLAGS" LDFLAGS_saved="$LDFLAGS" LIBS_saved="$LIBS" AS_IF([test "$sst_check_otf_happy" = "yes"], [ AS_IF([test ! -z "$with_otf" -a "$with_otf" != "yes"], - [OTF_PATH="$with_otf/bin/:$PATH" - OTF_CPPFLAGS="-I$with_otf/include" - CPPFLAGS="$OTF_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS" - CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS" - OTF_LDFLAGS="-L$with_otf/lib" - LDFLAGS="$OTF_LDFLAGS $AM_LDFLAGS $LDFLAGS"], - [OTF_CPPFLAGS= - OTF_LDFLAGS=])]) + [OTF_PATH="$with_otf/bin/:$PATH"])]) AC_PATH_PROG([OTF_CONFIG_TOOL],[otfconfig],[],[$OTF_PATH]) AS_IF([test "x$OTF_CONFIG_TOOL" = "x"], - [sst_check_otf_happy="no"]) + [sst_check_otf_happy="no" + OTF_CPPFLAGS= + OTF_LDFLAGS=] + [OTF_CPPFLAGS=`$OTF_CONFIG_TOOL --includes` + CPPFLAGS="$OTF_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS" + OTF_LDFLAGS=`$OTF_CONFIG_TOOL --libs` + LDFLAGS="$OTF_LDFLAGS $AM_LDFLAGS $LDFLAGS"]) - CXXFLAGS="$CXXFLAGS_saved" CPPFLAGS="$CPPFLAGS_saved" LDFLAGS="$LDFLAGS_saved" LIBS="$LIBS_saved" @@ -40,7 +37,7 @@ AC_DEFUN([SST_CHECK_OTF], AC_SUBST([OTF_PATH]) AM_CONDITIONAL([USE_OTF], [test "x$sst_check_otf_happy" = "xyes"]) - AS_IF([test "$sst_check_otf_happy" = "yes"], [AC_DEFINE([HAVE_OTF],[1],[Defines whether we have the OFT library])]) + AS_IF([test "$sst_check_otf_happy" = "yes"], [AC_DEFINE([HAVE_OTF],[1],[Defines whether we have the OTF library])]) AC_MSG_CHECKING([for OTF library]) AC_MSG_RESULT([$sst_check_otf_happy]) diff --git a/src/sst/elements/zodiac/otfreader.cc b/src/sst/elements/zodiac/otfreader.cc index 5ce6e817f7..939b47927c 100644 --- a/src/sst/elements/zodiac/otfreader.cc +++ b/src/sst/elements/zodiac/otfreader.cc @@ -32,7 +32,7 @@ int handleOTFSendMsg(void *userData, uint64_t time, uint32_t sender, uint32_t re OTFReader* reader = (OTFReader*) userData; std::cout << "OTF: Send message from " << sender << " to " << receiver << " qSize=" << reader->getCurrentQueueSize() << std::endl; - ZodiacSendEvent* sendEv = new ZodiacSendEvent(receiver, length, HERMES_DOUBLE, 0, group); + ZodiacSendEvent* sendEv = new ZodiacSendEvent(receiver, length, DOUBLE, 0, group); reader->enqueueEvent(sendEv); return OTF_RETURN_OK; @@ -44,7 +44,7 @@ int handleOTFRecvMsg(void *userData, uint64_t time, uint32_t recvProc, uint32_t OTFReader* reader = (OTFReader*) userData; std::cout << "OTF: Recv message from " << sendProc << " to " << recvProc << " qSize=" << reader->getCurrentQueueSize() << std::endl; - ZodiacRecvEvent* recvEv = new ZodiacRecvEvent(recvProc, length, HERMES_DOUBLE, 0, group); + ZodiacRecvEvent* recvEv = new ZodiacRecvEvent(recvProc, length, DOUBLE, 0, group); reader->enqueueEvent(recvEv); return OTF_RETURN_OK; diff --git a/src/sst/elements/zodiac/zotf.cc b/src/sst/elements/zodiac/zotf.cc index 42d08b8635..fefc685906 100644 --- a/src/sst/elements/zodiac/zotf.cc +++ b/src/sst/elements/zodiac/zotf.cc @@ -30,16 +30,12 @@ ZodiacOTFTraceReader::ZodiacOTFTraceReader(ComponentId_t id, Params& params) : std::cout << "Creating a new ZOTFTrace Reader..." << std::endl; string msgiface = params.find("msgapi"); - if ( msgiface == "" ) { - msgapi = new MessageInterface(); - } else { - msgapi = dynamic_cast(loadSubComponent(msgiface, this, params)); + msgapi = loadUserSubComponent(msgiface); if(NULL == msgapi) { std::cerr << "Message API: " << msgiface << " could not be loaded." << std::endl; exit(-1); } - } string trace_file = params.find("trace"); if("" == trace_file) { diff --git a/src/sst/elements/zodiac/zotf.h b/src/sst/elements/zodiac/zotf.h index e8f245af23..a0bc178dc0 100644 --- a/src/sst/elements/zodiac/zotf.h +++ b/src/sst/elements/zodiac/zotf.h @@ -29,9 +29,6 @@ #include "otfreader.h" -using namespace std; -using namespace SST::Hermes; - namespace SST { namespace Zodiac { @@ -54,7 +51,7 @@ class ZodiacOTFTraceReader : public SST::Component { //////////////////////////////////////////////////////// - MessageInterface* msgapi; + SST::Hermes::MP::Interface* msgapi; OTFReader* reader; std::queue* eventQ;