-
Notifications
You must be signed in to change notification settings - Fork 26
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
pyspline doesn't work with ifx #73
Comments
@eirikurj @A-CGray Here are the details I've uncovered:
Either A) We figure out the correct compiler setup for the pre-processing or B) We slightly modify the projections so they don't require pre-processing. Let me know what you think. |
Nice, thanks for finding this @lamkina . If this is as simple as changing what compiler flags are used to enable pre-processing, and the same flags will work for both ifort and ifx (and gcc?) then I'm fine with just doing that. Otherwise, maybe just switch to defining these as global constants so that we don't need to have another thing depend on the type of compiler we're using (I'm only familiar with doing this in C++ where I'd write something like Also, I see adtProjections also has an F90 extension, but I didn't see any preprocessing commands in there, any idea what's going on there? |
I think the cleaner solution is to define these as constants and have all the extensions be lowercase I don't think the I'll wait for @eirikurj to comment then we can decide on the right way to fix this. |
I took a look, and I am not convinced that this is a preprocessing issue. To explicitly enable the preprocessor we can include the flag Disabling compile optimization, i.e., setting In code, the divergence between Line 153 in b488ed5
Running one of the test/points locally, the state of the values are shown below,
The inputs Aside from compiler tweaks, I think the issue (at least in part) is due to sufficient decrease of the Wolfe condition (see here Line 139 in b488ed5
<= comparison, not < . Adding this correction to the if statement thus terminates the loop before this becomes an issue (since the gradient is zero), and the behavior is the same across all compilers ifx , gfortran , and ifort . Granted, this is a small change in behavior, but I think practically there should be no change in final results, and it should avoid unnecessary iterations.
I dont think digging more into the compilers is worth it, aside from just adding the compiler flags I mention above, but feel as I think its important to study Please test this carefully and let me know what you think. |
Chiming in just to say that this is some incredible detective work! Updating the Wolfe condition here is a no-brainer. I wonder if we should look at other codes and see if there are "risky" if checks like this. |
@A-CGray yes preprocessing is automatically applied to a file if it has one of these extensions shown below (gfortran added for reference also).
Since we are using |
Description
pyspline tests are failing on the latest intel docker images that use the
ifx
compiler, see test outputs hereCopied here for archiving
Steps to reproduce issue
Current behavior
…
Expected behavior
…
Code versions
The text was updated successfully, but these errors were encountered: