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

Adding Laghos to Benchpark #71

Closed
wants to merge 8 commits into from
Closed
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
16 changes: 16 additions & 0 deletions experiments/laghos/cuda/execute_experiment.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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

#!/bin/bash
{batch_nodes}
{batch_timeout}

cd {experiment_run_dir}

{spack_setup}

{experiment_setup} #TODO: Add experiment specific code here

{command}
16 changes: 16 additions & 0 deletions experiments/laghos/openmp/execute_experiment.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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

#!/bin/bash
{batch_nodes}
{batch_timeout}

cd {experiment_run_dir}

{spack_setup}

{experiment_setup} #TODO: Add experiment specific code here

{command}
61 changes: 61 additions & 0 deletions experiments/laghos/openmp/ramble.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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/spack.yaml
- ./configs/variables.yaml

config:
deprecated: true
spack_flags:
install: '--add --keep-stage'
concretize: '-U -f'

applications:
laghos:
workloads:
problem1:
env_vars:
set:
OMP_NUM_THREADS: '{omp_num_threads}'
variables:
n_ranks: '{processes_per_node} * {n_nodes}'
p: 2
px: '{p}'
py: '{p}'
pz: '{p}'
n: ['55', '110']
nx: '{n}'
ny: '{n}'
nz: '{n}'
experiment_setup: ''
processes_per_node: ['8', '4']
n_nodes: ['1', '2']
threads_per_node_core: ['8', '10', '13'] #TODO: Specify n_threads according to available n_nodes and n_ranks
omp_num_threads: '{threads_per_node_core} * {n_nodes}'
experiments:
laghos_omp_problem1_{n_nodes}_{omp_num_threads}_{px}_{py}_{pz}_{nx}_{ny}_{nz}:
variables:
env_name: laghos-omp
matrices:
- size_threads:
- n # TODO: Filter matrix
- threads_per_node_core # TODO: Filter matrix
spack:
concretized: true
packages:
mfem-omp:
spack_spec: mfem@develop +mpi+openmp+mixedint
compiler: default-compiler
laghos-omp:
spack_spec: laghos@develop +mpi+openmp
compiler: default-compiler
environments:
laghos-omp:
packages:
- default-mpi
- mfem-omp
- laghos-omp
16 changes: 16 additions & 0 deletions experiments/laghos/rocm/execute_experiment.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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

#!/bin/bash
{batch_nodes}
{batch_timeout}

cd {experiment_run_dir}

{spack_setup}

{experiment_setup} #TODO: Add experiment specific code here

{command}
56 changes: 56 additions & 0 deletions repo/laghos/application.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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 ramble.appkit import *

import sys

class Laghos(SpackApplication):
"""Laghos benchmark"""
name = "laghos"

tags = ["laghos"]

executable('p1', 'laghos' +
' -P {px} {py} {pz}' +
' -n {nx} {ny} {nz}' +
' -problem 1' +
' -keepT', use_mpi=True)

executable('p2', 'laghos' +
' -P {px} {py} {pz}' +
' -n {nx} {ny} {nz}' +
' -problem 2' +
' -keepT', use_mpi=True)

workload('problem1', executables=['p1'])
workload('problem2', executables=['p2'])

workload_variable('px', default='2',
description='px',
workloads=['problem1', 'problem2'])
workload_variable('py', default='2',
description='py',
workloads=['problem1', 'problem2'])
workload_variable('pz', default='2',
description='pz',
workloads=['problem1', 'problem2'])
workload_variable('nx', default='220',
description='nx',
workloads=['problem1', 'problem2'])
workload_variable('ny', default='220',
description='ny',
workloads=['problem1', 'problem2'])
workload_variable('nz', default='220',
description='nz',
workloads=['problem1', 'problem2'])

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

#TODO: Fix the FOM success_criteria(...)
success_criteria('pass', mode='string', match=r'Figure of Merit \(FOM\)', file='{experiment_run_dir}/{experiment_name}.out')

def evaluate_success(self):
return True