Skip to content

Aarondonahue/machines/tuo openmp linking fix - #8656

Open
AaronDonahue wants to merge 2 commits into
masterfrom
aarondonahue/machines/tuo-openmp-linking-fix
Open

Aarondonahue/machines/tuo openmp linking fix#8656
AaronDonahue wants to merge 2 commits into
masterfrom
aarondonahue/machines/tuo-openmp-linking-fix

Conversation

@AaronDonahue

Copy link
Copy Markdown
Contributor

Fixes an issue with building and submitting jobs on the Livermore Computing system tuolumne.

[BFB]

AaronDonahue and others added 2 commits August 21, 2026 11:58
Update Flux batch configuration to use correct command-line flags:
- Change --time to --time-limit for time specification
- Change --queue to -q for queue selection
- Change --bank to -B for bank/account specification
- Replace hardcoded 60m with $JOB_WALLCLOCK_TIME variable

These changes align with Flux batch system syntax and allow proper
walltime configuration from case XML variables.

Co-Authored-By: Claude <noreply@anthropic.com>
Add missing compiler flags for tuo machine with crayamd-mphipcc compiler:
- Add OpenMP threading support via -fopenmp flags for C, C++, Fortran,
  and linker when compile_threaded is enabled
- Add -DFORTRANUNDERSCORE and -DNO_R16 to CPPDEFS for proper Fortran/C
  interoperability and to match standard Cray compiler configurations

These flags resolve linking errors:
- Undefined references to OpenMP functions (omp_get_thread_num, etc.)
  in GPTL library when building threaded executables
- Undefined references to shr_reprosumx86_fix_start/end functions due
  to Fortran/C name mangling mismatch

The configuration now aligns with other Cray machine configs like
craycray-mphipcc.cmake and frontier_craycray-mphipcc.cmake.

Co-Authored-By: Claude <noreply@anthropic.com>
@AaronDonahue
AaronDonahue requested a review from jasonb5 August 21, 2026 19:01
@AaronDonahue AaronDonahue added Machine Files BFB PR leaves answers BFB labels Aug 21, 2026
@AaronDonahue

Copy link
Copy Markdown
Contributor Author

@jasonb5 while putting this fix together I noticed that the crayamd compiler option just doesn't work, or has never worked. Should we just remove it altogether?

Also, I think we might need to make a similar PR for maint branches too right?

Comment on lines -242 to +244
<arg flag="--time" name="60m"/>
<arg flag="--queue" name="$JOB_QUEUE"/>
<arg flag="--bank" name="$PROJECT"/>
<arg flag="--time-limit" name="$JOB_WALLCLOCK_TIME"/>
<arg flag="-q" name="$JOB_QUEUE"/>
<arg flag="-B" name="$PROJECT"/>

@jasonb5 jasonb5 Aug 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note that CIME will not replace $JOB_WALLCLOCK_TIME correctly, there's a PR open for this in CIME.

You'll need to manually set the value until that PR is merged and we do a CIME update.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ahhh okay, I was wondering why it was hard-coded. we can revert back to a hard-coded value for now if we want.

@jasonb5 jasonb5 Aug 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's fine to leave this, you'll need to set the wallclock anyway, this simplifies it to just ./xmlchange JOB_WALLCLOCK_TIME=<time>.
If you revert anything, i'd move back to the explicit flag, it reads better.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also note resubmits don't work, there's a CIME fix coming for this.

@jasonb5

jasonb5 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@AaronDonahue

@jasonb5 while putting this fix together I noticed that the crayamd compiler option just doesn't work, or has never worked. Should we just remove it altogether?

Not sure why it's not working, the few cases I had originally tried worked. If it's not useful to run CPU only we can remove it otherwise I can look at it and see what's going on.

Also, I think we might need to make a similar PR for maint branches too right?
We can either do that now or I can bundle this with another PR I have coming that will get pushed to the maint branches.

@AaronDonahue

Copy link
Copy Markdown
Contributor Author

Maybe the crayamd does work, to be honest I didn't try it, I was working from memory but maybe you sorted out whatever that was way back when. It might be easier to bundle this fix into your upcoming maint PR's, but I'm happy either way.

@jasonb5 jasonb5 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@rljacob

rljacob commented Aug 26, 2026

Copy link
Copy Markdown
Member

Please edit the title of this PR to follow out convention.

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

Labels

BFB PR leaves answers BFB Machine Files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants