Skip to content

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

Merged
devinamatthews merged 4 commits intomasterfrom
intel-zdot
Sep 7, 2020
Merged

Add an option to change the complex return type.#434
devinamatthews merged 4 commits intomasterfrom
intel-zdot

Conversation

@devinamatthews
Copy link
Copy Markdown
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 devinamatthews requested a review from fgvanzee August 6, 2020 19:14
@devinamatthews
Copy link
Copy Markdown
Member Author

@fgvanzee this one too.

Comment thread 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

fgvanzee commented Sep 7, 2020

Reviewing...

Copy link
Copy Markdown
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
Copy Markdown
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