Skip to content

Commit

Permalink
Merge pull request sstsimulator#1192 from sstsimulator/devel
Browse files Browse the repository at this point in the history
Automatically Merged using SST Master Branch Merger
  • Loading branch information
sst-autotester authored Jan 11, 2025
2 parents e66203b + 5e06091 commit 71a1bbd
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 124 deletions.
6 changes: 6 additions & 0 deletions src/sst/core/model/python/pymacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ REENABLE_WARNING
#define SST_TP_WATCHED
#endif

#if PY_MINOR_VERSION >= 13
#define SST_TP_VERSIONS_USED 0,
#else
#define SST_TP_VERSIONS_USED
#endif

// Number protocol macros
#define SST_NB_DIVIDE(x)
#define SST_NB_COERCE
Expand Down
101 changes: 51 additions & 50 deletions src/sst/core/model/python/pymodel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,56 +88,57 @@ DISABLE_WARN_DEPRECATED_DECLARATION
#endif
#endif
static PyTypeObject ModuleLoaderType = {
SST_PY_OBJ_HEAD "ModuleLoader", /* tp_name */
sizeof(ModuleLoaderPy_t), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
0, /* tp_vectorcall_offset */
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_as_sync */
nullptr, /* tp_repr */
nullptr, /* tp_as_number */
nullptr, /* tp_as_sequence */
nullptr, /* tp_as_mapping */
nullptr, /* tp_hash */
nullptr, /* tp_call */
nullptr, /* tp_str */
nullptr, /* tp_getattro */
nullptr, /* tp_setattro */
nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
"SST Module Loader", /* tp_doc */
nullptr, /* tp_traverse */
nullptr, /* tp_clear */
nullptr, /* tp_rich_compare */
0, /* tp_weaklistoffset */
nullptr, /* tp_iter */
nullptr, /* tp_iternext */
mlMethods, /* tp_methods */
nullptr, /* tp_members */
nullptr, /* tp_getset */
nullptr, /* tp_base */
nullptr, /* tp_dict */
nullptr, /* tp_descr_get */
nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
nullptr, /* tp_init */
nullptr, /* tp_alloc */
nullptr, /* tp_new */
nullptr, /* tp_free */
nullptr, /* tp_is_gc */
nullptr, /* tp_bases */
nullptr, /* tp_mro */
nullptr, /* tp_cache */
nullptr, /* tp_subclasses */
nullptr, /* tp_weaklist */
nullptr, /* tp_del */
0, /* tp_version_tag */
nullptr, /* tp_finalize */
SST_TP_VECTORCALL /* Python3.8+ */
SST_TP_PRINT_DEP /* Python3.8 only */
SST_TP_WATCHED /* Python3.12+ */
SST_PY_OBJ_HEAD "ModuleLoader", /* tp_name */
sizeof(ModuleLoaderPy_t), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
0, /* tp_vectorcall_offset */
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_as_sync */
nullptr, /* tp_repr */
nullptr, /* tp_as_number */
nullptr, /* tp_as_sequence */
nullptr, /* tp_as_mapping */
nullptr, /* tp_hash */
nullptr, /* tp_call */
nullptr, /* tp_str */
nullptr, /* tp_getattro */
nullptr, /* tp_setattro */
nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
"SST Module Loader", /* tp_doc */
nullptr, /* tp_traverse */
nullptr, /* tp_clear */
nullptr, /* tp_rich_compare */
0, /* tp_weaklistoffset */
nullptr, /* tp_iter */
nullptr, /* tp_iternext */
mlMethods, /* tp_methods */
nullptr, /* tp_members */
nullptr, /* tp_getset */
nullptr, /* tp_base */
nullptr, /* tp_dict */
nullptr, /* tp_descr_get */
nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
nullptr, /* tp_init */
nullptr, /* tp_alloc */
nullptr, /* tp_new */
nullptr, /* tp_free */
nullptr, /* tp_is_gc */
nullptr, /* tp_bases */
nullptr, /* tp_mro */
nullptr, /* tp_cache */
nullptr, /* tp_subclasses */
nullptr, /* tp_weaklist */
nullptr, /* tp_del */
0, /* tp_version_tag */
nullptr, /* tp_finalize */
SST_TP_VECTORCALL /* Python3.8+ */
SST_TP_PRINT_DEP /* Python3.8 only */
SST_TP_WATCHED /* Python3.12+ */
SST_TP_VERSIONS_USED /* Python3.13+ */
};
#if PY_MAJOR_VERSION == 3
#if PY_MINOR_VERSION == 8
Expand Down
2 changes: 2 additions & 0 deletions src/sst/core/model/python/pymodel_comp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ PyTypeObject PyModel_ComponentType = {
SST_TP_VECTORCALL /* Python3.8+ */
SST_TP_PRINT_DEP /* Python3.8 only */
SST_TP_WATCHED /* Python3.12+ only */
SST_TP_VERSIONS_USED /* Python3.13+ only */
};
#if PY_MAJOR_VERSION == 3
#if PY_MINOR_VERSION == 8
Expand Down Expand Up @@ -726,6 +727,7 @@ PyTypeObject PyModel_SubComponentType = {
SST_TP_VECTORCALL /* Python3.8+ */
SST_TP_PRINT_DEP /* Python3.8 only */
SST_TP_WATCHED /* Python3.12+ */
SST_TP_VERSIONS_USED /* Python3.13+ only */
};
#if PY_MAJOR_VERSION == 3
#if PY_MINOR_VERSION == 8
Expand Down
101 changes: 51 additions & 50 deletions src/sst/core/model/python/pymodel_link.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,56 +144,57 @@ DISABLE_WARN_DEPRECATED_DECLARATION
#endif
#endif
PyTypeObject PyModel_LinkType = {
SST_PY_OBJ_HEAD "sst.Link", /* tp_name */
sizeof(LinkPy_t), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)linkDealloc, /* tp_dealloc */
0, /* tp_vectorcall_offset */
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_as_sync */
nullptr, /* tp_repr */
nullptr, /* tp_as_number */
nullptr, /* tp_as_sequence */
nullptr, /* tp_as_mapping */
nullptr, /* tp_hash */
nullptr, /* tp_call */
nullptr, /* tp_str */
nullptr, /* tp_getattro */
nullptr, /* tp_setattro */
nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
"SST Link", /* tp_doc */
nullptr, /* tp_traverse */
nullptr, /* tp_clear */
nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
nullptr, /* tp_iter */
nullptr, /* tp_iternext */
linkMethods, /* tp_methods */
nullptr, /* tp_members */
nullptr, /* tp_getset */
nullptr, /* tp_base */
nullptr, /* tp_dict */
nullptr, /* tp_descr_get */
nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)linkInit, /* tp_init */
nullptr, /* tp_alloc */
nullptr, /* tp_new */
nullptr, /* tp_free */
nullptr, /* tp_is_gc */
nullptr, /* tp_bases */
nullptr, /* tp_mro */
nullptr, /* tp_cache */
nullptr, /* tp_subclasses */
nullptr, /* tp_weaklist */
nullptr, /* tp_del */
0, /* tp_version_tag */
nullptr, /* tp_finalize */
SST_TP_VECTORCALL /* Python3.8+ */
SST_TP_PRINT_DEP /* Python3.8 only */
SST_TP_WATCHED /* Python3.12+ */
SST_PY_OBJ_HEAD "sst.Link", /* tp_name */
sizeof(LinkPy_t), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)linkDealloc, /* tp_dealloc */
0, /* tp_vectorcall_offset */
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_as_sync */
nullptr, /* tp_repr */
nullptr, /* tp_as_number */
nullptr, /* tp_as_sequence */
nullptr, /* tp_as_mapping */
nullptr, /* tp_hash */
nullptr, /* tp_call */
nullptr, /* tp_str */
nullptr, /* tp_getattro */
nullptr, /* tp_setattro */
nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
"SST Link", /* tp_doc */
nullptr, /* tp_traverse */
nullptr, /* tp_clear */
nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
nullptr, /* tp_iter */
nullptr, /* tp_iternext */
linkMethods, /* tp_methods */
nullptr, /* tp_members */
nullptr, /* tp_getset */
nullptr, /* tp_base */
nullptr, /* tp_dict */
nullptr, /* tp_descr_get */
nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)linkInit, /* tp_init */
nullptr, /* tp_alloc */
nullptr, /* tp_new */
nullptr, /* tp_free */
nullptr, /* tp_is_gc */
nullptr, /* tp_bases */
nullptr, /* tp_mro */
nullptr, /* tp_cache */
nullptr, /* tp_subclasses */
nullptr, /* tp_weaklist */
nullptr, /* tp_del */
0, /* tp_version_tag */
nullptr, /* tp_finalize */
SST_TP_VECTORCALL /* Python3.8+ */
SST_TP_PRINT_DEP /* Python3.8 only */
SST_TP_WATCHED /* Python3.12+ */
SST_TP_VERSIONS_USED /* Python3.13+ only */
};
#if PY_MAJOR_VERSION == 3
#if PY_MINOR_VERSION == 8
Expand Down
1 change: 1 addition & 0 deletions src/sst/core/model/python/pymodel_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ PyTypeObject PyModel_StatType = {
SST_TP_VECTORCALL /* Python3.8+ */
SST_TP_PRINT_DEP /* Python3.8 only */
SST_TP_WATCHED /* Python3.12+ */
SST_TP_VERSIONS_USED /* Python3.13+ only */
};
#if PY_MAJOR_VERSION == 3
#if PY_MINOR_VERSION == 8
Expand Down
2 changes: 2 additions & 0 deletions src/sst/core/model/python/pymodel_statgroup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ PyTypeObject PyModel_StatGroupType = {
SST_TP_VECTORCALL /* Python3.8+ */
SST_TP_PRINT_DEP /* Python3.8 only */
SST_TP_WATCHED /* Python3.12+ */
SST_TP_VERSIONS_USED /* Python3.13+ only */
};
#if PY_MAJOR_VERSION == 3
#if PY_MINOR_VERSION == 8
Expand Down Expand Up @@ -347,6 +348,7 @@ PyTypeObject PyModel_StatOutputType = {
SST_TP_VECTORCALL /* Python3.8+ */
SST_TP_PRINT_DEP /* Python3.8 only */
SST_TP_WATCHED /* Python3.12+ */
SST_TP_VERSIONS_USED /* Python3.13+ only */
};
#if PY_MAJOR_VERSION == 3
#if PY_MINOR_VERSION == 8
Expand Down
1 change: 1 addition & 0 deletions src/sst/core/model/python/pymodel_unitalgebra.cc
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ PyTypeObject PyModel_UnitAlgebraType = {
SST_TP_VECTORCALL /* Python3.8+ */
SST_TP_PRINT_DEP /* Python3.8 only */
SST_TP_WATCHED /* Python3.12+ */
SST_TP_VERSIONS_USED /* Python3.13+ only */
};

