-
Notifications
You must be signed in to change notification settings - Fork 145
USE SW and fix Floating point exception #6362
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -285,7 +285,7 @@ void Symmetry::rhog_symmetry(std::complex<double> *rhogtot, | |
| //assert(rot_count<=nrotk); | ||
| }//end if section | ||
| }//end c_index loop | ||
| sum /= rot_count; | ||
| if (rot_count!=0) sum/= rot_count; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the value of
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, when rot_count == 0, the subsequent parallel computation will not run. Therefore, the sum variable is irrelevant. However, since sum stores Infinity, using it in other code could lead to undefined behavior. |
||
| for (int isym = 0; isym < rot_count; ++isym) | ||
| { | ||
| rhogtot[ipw_record[isym]] = sum/gphase_record[isym]; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
include_directoriesshould be a directory (e.g. lib/) instead of the library file?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks,the problem has been fixed in the new PR .