fckit icon indicating copy to clipboard operation
fckit copied to clipboard

Some fixes to enable compilation with NAG compiler

Open DJDavies2 opened this issue 1 year ago • 4 comments

What happened?

fckit doesn't currently compile with NAG.

There are several issues, I have a PR with some of the simpler fixes.

What are the steps to reproduce the bug?

Trying to build with NAG

Version

develop

Platform (OS and architecture)

Linux

Relevant log output

No response

Accompanying data

No response

Organisation

Met Office

DJDavies2 avatar Feb 22 '24 00:02 DJDavies2

Hi @DJDavies2 I have merged your PR #34. Are there more fixes required to make to work with NAG? If not, please close the issue.

wdeconinck avatar Feb 24 '24 21:02 wdeconinck

There are other issues but they are more difficult. Do you want me to keep using this issue or close this and create another one?

DJDavies2 avatar Feb 25 '24 01:02 DJDavies2

You can reuse this one. If the problem relates to the fckit_shared_object and related types, know that I am preparing a refactoring of this very soon.

wdeconinck avatar Feb 25 '24 16:02 wdeconinck

This is the error that I can't easily get around:

Error: /home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_refcount.F90, line 117: Multiply defined symbol FUNPTR detected at ::@FUNPTR Error: /home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_refcount.F90, line 117: FUNPTR is not a procedure name detected at FUNPTR@ Error: /home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_refcount.F90, line 118: Implicit type for FUNPTR detected at FUNPTR@=> Error: /home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_refcount.F90, line 119: Implicit type for FCKIT_EXTERNAL Warning: /home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_refcount.F90, line 119: Result FUNPTR of function FCKIT_EXTERNAL has not been assigned a value Error: /home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_refcount.F90, line 140: Multiply defined symbol FUNPTR detected at ::@FUNPTR Error: /home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_refcount.F90, line 140: FUNPTR is not a procedure name detected at FUNPTR@ Error: /home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_refcount.F90, line 141: Implicit type for FUNPTR detected at FUNPTR@=> Error: /home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_refcount.F90, line 142: Implicit type for FCKIT_OWNED Warning: /home/h01/frwd/cylc-run/mi-be984/work/1/git_clone_fckit/fckit/src/fckit/module/fckit_refcount.F90, line 142: Result FUNPTR of function FCKIT_OWNED has not been assigned a value

So yes, I think this is related to the shared_object stuff. I can get around it and progress with downstream packages by commenting out chunks of fckit code in fckit_refcount, fckit_shared_object and fckit_shared_ptr; it seems that this stuff isn't really used. However I can't find a way of re-writing this stuff to make it work. I think NAG has a bug with this, I am using 7.0.0.

DJDavies2 avatar Feb 27 '24 00:02 DJDavies2

Does #43 fix the remaining issues here?

wdeconinck avatar Jun 18 '24 08:06 wdeconinck

Yes, thanks, all working now.

DJDavies2 avatar Jun 18 '24 10:06 DJDavies2