Skip to content

Commit

Permalink
reframe test and ICs for yee_2d Arepo
Browse files Browse the repository at this point in the history
  • Loading branch information
gokmenkilic committed Jun 7, 2024
1 parent 5db9612 commit 2780686
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 0 deletions.
3 changes: 3 additions & 0 deletions benchmarks/apps/arepo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@


[Arepo](https://gitlab.mpcdf.mpg.de/vrs/arepo) is a massively parallel gravity and magnetohydrodynamics code for astrophysics, designed for problems of large dynamic range. It employs a finite-volume approach to discretize the equations of hydrodynamics on a moving Voronoi mesh, and a tree-particle-mesh method for gravitational interactions. Arepo is originally optimized for cosmological simulations of structure formation, but has also been used in many other applications in astrophysics.
47 changes: 47 additions & 0 deletions benchmarks/apps/arepo/arepo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright 2021 University College London (UCL) Research Software Development
# Group. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: Apache-2.0

import reframe as rfm
import reframe.utility.sanity as sn
from benchmarks.modules.utils import SpackTest
import os.path as path

@rfm.simple_test
class ArepoBenchmark(SpackTest):
valid_systems = ['-gpu']
valid_prog_environs = ['default']
spack_spec = 'arepo@master'
num_tasks = 4
num_tasks_per_node = 1
num_cpus_per_task = 1
sourcesdir = path.join(path.dirname(__file__), 'input')
executable = 'Arepo'
time_limit = '20m'
reference = {
'cosma8': {
'duration': (40, None, 0.2, 'seconds'),
},
'*': {
'duration': (200, None, None, 'seconds'),
},
}

@run_after('setup')
def setup_variables(self):
self.executable_opts = ['param.txt']
self.env_vars['OMP_NUM_THREADS'] = f'{self.num_cpus_per_task}'

@run_before('sanity')
def set_sanity_patterns(self):
self.sanity_patterns = sn.assert_found(r'bye!', self.stdout)

@run_before('performance')
def set_perf_patterns(self):
self.perf_patterns = {
'duration': sn.extractsingle(
r'Code run for (\S+) seconds!',
self.stdout, 1, float),
}

Binary file added benchmarks/apps/arepo/input/IC.hdf5
Binary file not shown.
94 changes: 94 additions & 0 deletions benchmarks/apps/arepo/input/param.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
%% ./examples/Yee_2d/param.txt
% parameter file for 2d Yee vortex problem

InitCondFile ./IC
ICFormat 3

OutputDir ./output/
SnapshotFileBase snap
SnapFormat 3
NumFilesPerSnapshot 1
NumFilesWrittenInParallel 1

ResubmitOn 0
ResubmitCommand my-scriptfile
OutputListFilename ol
OutputListOn 0

CoolingOn 0
StarformationOn 0

Omega0 0.0
OmegaBaryon 0.0
OmegaLambda 0.0
HubbleParam 1.0

BoxSize 10.0
PeriodicBoundariesOn 1
ComovingIntegrationOn 0

MaxMemSize 2500
TimeOfFirstSnapshot 0.0
CpuTimeBetRestartFile 9000
TimeLimitCPU 90000

TimeBetStatistics 0.5
TimeBegin 0.0
TimeMax 10.0
TimeBetSnapshot 10.0

UnitVelocity_in_cm_per_s 1.0
UnitLength_in_cm 1.0
UnitMass_in_g 1.0
GravityConstantInternal 0.0

ErrTolIntAccuracy 0.1
ErrTolTheta 0.1
ErrTolForceAcc 0.1

MaxSizeTimestep 1.0
MinSizeTimestep 1e-5
CourantFac 0.3

LimitUBelowThisDensity 0.0
LimitUBelowCertainDensityToThisValue 0.0
DesNumNgb 64

MultipleDomains 2
TopNodeFactor 4
ActivePartFracForNewDomainDecomp 0.01
MaxNumNgbDeviation 2

TypeOfTimestepCriterion 0
TypeOfOpeningCriterion 1
GasSoftFactor 0.01

SofteningComovingType0 0.1
SofteningComovingType1 0.1
SofteningComovingType2 0.1
SofteningComovingType3 0.1
SofteningComovingType4 0.1
SofteningComovingType5 0.1

SofteningMaxPhysType0 0.1
SofteningMaxPhysType1 0.1
SofteningMaxPhysType2 0.1
SofteningMaxPhysType3 0.1
SofteningMaxPhysType4 0.1
SofteningMaxPhysType5 0.1

SofteningTypeOfPartType0 0
SofteningTypeOfPartType1 0
SofteningTypeOfPartType2 0
SofteningTypeOfPartType3 0
SofteningTypeOfPartType4 0
SofteningTypeOfPartType5 0

InitGasTemp 0.0
MinGasTemp 0.0
MinEgySpec 0.0
MinimumDensityOnStartUp 0.0

CellShapingSpeed 0.5
CellMaxAngleFactor 2.25

0 comments on commit 2780686

Please sign in to comment.