Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary compiled with Clang set input parameter value to 0 instead of given value #425

Closed
salmanhiro opened this issue Feb 5, 2025 · 3 comments
Assignees
Labels
bug general General issues and improvement

Comments

@salmanhiro
Copy link
Contributor

salmanhiro commented Feb 5, 2025

πŸ› Bug Description

Simulation always give zero value of variables in running simulation.

πŸ” Steps to Reproduce

  1. Do steps in Quick-start 1D shocktube with CPU-only without OpenMP
  2. At this execution step, this will show you error.
./gamer

βœ… Expected Behavior

Simulation should run with parameters set according to Input__parameter file. In this case, OPT__BC_FLU_XM = 2.

❌ Actual Behavior

Parameter didn't set the value from Input__parameter file but use the default value. In this case, OPT__BC_FLU_XM = 0.
Also if we comment the variable, it set to the default value of -1.

πŸ“Έ Screenshots (if applicable)

Image

πŸ–₯️ Environment

  • OS: MacOS M2 with Sonoma 14.7.1 version
  • Compiler/Runtime: Clang 16 (have g++-14 but not used)
  • Version of the project: main branch, 721d02d

πŸ“œ Logs & Error Messages

Stdout:

(base) a123@123deMacBook-Air shocktube % ./gamer           
Init_Load_Parameter ...
WARNING : unrecognizable parameter [LB_INPUT__WLI_MAX             ] at line   86 !!
. . .
NOTE : parameter [OPT__CK_INPUT_FLUID           ] is set to the default value [ 0                   ]
********************************************************************************
ERROR : parameter "OPT__BC_FLU_XM" = 0 is not within the correct range [1 ... 5] !!
        Rank <0>, file <../include/ReadPara.h>, line <389>, function <Validate>
********************************************************************************
Program termination ...... rank 0
@hyschive hyschive added bug general General issues and improvement labels Feb 5, 2025
@technic960183
Copy link
Contributor

Just for a record:
I also faced this problem on the cluster perlmutter.

In this environment, with compiler g++ (SUSE Linux) 12.3.0,
this problem triggered when CXXFLAG -O0 is given. But works fine with CXXFLAG -O1 and CXXFLAG -O2.

5b9e30cb #406 cause the problem.

b1299c1e working
837b9ebd working
40891ef0 working
5b9e30cb not working
5fd2415e not working
693be16a not working
1cf0eb0c not working

@hyschive
Copy link
Contributor

hyschive commented Feb 7, 2025

@salmanhiro @technic960183 I believe this issue has been fixed by #430, but could you help verify it further? Thanks!

jzuhone added a commit to jzuhone/gamer that referenced this issue Feb 7, 2025
* main: (33 commits)
  Add string restriction description
  [Bugfix] Fix gamer-project#425
  Minor
  chore(docs): Sync wiki to doc/wiki [skip-cd]
  Minor
  Update wiki
  Update wiki
  Move the script
  Update generate_make.sh
  Update wiki
  Remove prefix and suffix
  Apply suggestions from code review
  chore(docs): Sync wiki to doc/wiki [skip-cd]
  Fix filename check
  Fix wrong merge
  Update wiki
  Update wiki
  Avoid long string
  Validate the executed file
  Check the filename
  ...
jzuhone added a commit to jzuhone/gamer that referenced this issue Feb 7, 2025
* main:
  Add string restriction description
  [Bugfix] Fix gamer-project#425
@technic960183
Copy link
Contributor

technic960183 commented Feb 8, 2025

@hyschive The code can run successfully now with CXXFLAG -O0. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug general General issues and improvement
Projects
None yet
Development

No branches or pull requests

4 participants