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

QLGYRO clean-up #419

Open
bellie opened this issue Oct 30, 2024 · 9 comments
Open

QLGYRO clean-up #419

bellie opened this issue Oct 30, 2024 · 9 comments

Comments

@bellie
Copy link
Member

bellie commented Oct 30, 2024

@jmcclena @jcandy In QLGYRO, there is a clean-up routine that is run when pre-processing runs with an input.gacode. The subroutine that is called is "qlgyro_cgyro_deallocate_arrays". This appears to be an exact repeat of "cgyro_clean" with the exception of the line "call parallel_lib_clean". I don't think that it is incorrect to clean the parallel_lib at this time though.

So I have replaced all of the code in "qlgyro_cgyro_deallocate_arrays" with "call cgyro_clean".

Joey, can you please test that this does not break any functionality and let us know? [I can only see that it compiles ok.]

We need to make this work bc the repeat of code from cgyro is breaking every time we make a change in cgyro.

@jmcclena
Copy link
Contributor

The change is in master?

@bellie
Copy link
Member Author

bellie commented Oct 30, 2024

Yes, there were multiple changes today, so please test the version that is currently in master.

@jcandy
Copy link
Member

jcandy commented Oct 30, 2024

We debugged Igor's OMP optimizations for CGYRO and merged them into master. The issue is that Igor (who never makes mistakes but also never builds QLGYRO) is not keeping track of the impact of CGYRO changes on QLGYRO. The same is true of my recent changes. It would be good to move QLGYRO toward being insulated from CGYRO optimizations and refactoring.

@jmcclena
Copy link
Contributor

QLGYRO now segfaults running it on corg:

┌ Error: ERROR running QLGYRO
│ ...
│ #11  0xffffffffffffffff in ???
│ #0  0x7f1ce2e62960 in ???
│ #1  0x7f1ce2e61ac5 in ???
│ #2  0x7f1ce29c051f in ???
│ #3  0x56169021b010 in ???
│ #4  0x56169021570d in ???
│ #5  0x5616901f7dbf in ???
│ #6  0x5616902008fc in ???
│ #7  0x5616901edfde in ???
│ #8  0x7f1ce29a7d8f in ???
│ #9  0x7f1ce29a7e3f in ???
│ #10  0x5616901ee064 in ???
│ #11  0xffffffffffffffff in ???
│ #0  0x7f7b866c2960 in ???
│ #1  0x7f7b866c1ac5 in ???
│ #2  0x7f7b8622051f in ???
│ #3  0x565336c07010 in ???
│ #4  0x565336c0170d in ???
│ #5  0x565336be3dbf in ???
│ #6  0x565336bec8fc in ???
│ #7  0x565336bd9fde in ???
│ #8  0x7f7b86207d8f in ???
│ #9  0x7f7b86207e3f in ???
│ #10  0x565336bda064 in ???
│ #11  0xffffffffffffffff in ???
│ #0  0x7fb18a388960 in ???
│ #1  0x7fb18a387ac5 in ???
│ #2  0x7fb189ee651f in ???
│ #3  0x55a4166a3010 in ???
│ #4  0x55a41669d70d in ???
│ #5  0x55a41667fdbf in ???
│ #6  0x55a4166888fc in ???
│ #7  0x55a416675fde in ???
│ #8  0x7fb189ecdd8f in ???
│ #9  0x7fb189ecde3f in ???
│ #10  0x55a416676064 in ???
│ #11  0xffffffffffffffff in ???
│ #0  0x7f4237ec3960 in ???
│ #1  0x7f4237ec2ac5 in ???
│ #2  0x7f4237a2151f in ???
│ #3  0x563352287010 in ???
│ #4  0x56335228170d in ???
│ #5  0x563352263dbf in ???
│ #6  0x56335226c8fc in ???
│ #7  0x563352259fde in ???
│ #8  0x7f4237a08d8f in ???
│ #9  0x7f4237a08e3f in ???
│ #10  0x56335225a064 in ???
│ #11  0xffffffffffffffff in ???
│ #0  0x7f3c8b180960 in ???
│ #1  0x7f3c8b17fac5 in ???
│ #2  0x7f3c8acde51f in ???
│ #3  0x560ccbe5e010 in ???
│ #4  0x560ccbe5870d in ???
│ #5  0x560ccbe3adbf in ???
│ #6  0x560ccbe438fc in ???
│ #7  0x560ccbe30fde in ???
│ #8  0x7f3c8acc5d8f in ???
│ #9  0x7f3c8acc5e3f in ???
│ #10  0x560ccbe31064 in ???
│ #11  0xffffffffffffffff in ???
│ #0  0x7f6596abd960 in ???
│ #0  0x7f786aec8960 in ???
│ #1  0x7f786aec7ac5 in ???
│ #2  0x7f786aa2651f in ???
│ #3  0x55cae5f07010 in ???
│ #4  0x55cae5f0170d in ???
│ #5  0x55cae5ee3dbf in ???
│ #6  0x55cae5eec8fc in ???
│ #7  0x55cae5ed9fde in ???
│ #8  0x7f786aa0dd8f in ???
│ #9  0x7f786aa0de3f in ???
│ #10  0x55cae5eda064 in ???
│ #11  0xffffffffffffffff in ???
│ #1  0x7f6596abcac5 in ???
│ #2  0x7f659661b51f in ???
│ #3  0x55f2244f3010 in ???
│ #4  0x55f2244ed70d in ???
│ #5  0x55f2244cfdbf in ???
│ #6  0x55f2244d88fc in ???
│ #7  0x55f2244c5fde in ???
│ #8  0x7f6596602d8f in ???
│ #9  0x7f6596602e3f in ???
│ #10  0x55f2244c6064 in ???
│ #11  0xffffffffffffffff in ???
│ 
│ ===================================================================================
│ =   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
│ =   PID 145200 RUNNING AT corg
│ =   EXIT CODE: 9
│ =   CLEANING UP REMAINING PROCESSES
│ =   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
│ ===================================================================================
│ YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)
│ This typically refers to a problem with your application.
│ Please see the FAQ page for debugging suggestions
│ 
│ real	0m0.980s
│ user	0m2.213s
│ sys	0m6.133s

@bellie
Copy link
Member Author

bellie commented Oct 30, 2024

Can you please send me the test case and how to run it?

@bellie
Copy link
Member Author

bellie commented Oct 30, 2024

Or point me to where it is on corg?

@jmcclena
Copy link
Contributor

qlgyro_run.zip

qlgyro -n 4 -e .

@bellie
Copy link
Member Author

bellie commented Oct 30, 2024

Thank you. It looks like the issue happened a while ago -- the last version that works is 06/14, so I will need to track down when it occurred.

@bellie
Copy link
Member Author

bellie commented Oct 30, 2024

I fixed the seg fault error (the mapper for TGLF had not been updated to account for the change in TGLF a few months ago to have more shaping coefficients; I also updated the CGYRO mapper since only had up to sin3/cos3).

Anyways, back to the original test. The new change for the clean-up is only triggered when "cgyro_profile_model_in=2". @jmcclena Can you please run a case to test this and let us know?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants