Skip to content

Commit

Permalink
Switch to BENCH logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
PapyChacal committed Oct 11, 2023
1 parent 5378fcc commit 1b35707
Show file tree
Hide file tree
Showing 21 changed files with 73 additions and 18 deletions.
Binary file added fast/-
Binary file not shown.
Binary file added fast/async.so
Binary file not shown.
55 changes: 55 additions & 0 deletions fast/logging.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
diff --git a/devito/logger.py b/devito/logger.py
index 2a7eed95a..b104efd34 100644
--- a/devito/logger.py
+++ b/devito/logger.py
@@ -16,12 +16,15 @@ logger.addHandler(stream_handler)
# Add extra logging levels (note: INFO has value=20, WARNING has value=30)
DEBUG = logging.DEBUG
PERF = 19
+BENCH = logging.DEBUG
INFO = logging.INFO
WARNING = logging.WARNING
ERROR = logging.ERROR
CRITICAL = logging.CRITICAL

logging.addLevelName(PERF, "PERF")
+logging.addLevelName(BENCH, "BENCH")
+

logger_registry = {
'DEBUG': DEBUG,
@@ -29,7 +32,8 @@ logger_registry = {
'INFO': INFO,
'WARNING': WARNING,
'ERROR': ERROR,
- 'CRITICAL': CRITICAL
+ 'CRITICAL': CRITICAL,
+ 'BENCH': BENCH
}

NOCOLOR = '%s'
@@ -133,6 +137,8 @@ def warning(msg, *args, **kwargs):
def error(msg, *args, **kwargs):
log(msg, ERROR, *args, **kwargs)

+def bench(msg, *args, **kwargs):
+ log(msg, BENCH, *args, **kwargs)

def debug(msg, *args, **kwargs):
log(msg, DEBUG, *args, **kwargs)
diff --git a/devito/operator/profiling.py b/devito/operator/profiling.py
index f7633a740..2d576df5e 100644
--- a/devito/operator/profiling.py
+++ b/devito/operator/profiling.py
@@ -460,7 +460,7 @@ class PerformanceSummary(OrderedDict):

def create_profile(name):
"""Create a new Profiler."""
- if configuration['log-level'] in ['DEBUG', 'PERF'] and \
+ if configuration['log-level'] in ['DEBUG', 'PERF', 'BENCH'] and \
configuration['profiling'] == 'basic':
# Enforce performance profiling in DEBUG mode
level = 'advanced'
* Unmerged path fast/slurm/diffusion-16.slurm
* Unmerged path fast/slurm/diffusion-2.slurm
* Unmerged path fast/slurm/diffusion-32.slurm
2 changes: 1 addition & 1 deletion fast/slurm-jobs/diffusion-1.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive
# export DEVITO_PROFILING=advanced2
Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/diffusion-128.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive

Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/diffusion-16.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive

Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/diffusion-2.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive

Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/diffusion-32.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive

Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/diffusion-4.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive
# export DEVITO_PROFILING=advanced2
Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/diffusion-64.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive

Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/diffusion-8.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive
# export DEVITO_PROFILING=advanced2
Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/job-devito-xdsl-wave.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
# export DEVITO_PROFILING=advanced2

Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/job-devito-xdsl.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
# export DEVITO_PROFILING=advanced2

Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/wave-1.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive
# export DEVITO_PROFILING=advanced2
Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/wave-128.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=diag2
export DEVITO_AUTOTUNING=aggressive

Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/wave-16.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive

Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/wave-2.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive

Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/wave-32.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive

Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/wave-4.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive
# export DEVITO_PROFILING=advanced2
Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/wave-64.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive

Expand Down
2 changes: 1 addition & 1 deletion fast/slurm-jobs/wave-8.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export OMP_PLACES=cores
# Devito-specific env variables
export DEVITO_ARCH=cray
export DEVITO_LANGUAGE=openmp
export DEVITO_LOGGING=DEBUG
export DEVITO_LOGGING=BENCH
export DEVITO_MPI=1
export DEVITO_AUTOTUNING=aggressive
# export DEVITO_PROFILING=advanced2
Expand Down

0 comments on commit 1b35707

Please sign in to comment.