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

TODO: fix bug for newer ifort/ifx #10

Open
lcrippa opened this issue Nov 22, 2024 · 0 comments
Open

TODO: fix bug for newer ifort/ifx #10

lcrippa opened this issue Nov 22, 2024 · 0 comments

Comments

@lcrippa
Copy link
Collaborator

lcrippa commented Nov 22, 2024

Recent versions of ifort/ifx (>2019, for what I have been able to accertain) suffer from the following problem:

Some variables are bound to c via iso_c_binding. Some of these variables are used as dimensions of input and return parameters of functions. For example, print_Hloc_nn_c has as input parameter hloc, which is declared to have dimension (Nnambu*Nspin,Nnambu*Nspin,Norb,Norb). In this case, the function is correctly compiled. However, if then the function is called in another module, the compilation fails with

error #7556: The external name for this symbol conflicts with a previously declared external name. [ED_INPUT_VARS^NORB] (and analogously for Nspin)

this holds for a given number of functions, e.g.

  • print_hloc
  • g0and_bath_array
  • f0_bath_array

and so on.

The problem doesn't arise if the variables are not iso_c bound, and it is specific to newer intel compilers (both ifort and the ifx) only.
The precise contours of this remain nebulous to me.

Possible fix:

  • replace the parameters in these functions either with dummy (:,:...) and assert_shape, if input parameter, or with allocatable and allocate if return parameter
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

No branches or pull requests

1 participant