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

Fixing errors caused by icpx compilation #316

Merged
merged 3 commits into from
May 23, 2024
Merged

Fixing errors caused by icpx compilation #316

merged 3 commits into from
May 23, 2024

Conversation

A-CGray
Copy link
Contributor

@A-CGray A-CGray commented May 20, 2024

Compiling TACS with the new intel icpx compiler surfaced some new errors, one in element_tests/test_pressure_2d and another in integration_tests/test_thermoelast_linquad_element_2d.py.
Changes made:

  • Fix memset of incorrect size in TACSPressure2D
  • Remove duplicated residual calculation code from the addJacobian method of TACSPressure2D
  • Slightly changed the FD step size used in the test_thermoelast_linquad_element_2d to give more accurate FD derivatives

Example of TACSPressure2d issue:

Before fix:

Testing residual consistency of addJacobian method for element TACSPressure2D.
Max Err: 5.2003e+00 in component 0.
Max REr: 1.7875e+00 in component 0.
The difference between addResidual and addJacobian residuals is
Val[   ]                  Analytic               Approximate                Rel. Error                Abs. Error
res[  0]   -8.1096044075844116e+00   -2.9092966201960104e+00    1.7874794035398276e+00    5.2003077873884012e+00
res[  1]   -6.6968190566401757e+00   -2.4024640498279082e+00    1.7874794035398274e+00    4.2943550068122676e+00
res[  2]    1.8409218189066476e+00   -2.9092966201960104e+00    1.6327721299118061e+00    4.7502184391026585e+00
res[  3]    1.5202122938461484e+00   -2.4024640498279082e+00    1.6327721299118059e+00    3.9226763436740564e+00
res[  4]    4.5008934828574299e-01    0.0000000000000000e+00                         -    4.5008934828574299e-01
res[  5]    3.7167866313821141e-01    0.0000000000000000e+00                         -    3.7167866313821141e-01

After fix:

Testing residual consistency of addJacobian method for element TACSPressure2D.
Max Err: 0.0000e+00 in component 0.
Max REr: 0.0000e+00 in component 0.
The difference between addResidual and addJacobian residuals is
Val[   ]                  Analytic               Approximate                Rel. Error                Abs. Error
res[  0]   -2.9092966201960104e+00   -2.9092966201960104e+00    0.0000000000000000e+00    0.0000000000000000e+00
res[  1]   -2.4024640498279082e+00   -2.4024640498279082e+00    0.0000000000000000e+00    0.0000000000000000e+00
res[  2]   -2.9092966201960104e+00   -2.9092966201960104e+00    0.0000000000000000e+00    0.0000000000000000e+00
res[  3]   -2.4024640498279082e+00   -2.4024640498279082e+00    0.0000000000000000e+00    0.0000000000000000e+00
res[  4]    0.0000000000000000e+00    0.0000000000000000e+00                         -    0.0000000000000000e+00
res[  5]    0.0000000000000000e+00    0.0000000000000000e+00                         -    0.0000000000000000e+00

@A-CGray A-CGray marked this pull request as ready for review May 23, 2024 18:57
@A-CGray A-CGray requested a review from timryanb May 23, 2024 18:57
@timryanb timryanb merged commit 2a220e1 into master May 23, 2024
5 checks passed
@timryanb timryanb deleted the A-CGray-patch-1 branch May 23, 2024 21:03
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

Successfully merging this pull request may close these issues.

2 participants