-
Notifications
You must be signed in to change notification settings - Fork 12
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
bug with statement functions #438
Comments
Hi @ecossevin , thanks for reporting this. I've had a bit of trouble deciphering the actual problem form the bug description in this issue. However, I think I've managed to distill the actual bug and fix it. Please see PR #439 . For the reproducer itself, I had the following issues (all tested on current
So, this is really a good example of why we recommend keeping bug reproducers as minimal as possible. Instead of using full-scale model code, distilling this into a minimal failing example (see the associated test in the PR), already highlights the problem clearly and avoids strange behaviour. But anyway, thanks again for reporting this and please let me know if this fixes your problem. 😄 |
Hi @mlange05, Thanks for your fast answer. I would like not to have to read the fcttrm.func.h file; when I don't read this file, the bug is still there. Can you confirm that without reading As for the reproducer as small as possible, it's complicated in this case, because the error is occuring very deep in pymbolic, and there are some unpredictable behaviors (adding a print in the code can remove the bug). Regards, |
Hi, yes, with the fix in PR #439 the test runs for me with and without preprocessing the As for the unpredictable behaviour, I did not manage to reproduce this. Both files ("bug"/"no bug") behave exactly the same for me. Regards, |
I used the correct branch indeed. The bug has gone. When I said "the bug is still there", I was in fact mentioning an other bug. However, the bugs are very similar (same unpredictable weird behavior) as they both concern statement functions. This is why I thought it was the same bug. Concerning that other bug, I don't have a simple reproducer. I'm going to try to have the test case smaller and open a new issue. |
What happened?
I have a bug in routines with statement functions : FOLH in this case.
The code has a strange behavior, in my test case there are two fortran routines, one with comment and one without. The bug is occuring in one case and not in another.
The bug seems to be due to FOLH type that is lost at some point...
I mentioned already this problem in the loki chat a few weeks ago.
I'm using the lastest version of loki with Python 3.10.12.
bug_statement.tar.gz
I have other test cases, that are bigger. And i still have strange behavior : bug when i remove fortran comments or not, bug if i do a print inside python loki or not.
What are the steps to reproduce the bug?
untar the attached file
load loki venv
run python3 test.py :: change the
file_name
variable in test.py.Version
latest, from today
Platform (OS and architecture)
Linux pxdesrtls020 6.8.0-47-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 2 16:16:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Relevant log output
Accompanying data
No response
Organisation
météo france
The text was updated successfully, but these errors were encountered: