Merged
Conversation
…, started work on enter and exit data, compiles
…, exit data, and update
…e, add mappers to derived types, change how allocate is done
…types, removed rest of pure functions, fix issue with acoustic on nvfortran
sbryngelson
approved these changes
Nov 12, 2025
sbryngelson
approved these changes
Nov 12, 2025
wilfonba
reviewed
Nov 12, 2025
Contributor
There was a problem hiding this comment.
This file needs to be deleted, moved to misc/, or incorporated into the toolchain somehow. This PR doesn't add AMD compilers anyway, so my suggestion would be deleted for now.
Contributor
|
I addressed a bunch of my own comments and pushed the changes. Hopefully the weird phoenix test faiulure goes away. It didn't look like an MFC code problem. The rest of the comments are more relevant to a general support of half precision, so I don't think they're very urgent at the moment. |
wilfonba
approved these changes
Nov 14, 2025
sbryngelson
reviewed
Nov 14, 2025
sbryngelson
reviewed
Nov 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Description
Add OpenMP support to MFC on the Cray Compiler. Passes all test cases, and adds CI to test on Frontier.
Also, adds in mixed precision made added for Gordon Bell.
Type of change
Please delete options that are not relevant.
PR Type
Enhancement, Bug fix
Description
Add OpenMP support to MFC on the Cray Compiler with comprehensive case optimization
Implement mixed precision support throughout the codebase for improved performance and memory efficiency
Refactor boundary condition arrays from negative indexing
(-1:1)to positive indexing(1:2)for optimizationAdd case optimization guards to skip unnecessary 3D computations in 2D simulations (WENO, viscous, MHD, capillary)
Introduce simplex noise generation module for procedural perturbation support
Fix GPU compatibility issues in chemistry and FFT modules for both NVIDIA and AMD compilers
Update MPI operations to support mixed precision with proper type conversions and 64-bit indexing
Refactor bubble Eulerian projection data structure for improved memory layout
Fix MUSCL workspace array naming conflicts and GPU parallel loop syntax issues
Add CI testing on Frontier supercomputer for Cray Compiler validation
Diagram Walkthrough
File Walkthrough
17 files
m_boundary_common.fpp
Refactor boundary arrays and add case optimization supportsrc/common/m_boundary_common.fpp
(-1:1)to(1:2)tosupport case optimization
(-1, 1)to positiveindices
(1, 2)throughout the module#:if notMFC_CASE_OPTIMIZATION or num_dims > 2to skip 3D boundary operationsin optimized 2D cases
real(wp)toreal(stp)for mixed precisionsupport in buffer parameters
MPI_BYTEandelement count calculations
m_weno.fpp
Add case optimization guards to WENO reconstruction schemessrc/simulation/m_weno.fpp
#:include 'case.fpp'directive for case optimization supportcompilation
#:if not MFC_CASE_OPTIMIZATION or weno_num_stencils > Nfor higher-order schemes
optimization for reduced stencil cases
m_bubbles_EL.fpp
Refactor bubble Eulerian projection data structure for mixed precisionsrc/simulation/m_bubbles_EL.fpp
q_betafromtype(vector_field)totype(scalar_field),dimension(:), allocatablefor better memory layoutq_beta%vf(1:q_beta_idx)toq_beta(1:q_beta_idx)with individual scalar field setupreal(wp)toreal(stp)for mixed precisionsupport in gradient calculations
s_gradient_dirsubroutine signature to accept raw arraysinstead of scalar field types
q_beta%vf(i)%sftoq_beta(i)%sfthroughoutthe module
m_boundary_conditions.fpp
Update boundary condition array indexing to positive indicessrc/pre_process/m_boundary_conditions.fpp
(-1:1)to(1:2)infunction signatures
(-1)to newpositive index
(1)and(1)to(2)bc_typearray accesses to use new indexing scheme withexplicit if-statements for location mapping
m_viscous.fpp
Add case optimization conditionals to viscous modulesrc/simulation/m_viscous.fpp
case.fppinclude directive for case optimization supportMFC_CASE_OPTIMIZATIONconditional to skip 3D-specific calculations in2D cases
for dimensional optimization
m_riemann_solvers.fpp
Optimize MHD calculations and improve GPU parallelizationsrc/simulation/m_riemann_solvers.fpp
case.fppinclude for case optimization supportMFC_CASE_OPTIMIZATIONconditionals to optimize 2D cases
memory management
initialization in HLLC solver
m_mpi_common.fpp
Support mixed precision and dynamic dimensionality in MPIsrc/common/m_mpi_common.fpp
case.fppinclude directive for case optimizationhalo_sizefromintegertointeger(kind=8)for 64-bit supportnum_dimsinstead of hardcoded value 3for 2D/3D compatibility
wpandstpprecision kinds inMPI buffer operations
m_cbc.fpp
Optimize CBC module with case-specific conditionalssrc/simulation/m_cbc.fpp
case.fppinclude for case optimization supportdpres_dsvariable declaration from module level to local scopewithin subroutine
dpres_dsto private variable list in GPU parallel loopdpi_inf_dtassignment withMFC_CASE_OPTIMIZATIONconditionalfor single-fluid optimization
m_global_parameters.fpp
Add simplex noise perturbation parameterssrc/pre_process/m_global_parameters.fpp
simplex_perturblogical flag for simplex noise perturbationsupport
simplex_paramsderived type variable to store simplex noiseparameters
routine
m_qbmm.fpp
Mixed precision support and case optimization for QBMMsrc/simulation/m_qbmm.fpp
pbparameter type fromreal(wp)toreal(stp)for mixedprecision support
conditionals for case optimization
i1, i2, jto GPU parallel loop privatelist
rhs_pbandrhs_mvprecision typesm_simplex_noise.fpp
New simplex noise generation modulesrc/pre_process/m_simplex_noise.fpp
generation
f_simplex3dandf_simplex2dfunctions for procedural noisem_fftw.fpp
FFT filter GPU implementation refactoringsrc/simulation/m_fftw.fpp
addresses instead of pointers
#:block UNDEF_CCEwrapper and simplified GPU data managementloop
m_start_up.fpp
Mixed precision I/O and time stepping improvementssrc/simulation/m_start_up.fpp
WP_MOKfrom 8 bytes to 4 bytes for mixed precision I/Ompi_io_typemultiplier for datasize
q_cons_ts(1)toq_cons_ts(2)for multi-stage timesteppers
real()conversion for mixedprecision
q_cons_tempm_rhs.fpp
Mixed precision and GPU compatibility in RHS modulesrc/simulation/m_rhs.fpp
declarations
integer(kind=8)for large arrayindexing
if (.not. igr)conditionbc_typeparameter dimension from1:3, -1:1to1:3, 1:2pb_in,mv_inparameters toreal(stp)type for mixed precisionm_icpp_patches.fpp
Mixed precision support for patch identification arrayssrc/pre_process/m_icpp_patches.fpp
patch_id_fparray type based onMFC_MIXED_PRECISIONflaginteger(kind=1)for mixed precision mode, standardintegerotherwise
efficiency
m_ibm.fpp
Mixed precision support for IBM modulesrc/simulation/m_ibm.fpp
pb_inandmv_inparameters toreal(stp)type for mixedprecision
pb_inandmv_inin interpolation callslevelset_inaccess to use explicitreal()conversionpb_in, mv_inintent from INOUT to IN in interpolationsubroutine
inline_capillary.fpp
Case optimization for capillary tensor calculationssrc/simulation/include/inline_capillary.fpp
num_dims > 22 files
m_muscl.fpp
Rename MUSCL arrays and fix GPU loop syntaxsrc/simulation/m_muscl.fpp
v_rs_ws_x/y/ztov_rs_ws_x/y/z_musclto avoid naming conflicts#:endcalldirectives to include full macro name for claritym_chemistry.fpp
GPU compatibility fixes for chemistry modulesrc/common/m_chemistry.fpp
issues
T_infor type conversion in temperaturecalculations
#:block UNDEF_AMDto handle AMDcompiler differences
48 files