MFlowCode / MFC

Exascale simulation of multiphase/physics fluid dynamics
https://mflowcode.github.io
MIT License
146 stars 68 forks source link

Case optimization is broken on Frontier #534

Closed wilfonba closed 3 months ago

wilfonba commented 4 months ago

MFC fails to build with the following errors with --case-optimization enabled on Frontier with the following errors:

ftn-580 ftn: ERROR M_GLOBAL_PARAMETERS, File = ../../../lustre/orion/cfd154/scratch/bwilfong3/software/MFC/src/simulation/m_global_parameters.fpp, Line = 124, Column = 31 
  The data type of object "WENOJS" is LOGICAL and is incompatible with data type INTEGER in this PARAMETER assignment.

ftn-580 ftn: ERROR M_GLOBAL_PARAMETERS, File = ../../../lustre/orion/cfd154/scratch/bwilfong3/software/MFC/src/simulation/m_global_parameters.fpp, Line = 125, Column = 31 
  The data type of object "MAPPED_WENO" is LOGICAL and is incompatible with data type INTEGER in this PARAMETER assignment.

ftn-580 ftn: ERROR M_GLOBAL_PARAMETERS, File = ../../../lustre/orion/cfd154/scratch/bwilfong3/software/MFC/src/simulation/m_global_parameters.fpp, Line = 126, Column = 31 
  The data type of object "WENOZ" is LOGICAL and is incompatible with data type INTEGER in this PARAMETER assignment.

ftn-580 ftn: ERROR M_GLOBAL_PARAMETERS, File = ../../../lustre/orion/cfd154/scratch/bwilfong3/software/MFC/src/simulation/m_global_parameters.fpp, Line = 127, Column = 31 
  The data type of object "TENO" is LOGICAL and is incompatible with data type INTEGER in this PARAMETER assignment.

The responsible lines appear to actually be in the toolchain here https://github.com/MFlowCode/MFC/blob/b4dc8ad75e8ac890cf1ec7f0fc000087be00e464/toolchain/mfc/case.py#L201-L204 which generate a faulty case.fpp file.

sbryngelson commented 4 months ago

@ChrisZYJ added these. We don't have a case optimization Frontier run in CI (yet). I suspect the issue is that something was copy/pasted from weno_order (which is an integer) for these?

ChrisZYJ commented 4 months ago

@ChrisZYJ added these. We don't have a case optimization Frontier run in CI (yet). I suspect the issue is that something was copy/pasted from weno_order (which is an integer) for these?

I'll fix it. It's because I assigned ones and zeros to logicals in the generated case-optimized f90 files; didn't know this doesn't work on Frontier. Sorry for the oversight

sbryngelson commented 4 months ago

Appreciate it @ChrisZYJ