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

Compile failure for Intel #93

Closed
DJDavies2 opened this issue Apr 27, 2024 · 8 comments
Closed

Compile failure for Intel #93

DJDavies2 opened this issue Apr 27, 2024 · 8 comments

Comments

@DJDavies2
Copy link
Contributor

I am getting this compile failure with ifort for the develop branch:

/home/h01/frwd/cylc-run/mo-bundle-build-base-latest/share/make_mo__spice_intel_debug/ectrans/src/trans/generated/ectrans_dp/internal/ftdir_ctl_mod.F90(147): error #5558: A pointer with the CONTIGUOUS attributes is being made to a non-contiguous target
ZGTF => ZGTF_STACK(:,:)
--^
compilation aborted for /home/h01/frwd/cylc-run/mo-bundle-build-base-latest/share/make_mo__spice_intel_debug/ectrans/src/trans/generated/ectrans_dp/internal/ftdir_ctl_mod.F90 (code 1)
gmake[2]: *** [ectrans/src/trans/CMakeFiles/ectrans_dp.dir/generated/ectrans_dp/internal/ftdir_ctl_mod.F90.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [ectrans/src/trans/CMakeFiles/ectrans_dp.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....

@samhatfield
Copy link
Collaborator

Hi @DJDavies2 - which version of ifort are you using? I am using

ifort (IFORT) 2021.4.0 20210910

and I don't see this error.

@samhatfield
Copy link
Collaborator

You're right to raise this though. The documentation is pretty clear:

An array pointer with the CONTIGUOUS attribute can only be pointer associated with a contiguous target.

The CONTIGUOUS statements were introduced in commit 635f9bb. This commit contains changes imported from the IFS, and I think @RyadElKhatibMF wrote this originally. I noticed that ZGTF in FTDIR_CTL has CONTIGUOUS but not ZGTF in FTINV_CTL. So I wonder if we actually need CONTIGUOUS at all. Any thoughts @RyadElKhatibMF?

@DJDavies2
Copy link
Contributor Author

I am using Ifort 2019, a bit old unfortunately.

@RyadElKhatibMF
Copy link
Contributor

RyadElKhatibMF commented May 14, 2024 via email

@samhatfield
Copy link
Collaborator

Thanks for this Ryad. I realise I misunderstood the documentation.

An array pointer with the CONTIGUOUS attribute can only be pointer associated with a contiguous target.
"Contiguous target" doesn't mean an array explicitly declared CONTIGUOUS - the target can be contiguous without this decorator of course.

Both targets in this case, ZGTF_STACK and ZGTF_HEAP, are contiguous already, looking at how their dimensions are declared. Hence I think the code is already correct as it is.

I also noticed some other people reporting compilation bugs for contiguous pointers in fairly recent versions of ifort. Therefore I think we have to declare this a bug in ifort 2019. @DJDavies2 is there no way you can update your ifort version? I would rather not add a preprocessing macro to remove CONTIGUOUS for earlier compiler versions.

@DJDavies2
Copy link
Contributor Author

I cannot update ifort myself, I don't have the system rights to do that. They will be updated at some point, but the timescale is months if not years as things stand.

If you don't want to have this sort of change that is completely understandable. I can keep these sorts of changes on a branch in my github repository if you would prefer to keep them off develop.

@samhatfield
Copy link
Collaborator

Fair enough. Yes, sorry about that. What you could do is run a simple find-and-replace across the source tree replacing , CONTIGUOUS with the empty string.

@DJDavies2
Copy link
Contributor Author

Okay, I will look into that. I will close this issue.

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

3 participants