Skip to content

Make OMEGA_LOG_TASKS a runtime environment variable#429

Open
grnydawn wants to merge 1 commit into
E3SM-Project:developfrom
grnydawn:ykim/omega/logging
Open

Make OMEGA_LOG_TASKS a runtime environment variable#429
grnydawn wants to merge 1 commit into
E3SM-Project:developfrom
grnydawn:ykim/omega/logging

Conversation

@grnydawn

@grnydawn grnydawn commented Jun 3, 2026

Copy link
Copy Markdown

This PR replaces OMEGA_LOG_TASKS as a compile-time CMake option with a runtime environment variable for log task selection.

This feature was requested for integration with E3SM. It also allows users to change the MPI tasks that generate log files without rebuilding the Omega executable.

Testing passed on Perlmutter.

Checklist

  • Documentation:
  • Linting
  • Building
    • CMake build does not produce any new warnings from changes in this PR
  • Testing
    • Which machines CTest unit tests have been run on and indicate that are all passing.

@mark-petersen

Copy link
Copy Markdown
Collaborator

Passes CTests on Frontier for CPU and GPU.

@sbrus89

sbrus89 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

@andrewdnolan, if you have time to review/approve it would be nice to get this one merged.

@andrewdnolan andrewdnolan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing:

In order to test this in the most realistic setting possible, I cherry picked the one commit from this branch onto my coupled-driver branch and set up a case where the ROOTPE_OCN was no-zero. These are the commands I ran:

CASE_DIR=$PSCRATCH/E3SMv3/omega-logging-test

./create_newcase \
    -case ${CASE_DIR} \
    -mach pm-gpu \
    -res T62_oQU240 \
    --compset COMEGA-JRA1p4
    
    
pushd $CASE_DIR

./xmlchange DEBUG=true
./xmlchange ROOTPE_OCN=3

./case.setup
./case.build


salloc --nodes 2 --qos interactive --time 00:15:00 --gpus-per-node 4 --constraint gpu --account e3sm_g

./case.submit --no-batch

grep "^3: (seq_comm_setcomm)" /pscratch/sd/a/anolan/e3sm_scratch/pm-gpu/omega-logging-test/run/e3sm.log.55687647.260708-110043

Which returns:

3: (seq_comm_setcomm)  init ID ( 17 OCN             ) pelist   =     3     6     1 ( npes =     4) ( nthreads =  1)( suffix =)

And then there's a ocn.log... file with the output I'd expect!

cat /pscratch/sd/a/anolan/e3sm_scratch/pm-gpu/omega-logging-test/run/ocn.log.55687647.260708-110043 | wc -l
# 7

@grnydawn Sorry this took so long to get around to, but this looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants