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

Add an option to change the complex return type. #434

Merged
merged 4 commits into from
Sep 7, 2020
Merged

Conversation

devinamatthews
Copy link
Member

ifort apparently does not return complex numbers in registers as in C/C++ (or gfortran), but instead creates a "hidden" first parameter for the return value. The option --complex-return=gnu|intel has been added, as well as a guess based on a provided FC if not specified (otherwise default to gnu). This option affects the signatures of cdotc, cdotu, zdotc, and zdotu, and a single library cannot be used with both GNU and Intel Fortran compilers. Fixes #433.

ifort apparently does not return complex numbers in registers as in C/C++ (or gfortran), but instead creates a "hidden" first parameter for the return value. The option --complex-return=gnu|intel has been added, as well as a guess based on a provided FC if not specified (otherwise default to gnu). This option affects the signatures of cdotc, cdotu, zdotc, and zdotu, and a single library cannot be used with both GNU and Intel Fortran compilers. Fixes #433.
@devinamatthews
Copy link
Member Author

@fgvanzee this one too.

configure Outdated
elif [ "x${complex_return}" = "xintel" ]; then
complex_return_intel01='1'
else
echo "${script_name}: unknown complex return type \"${complex_return}\"! Cannot continue."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this default to gnu if not given to not break scripts building BLIS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@isuruf it does default to gnu if FC isn't specified explicitly. Do you mean to use gnu even if FC is set?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you are right. Didn't read the code correctly. Sorry

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No prob, thanks for the extra set of eyes.

@fgvanzee
Copy link
Member

fgvanzee commented Sep 7, 2020

Reviewing...

Copy link
Member

@fgvanzee fgvanzee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Both Travis CI and AppVeyor seem to be taking Labor Day off, so I'll leave it up to you whether you want to wait for them to wake up before merging.

@devinamatthews
Copy link
Member Author

All tests passed before the last commit which is just whitespace stuff, so I'll merge.

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.

Compatibility with Intel Fortran compiler
3 participants