Skip to content
9 changes: 1 addition & 8 deletions src/sst/core/checkpointAction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,14 @@
#include "sst/core/mempoolAccessor.h"
#include "sst/core/objectComms.h"
#include "sst/core/simulation_impl.h"
#include "sst/core/sst_mpi.h"
#include "sst/core/stringize.h"
#include "sst/core/timeConverter.h"
#include "sst/core/warnmacros.h"

// #include <filesystem>
#include <sys/stat.h>
#include <unistd.h>


#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#endif

namespace SST {

CheckpointAction::CheckpointAction(
Expand Down
2 changes: 1 addition & 1 deletion src/sst/core/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ Config::Config(uint32_t num_ranks, bool first_rank) : ConfigShared(!first_rank,
heartbeat_wall_period_ = 0;

char* wd_buf = (char*)malloc(sizeof(char) * PATH_MAX);
getcwd(wd_buf, PATH_MAX);
(void)!getcwd(wd_buf, PATH_MAX);

output_directory_ = "";
if ( nullptr != wd_buf ) {
Expand Down
8 changes: 1 addition & 7 deletions src/sst/core/exit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@

#include "sst/core/exit.h"

#include "sst/core/warnmacros.h"
#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#endif

#include "sst/core/component.h"
#include "sst/core/simulation_impl.h"
#include "sst/core/sst_mpi.h"
#include "sst/core/stopAction.h"

using SST::Core::ThreadSafe::Spinlock;
Expand Down
8 changes: 1 addition & 7 deletions src/sst/core/heartbeat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@
#include "sst/core/component.h"
#include "sst/core/mempoolAccessor.h"
#include "sst/core/simulation_impl.h"
#include "sst/core/sst_mpi.h"
#include "sst/core/stringize.h"
#include "sst/core/timeConverter.h"
#include "sst/core/warnmacros.h"

#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#endif

namespace SST {

Expand Down
7 changes: 1 addition & 6 deletions src/sst/core/iouse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,9 @@

#include "sst/core/iouse.h"

#include "sst/core/warnmacros.h"
#include "sst/core/sst_mpi.h"

#include <sys/resource.h>
#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#endif

using namespace SST::Core;

Expand Down
7 changes: 1 addition & 6 deletions src/sst/core/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ DISABLE_WARN_DEPRECATED_REGISTER
#include <Python.h>
REENABLE_WARNING

#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#endif

#include "sst/core/activity.h"
#include "sst/core/checkpointAction.h"
#include "sst/core/config.h"
Expand All @@ -45,6 +39,7 @@ REENABLE_WARNING
#include "sst/core/rankInfo.h"
#include "sst/core/realtime.h"
#include "sst/core/simulation_impl.h"
#include "sst/core/sst_mpi.h"
#include "sst/core/statapi/statengine.h"
#include "sst/core/stringize.h"
#include "sst/core/threadsafe.h"
Expand Down
8 changes: 1 addition & 7 deletions src/sst/core/memuse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,10 @@

#include "sst/core/memuse.h"

#include "sst/core/warnmacros.h"
#include "sst/core/sst_mpi.h"

#include <sys/resource.h>

#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#endif

using namespace SST::Core;

uint64_t
Expand Down
6 changes: 1 addition & 5 deletions src/sst/core/model/python/pymodel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ DISABLE_WARN_DEPRECATED_REGISTER
#include <Python.h>
REENABLE_WARNING

#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#endif
#include "sst/core/sst_mpi.h"

#include <string>

Expand Down
8 changes: 1 addition & 7 deletions src/sst/core/objectComms.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@
#define SST_CORE_OBJECTCOMMS_H

#include "sst/core/objectSerialization.h"
#include "sst/core/warnmacros.h"

#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#endif
#include "sst/core/sst_mpi.h"

#include <memory>
#include <typeinfo>
Expand Down
7 changes: 1 addition & 6 deletions src/sst/core/output.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

// Core Headers
#include "sst/core/simulation_impl.h"
#include "sst/core/warnmacros.h"

// C++ System Headers
#include <atomic>
Expand All @@ -33,11 +32,7 @@
#include <execinfo.h>
#endif // HAVE_EXECINFO_H

#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#endif
#include "sst/core/sst_mpi.h"

namespace SST {

Expand Down
11 changes: 1 addition & 10 deletions src/sst/core/realtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,13 @@
#include "sst/core/output.h"
#include "sst/core/realtimeAction.h"
#include "sst/core/simulation_impl.h"
#include "sst/core/sst_mpi.h"
#include "sst/core/stringize.h"
#include "sst/core/timeLord.h"
#include "sst/core/unitAlgebra.h"

#include <unistd.h>

#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#define UNUSED_WO_MPI(x) x
#else
#define UNUSED_WO_MPI(x) UNUSED(x)
#endif


namespace SST {

/************ Static RealTimeManager Functions ***********/
Expand Down
2 changes: 1 addition & 1 deletion src/sst/core/serialization/impl/serialize_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class serialize<std::set<T>>
size_t size;
ser.unpack(size);
for ( size_t i = 0; i < size; ++i ) {
T t;
T t {};
ser& t;
v.insert(t);
}
Expand Down
8 changes: 1 addition & 7 deletions src/sst/core/simulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "sst/core/realtime.h"
#include "sst/core/serialization/objectMapDeferred.h"
#include "sst/core/shared/sharedObject.h"
#include "sst/core/sst_mpi.h"
#include "sst/core/statapi/statengine.h"
#include "sst/core/stopAction.h"
#include "sst/core/stringize.h"
Expand All @@ -41,13 +42,6 @@
#include "sst/core/timeLord.h"
#include "sst/core/timeVortex.h"
#include "sst/core/unitAlgebra.h"
#include "sst/core/warnmacros.h"

#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#endif

#include <cinttypes>
#include <exception>
Expand Down
37 changes: 37 additions & 0 deletions src/sst/core/sst_mpi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright 2009-2025 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2025, NTESS
// All rights reserved.
//
// This file is part of the SST software package. For license
// information, see the LICENSE file in the top level directory of the
// distribution.

#ifndef SST_CORE_SST_MPI_H
#define SST_CORE_SST_MPI_H

#include "sst_config.h"

#include "warnmacros.h"

#ifdef SST_CONFIG_HAVE_MPI

DISABLE_WARN_MISSING_OVERRIDE
DISABLE_WARN_CAST_FUNCTION_TYPE

#include <mpi.h>

REENABLE_WARNING
REENABLE_WARNING

#define UNUSED_WO_MPI(x) x

#else

#define UNUSED_WO_MPI(x) UNUSED(x)

#endif

#endif
8 changes: 1 addition & 7 deletions src/sst/core/sync/rankSyncParallelSkip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,9 @@
#include "sst/core/profile.h"
#include "sst/core/serialization/serializer.h"
#include "sst/core/simulation_impl.h"
#include "sst/core/sst_mpi.h"
#include "sst/core/sync/syncQueue.h"
#include "sst/core/timeConverter.h"
#include "sst/core/warnmacros.h"

#ifdef SST_CONFIG_HAVE_MPI
#define UNUSED_WO_MPI(x) x
#else
#define UNUSED_WO_MPI(x) UNUSED(x)
#endif

#if SST_EVENT_PROFILING
#define SST_EVENT_PROFILE_START auto event_profile_start = std::chrono::high_resolution_clock::now();
Expand Down
8 changes: 1 addition & 7 deletions src/sst/core/sync/rankSyncParallelSkip.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,13 @@
#ifndef SST_CORE_SYNC_RANKSYNCPARALLELSKIP_H
#define SST_CORE_SYNC_RANKSYNCPARALLELSKIP_H

#include "sst/core/sst_mpi.h"
#include "sst/core/sst_types.h"
#include "sst/core/sync/syncManager.h"
#include "sst/core/threadsafe.h"
#include "sst/core/warnmacros.h"

#include <map>

#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#endif

namespace SST {

class RankSyncQueue;
Expand Down
11 changes: 1 addition & 10 deletions src/sst/core/sync/rankSyncSerialSkip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,9 @@
#include "sst/core/profile.h"
#include "sst/core/serialization/serializer.h"
#include "sst/core/simulation_impl.h"
#include "sst/core/sst_mpi.h"
#include "sst/core/sync/syncQueue.h"
#include "sst/core/timeConverter.h"
#include "sst/core/warnmacros.h"

#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#define UNUSED_WO_MPI(x) x
#else
#define UNUSED_WO_MPI(x) UNUSED(x)
#endif

#if SST_EVENT_PROFILING
#define SST_EVENT_PROFILE_START auto event_profile_start = std::chrono::high_resolution_clock::now();
Expand Down
11 changes: 1 addition & 10 deletions src/sst/core/sync/syncManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,16 @@
#include "sst/core/profile/syncProfileTool.h"
#include "sst/core/realtime.h"
#include "sst/core/simulation_impl.h"
#include "sst/core/sst_mpi.h"
#include "sst/core/sync/rankSyncParallelSkip.h"
#include "sst/core/sync/rankSyncSerialSkip.h"
#include "sst/core/sync/syncQueue.h"
#include "sst/core/sync/threadSyncDirectSkip.h"
#include "sst/core/sync/threadSyncSimpleSkip.h"
#include "sst/core/timeConverter.h"
#include "sst/core/warnmacros.h"

#include <sys/time.h>

#ifdef SST_CONFIG_HAVE_MPI
DISABLE_WARN_MISSING_OVERRIDE
#include <mpi.h>
REENABLE_WARNING
#define UNUSED_WO_MPI(x) x
#else
#define UNUSED_WO_MPI(x) UNUSED(x)
#endif

namespace SST {

// Static data members
Expand Down
7 changes: 7 additions & 0 deletions src/sst/core/warnmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@

#define DISABLE_WARN_DEPRECATED_DECLARATION DIAG_DISABLE(deprecated-declarations)

#define DISABLE_WARN_CAST_FUNCTION_TYPE DIAG_DISABLE(cast-function-type)

#elif defined(__GNUC__)

#define DIAG_COMPILER GCC

#define DISABLE_WARN_DEPRECATED_REGISTER
Expand All @@ -61,6 +64,8 @@

#define DISABLE_WARN_DEPRECATED_DECLARATION DIAG_DISABLE(deprecated-declarations)

#define DISABLE_WARN_CAST_FUNCTION_TYPE DIAG_DISABLE(cast-function-type)

#else

#undef REENABLE_WARNING
Expand All @@ -70,6 +75,8 @@
#define DISABLE_WARN_MAYBE_UNINITIALIZED
#define DISABLE_WARN_STRICT_ALIASING
#define DISABLE_WARN_MISSING_OVERRIDE
#define DISABLE_WARN_CAST_FUNCTION_TYPE

#endif

#endif
Loading