-
Notifications
You must be signed in to change notification settings - Fork 96
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
Running examples in BOUT-2/3 #2608
Comments
Hi @alexaeg, I'm afraid previous versions of BOUT++ are unsupported. The examples did work at the time, to the best of our knowledge, but we're unlikely to make any fixes to them now. If you post the backtrace, the commit hash of the BOUT++ version you're using, and which example you're trying to run, we might be able to help though. |
Thank you, @ZedThree. The versions of the gcc and OS we are using are as follows:
BOUT was downloaded from this location:
For the test, our specialist at the HPC department has compiled the code with the GDB support and basic configuration of the code and got the following backtrace:
The problem encountered is as follows (the code cci is one the custom made codes, however for the examples the similar output is obtained)
A more detailed analysis of the problem with the debugger has revealed the following:
The BOUT++ compiled without any optimizations (e.g. with the --debug option) produces the stable code that can be safely run, so it seems that some of the optimizations may be interfering with the code. However, manually setting the gcc optimization flags step-by-step resulted in the segfault error upon running any of the examples, so the problem may be deeper than some of the opt flags breaking the code. The code behavior (segfault) is identical either for BOUT v2 or v3. However, BOUT v2 obtained from here: allows compiling and running the examples with the optimization flag turned on. The whole question on running BOUT v2/3 arouse when trying to port the simulation code (cci) from version 2 to version 4. It turned out that although the simulation outputs are identical between the codes, I've run into the code convergence issue (absent in v2 simulations), when running the code compiled in BOUT v4. I talked to Benjamin on the problem, and it seems that some of the new BOUT machinery might be resulting in such a behavior of the code. I'll cover the issue in a separate thread. |
Hello, guys, I've been able to resolve the issue. Adding the return statement to the write_int and write_real functions allowed to preserve the variables that were initially optimized out by the compiler. |
Hello everyone,
Recently I tried running examples supplied with the previous BOUT versions, 2 and 3.
The BOUT (and examples) compilation goes well, however running any of the simulation codes results in the immediate code crash (segfault) upon the call to the physics_run function.
It may be outdated to check such an issue arising within one of the older versions of BOUT, but having the build providing the ground to run previous simulations is good for benchmarking and code verification.
So if the question is relevant, I'll provide a more detailed information on the problem.
Best,
Alex
The text was updated successfully, but these errors were encountered: