Skip to content

Commit

Permalink
Merge pull request #173 from EESSI/add_azure_CI_and_config
Browse files Browse the repository at this point in the history
Add azure ci and config
  • Loading branch information
smoors authored Sep 4, 2024
2 parents 692d05c + 2f3f67c commit 261b3cd
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CI/azure_mc/ci_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Configurable items
if [ -z "${REFRAME_ARGS}" ]; then
REFRAME_ARGS="--tag CI --tag 1_node"
fi
86 changes: 86 additions & 0 deletions config/azure_mc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# WARNING: for CPU autodetect to work correctly you need to
# 1. Either use ReFrame >= 4.3.3 or temporarily change the 'launcher' for each partition to srun
# 2. Either use ReFrame >= 4.3.3 or run from a clone of the ReFrame repository

# Without this, the autodetect job fails because
# 1. A missing mpirun command
# 2. An incorrect directory structure is assumed when preparing the stagedir for the autodetect job

# Related issues
# 1. https://github.com/reframe-hpc/reframe/issues/2926
# 2. https://github.com/reframe-hpc/reframe/issues/2914

import os

from eessi.testsuite.common_config import common_logging_config, common_general_config, common_eessi_init
from eessi.testsuite.constants import FEATURES, SCALES

# This config will write all staging, output and logging to subdirs under this prefix
# Override with RFM_PREFIX environment variable
reframe_prefix = os.path.join(os.environ['HOME'], 'reframe_runs')

# AWS CITC site configuration
site_configuration = {
'systems': [
{
'name': 'Magic_Castle_Azure',
'descr': 'Magic Castle build and test environment on Azure',
'modules_system': 'lmod',
'hostnames': ['login.*', '.*-node'],
'prefix': reframe_prefix,
'partitions': [
{
'name': 'x86_64-amd-zen4-node',
'access': ['--partition=x86-64-amd-zen4-node', '--export=NONE'],
'descr': 'Zen4, 16 cores, 30 GB',
},
{
'name': 'aarch64-neoverse-N1-16c-62gb',
'access': ['--partition=aarch64-neoverse-n1-node', '--export=NONE'],
'descr': 'Neoverse N1, 16 cores, 62 GiB',
},
]
},
],
'environments': [
{
'name': 'default',
'cc': 'cc',
'cxx': '',
'ftn': '',
},
],
'logging': common_logging_config(reframe_prefix),
'general': [
{
# Enable automatic detection of CPU architecture for each partition
# See https://reframe-hpc.readthedocs.io/en/stable/configure.html#auto-detecting-processor-information
'remote_detect': True,
**common_general_config(reframe_prefix)
}
],
}

# Add default things to each partition:
partition_defaults = {
'scheduler': 'slurm',
'launcher': 'mpirun',
'environs': ['default'],
'features': [
FEATURES['CPU']
] + list(SCALES.keys()),
'prepare_cmds': [
common_eessi_init(),
# Required when using srun as launcher with --export=NONE in partition access, in order to ensure job
# steps inherit environment. It doesn't hurt to define this even if srun is not used
'export SLURM_EXPORT_ENV=ALL'
],
'extras': {
# Node types have strongly varying amounts of memory, but we'll make it easy on ourselves
# All should _at least_ have this amount
'mem_per_node': 64000
},
}
for system in site_configuration['systems']:
for partition in system['partitions']:
partition.update(partition_defaults)

0 comments on commit 261b3cd

Please sign in to comment.