#if PY_MAJOR_VERSION == 3
Expand Down
50 changes: 26 additions & 24 deletions src/sst/core/testingframework/test_engine_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,44 @@
"""
import os

from typing import TYPE_CHECKING
from typing import Dict, List, TYPE_CHECKING

if TYPE_CHECKING:
import configparser

from test_engine_junit import JUnitTestCase

# Verbose Defines
VERBOSE_QUIET = 0
VERBOSE_NORMAL = 1
VERBOSE_LOUD = 2
VERBOSE_DEBUG = 3

# Global Var Defines
TESTRUN_TESTRUNNINGFLAG = None
TESTRUN_SINGTHREAD_TESTSUITE_NAME = None
TESTRUN_JUNIT_TESTCASE_DICTLISTS = None
TESTRUN_TESTRUNNINGFLAG = False
TESTRUN_SINGTHREAD_TESTSUITE_NAME = ""
TESTRUN_JUNIT_TESTCASE_DICTLISTS: Dict[str, List["JUnitTestCase"]] = dict()

TESTOUTPUT_TOPDIRPATH = None
TESTOUTPUT_RUNDIRPATH = None
TESTOUTPUT_TMPDIRPATH = None
TESTOUTPUT_XMLDIRPATH = None
TESTOUTPUT_TOPDIRPATH = ""
TESTOUTPUT_RUNDIRPATH = ""
TESTOUTPUT_TMPDIRPATH = ""
TESTOUTPUT_XMLDIRPATH = ""

TESTENGINE_CONCURRENTMODE = None
TESTENGINE_THREADLIMIT = None
TESTENGINE_DEBUGMODE = None
TESTENGINE_LOGFAILMODE = None
TESTENGINE_IGNORESKIPS = None
TESTENGINE_VERBOSITY = None
TESTENGINE_SSTRUN_NUMRANKS = None
TESTENGINE_SSTRUN_NUMTHREADS = None
TESTENGINE_SSTRUN_GLOBALARGS = None
TESTENGINE_CORE_CONFFILE_PARSER = None
TESTENGINE_CORE_CONFINCLUDE_DICT = None
TESTENGINE_ELEM_CONFINCLUDE_DICT = None
TESTENGINE_CONCURRENTMODE = False
TESTENGINE_THREADLIMIT = 8
TESTENGINE_DEBUGMODE = False
TESTENGINE_LOGFAILMODE = False
TESTENGINE_IGNORESKIPS = False
TESTENGINE_VERBOSITY = 1
TESTENGINE_SSTRUN_NUMRANKS = 1
TESTENGINE_SSTRUN_NUMTHREADS = 1
TESTENGINE_SSTRUN_GLOBALARGS = ""
TESTENGINE_CORE_CONFFILE_PARSER: "configparser.RawConfigParser" = None # type: ignore [assignment]
TESTENGINE_CORE_CONFINCLUDE_DICT: Dict[str, str] = dict()
TESTENGINE_ELEM_CONFINCLUDE_DICT: Dict[str, str] = dict()
TESTENGINE_ERRORCOUNT = 0
TESTENGINE_SCENARIOSLIST = None
TESTENGINE_TESTNOTESLIST = None
TESTENGINE_SCENARIOSLIST: List[str] = []
TESTENGINE_TESTNOTESLIST: List[str] = []

# These are some globals to pass data between the top level test engine
# and the lower level testscripts
Expand Down Expand Up @@ -98,8 +100,8 @@ def init_test_engine_globals() -> None:
TESTENGINE_VERBOSITY = 1
TESTENGINE_SSTRUN_NUMRANKS = 1
TESTENGINE_SSTRUN_NUMTHREADS = 1
TESTENGINE_SSTRUN_GLOBALARGS = ["xxx"]
TESTENGINE_CORE_CONFFILE_PARSER = None
TESTENGINE_SSTRUN_GLOBALARGS = "xxx"
TESTENGINE_CORE_CONFFILE_PARSER = None # type: ignore [assignment]
TESTENGINE_CORE_CONFINCLUDE_DICT = {}
TESTENGINE_ELEM_CONFINCLUDE_DICT = {}
TESTENGINE_ERRORCOUNT = 0
Expand Down

0 comments on commit 71a1bbd

Please sign in to comment.