Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress on sandia microbenchmarks #381

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions experiments/smb/mpi/ramble.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2023 Lawrence Livermore National Security, LLC and other
# Benchpark Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: Apache-2.0
ramble:
include:
- ./configs/software.yaml
- ./configs/variables.yaml
- ./configs/modifier.yaml
config:
deprecated: true
spack_flags:
install: '--add --keep-stage'
concretize: '-U -f'

modifiers:
- name: allocation

applications:
smb:
workloads:
mpi_overhead:
experiments:
smb_mpi_overhead_strong_{n_ranks}:
variants:
package_manager: spack
variables:
n_ranks: ['2','4','8']
msgrate:
experiments:
smb_msgrate_strong_{n_nodes}:
variants:
package_manager: spack
variables:
n_nodes: ['1','2','4']
n_ranks: '{n_nodes}*{sys_cores_per_node}'
ppn: '1'

software:
packages:
smb:
pkg_spec: smb@master +mpi
compiler: default-compiler
environments:
smb:
packages:
- default-mpi
- smb
- '{modifier_package_name}'
50 changes: 50 additions & 0 deletions repo/smb/application.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright 2023 Lawrence Livermore National Security, LLC and other
# Benchpark Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: Apache-2.0

import sys

from ramble.appkit import *


class Smb(ExecutableApplication):
"""Sandia microbenchmarks"""
name = "Sandia microbenchmarks"

executable('p1', 'mpi_overhead -v', use_mpi=True)
executable('p2', 'msgrate -n {ppn}', use_mpi=True)
#executable('p3', 'mpiGraph', use_mpi=True)
workload('mpi_overhead', executables=['p1'])
workload('msgrate', executables=['p2'])

workload_variable('ppn', default='1',
description='Number of procs per node',
workloads=['msgrate'])
#TODO: Figure out FOMs
figure_of_merit('single direction',
log_file='{experiment_run_dir}/{experiment_name}.out',
fom_regex=r'single direction:\s+(?P<fom>[0-9]+\.[0-9]*)',
group_name='fom', units='')
#TODO:fix this one. Not sure what's causing it to not detect
figure_of_merit('overhead',
log_file='{experiment_run_dir}/{experiment_name}.out',
fom_regex=r'(?:[0-9]+\.?[0-9]* +){4}(?P<fom>[0-9]+\.[0-9]*)',
#fom_regex=r'avail\(%\)(?:\s|\t)*\n\s*(?:[0-9]+\.*[0-9]*\s*){4}(?P<fom>[0-9]+\.*[0-9]*)',
group_name='fom', units='')

figure_of_merit('pair based',
log_file='{experiment_run_dir}/{experiment_name}.out',
fom_regex=r'pair-based:\s+(?P<fom>[0-9]+\.[0-9]*)',
group_name='fom', units='')

figure_of_merit('pre-post',
log_file='{experiment_run_dir}/{experiment_name}.out',
fom_regex=r'\s*pre-post:\s+(?P<fom>[0-9]+\.[0-9]*)',
group_name='fom', units='')

figure_of_merit('all-start',
log_file='{experiment_run_dir}/{experiment_name}.out',
fom_regex=r'\s*all-start:\s+(?P<fom>[0-9]+\.[0-9]*)',
group_name='fom', units='')
#success_criteria('pass', mode='string', match=r'.*', file='{experiment_run_dir}/{experiment_name}.out')
48 changes: 48 additions & 0 deletions repo/smb/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright 2023 Lawrence Livermore National Security, LLC and other
# Benchpark Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: Apache-2.0
from spack.package import *
import llnl.util.filesystem as fs
import inspect
class Smb(MakefilePackage):
tags = []

url = "https://github.com/sandialabs/SMB/archive/refs/tags/1.1.tar.gz"
git = "https://github.com/sandialabs/SMB"

maintainers("knox10")

version("master", branch="master")

variant("mpi", default=False, description="Build with MPI support")
variant("rma", default=False, description="Build RMA-MT variant")
depends_on("mpi", when="+mpi")
build_directory = ["src/mpi_overhead"]

#build_targets=["mpi_overhead", "msgrate"]
def edit(self, spec, prefix):
if "+rma" in spec:

makefile = FileFilter("src/rma_mt_mpi/Makefile")
makefile.filter('CC = cc', "CC = {0}".format(spec["mpi"].mpicc))
#TODO: fix rma variant for msgrate workload and add shm variant
def build(self, spec, prefix):
if "+rma" in spec:
self.build_directory.append("src/rma_mt_mpi")
else:
self.build_directory.append("src/msgrate")

for path in self.build_directory:
with fs.working_dir(path):
make()
def install(self, spec, prefix):
mkdir(prefix.bin)
mkdir(prefix.doc)
install("src/mpi_overhead/mpi_overhead", prefix.bin)
if "+rma" in spec:
install("src/rma_mt_mpi/msgrate", prefix.bin)
else:
install("src/msgrate/msgrate", prefix.bin)
install("src/mpi_overhead/README", prefix.doc)
install("src/msgrate/README", prefix.doc)