Skip to content

Commit

Permalink
completed initial testsuite for ariel mpi
Browse files Browse the repository at this point in the history
  • Loading branch information
plavin committed Apr 25, 2024
1 parent d9c13d0 commit e41e59f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 35 deletions.
2 changes: 2 additions & 0 deletions src/sst/elements/ariel/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ EXTRA_DIST = \
frontend/simple/examples/stream/tests/refFiles/test_Ariel_runstreamNB.out \
frontend/simple/examples/stream/tests/refFiles/test_Ariel_runstreamSt.out \
tests/testsuite_default_Ariel.py \
tests/testsuite_testio_Ariel.py \
tests/testsuite_mpi_Ariel.py \
tests/testopenMP/ompmybarrier/ompmybarrier.c \
tests/testopenMP/ompmybarrier/Makefile

Expand Down
71 changes: 36 additions & 35 deletions src/sst/elements/ariel/tests/testsuite_mpi_Ariel.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,38 +74,38 @@ def assert_nonzero_stat(self, filename, stat):
pin_loaded = testing_is_PIN_loaded()
pin_error_msg = "Ariel: Requires PIN, but Env Var 'INTEL_PIN_DIRECTORY' is not found or path does not exist."

# @unittest.skipIf(not pin_loaded, pin_error_msg)
# @unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
# def test_hello_01(self):
# self.ariel_Template(threads=1, ranks=1)
#
# @unittest.skipIf(not pin_loaded, pin_error_msg)
# @unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
# def test_hello_02(self):
# self.ariel_Template(threads=1, ranks=2)
#
# @unittest.skipIf(not pin_loaded, pin_error_msg)
# @unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
# @unittest.skipIf(host_os_is_osx(), "Ariel: Open MP is not supported on OSX.")
# def test_hello_03(self):
# self.ariel_Template(threads=2, ranks=1)
#
# @unittest.skipIf(not pin_loaded, pin_error_msg)
# @unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
# def test_hello_04(self):
# self.ariel_Template(threads=1, ranks=2, tracerank=1)
#
# @unittest.skipIf(not pin_loaded, pin_error_msg)
# @unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
# @unittest.skipIf(host_os_is_osx(), "Ariel: Open MP is not supported on OSX.")
# def test_hello_05(self):
# self.ariel_Template(threads=2, ranks=3, tracerank=1)
#
# @unittest.skipIf(not pin_loaded, pin_error_msg)
# @unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
# @unittest.skipIf(host_os_is_osx(), "Ariel: Open MP is not supported on OSX.")
# def test_hello_06(self):
# self.ariel_Template(threads=2, ranks=2)
@unittest.skipIf(not pin_loaded, pin_error_msg)
@unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
def test_hello_01(self):
self.ariel_Template(threads=1, ranks=1)

@unittest.skipIf(not pin_loaded, pin_error_msg)
@unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
def test_hello_02(self):
self.ariel_Template(threads=1, ranks=2)

@unittest.skipIf(not pin_loaded, pin_error_msg)
@unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
@unittest.skipIf(host_os_is_osx(), "Ariel: Open MP is not supported on OSX.")
def test_hello_03(self):
self.ariel_Template(threads=2, ranks=1)

@unittest.skipIf(not pin_loaded, pin_error_msg)
@unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
def test_hello_04(self):
self.ariel_Template(threads=1, ranks=2, tracerank=1)

@unittest.skipIf(not pin_loaded, pin_error_msg)
@unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
@unittest.skipIf(host_os_is_osx(), "Ariel: Open MP is not supported on OSX.")
def test_hello_05(self):
self.ariel_Template(threads=2, ranks=3, tracerank=1)

@unittest.skipIf(not pin_loaded, pin_error_msg)
@unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
@unittest.skipIf(host_os_is_osx(), "Ariel: Open MP is not supported on OSX.")
def test_hello_06(self):
self.ariel_Template(threads=2, ranks=2)

@unittest.skipIf(not pin_loaded, pin_error_msg)
@unittest.skipIf(testing_check_get_num_ranks() > 1, "Ariel: test_mpi skipped if ranks > 1 - Sandy Bridge test is incompatible with Multi-Rank.")
Expand All @@ -127,7 +127,7 @@ def test_reduce_03(self):

##TODO add reduce tests

def ariel_Template(self, threads, ranks, program="hello", tracerank=0, testtimeout=60, size=250000000):
def ariel_Template(self, threads, ranks, program="hello", tracerank=0, testtimeout=60, size=16000):
# Set the paths to the various directories
testcase = inspect.stack()[1][3] # name the test after the calling function

Expand Down Expand Up @@ -188,9 +188,10 @@ def ariel_Template(self, threads, ranks, program="hello", tracerank=0, testtimeo
else:
self.file_contains(f'{program_output}_{i}', get_reduce_string(i, ranks, size))

# Test to make sure that each core did some work
# Test to make sure that each core did some work and sent something to its L1
for i in range(threads):
self.assert_nonzero_stat(statfile, f"cache_{i}.stateEvent_GetS_M")
self.assert_nonzero_stat(statfile, f"core.read_requests.{i}")
self.assert_nonzero_stat(statfile, f"cache_{i}.CacheMisses")


#######################
Expand Down

0 comments on commit e41e59f

Please sign in to comment.