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

Dependency checker generates false dependencies from generated interface files #213

Open
gdcarver opened this issue Nov 25, 2015 · 1 comment
Milestone

Comments

@gdcarver
Copy link

FCM can falsely report dependencies from FCM generated interface files because it assumes 'USE'd modules in the .F90 are needed in the interface. This can lead to non-existent cyclic dependencies being reported halting the build.

Consider, dr_hook_util.F90:

   SUBROUTINE DR_HOOK_UTIL(PKEY)
   USE PARKIND1  ,ONLY : JPRB
   USE MPL_INIT_MOD, ONLY : MPL_INIT
   REAL(KIND=JPRB),INTENT(INOUT) :: PKEY
   END

The generated interface is then, dr_hook_util.intfb.h :

   INTERFACE
   SUBROUTINE DR_HOOK_UTIL(PKEY)
   USE PARKIND1  ,ONLY : JPRB
   REAL(KIND=JPRB),INTENT(INOUT) :: PKEY
   END INTERFACE

The module MPL_INIT_MOD is not needed for the interface file. However, for this (larger than shown) code, FCM incorrectly reports a cyclic dependency stemming from dr_hook_util.intfb.h (intfb.h being automatically generated).
e.g:

... snipped ...
[FAIL]     required by: mpl_init_mod.mod
[FAIL]     required by: dr_hook_util.intfb.h
... snipped ...

The dependency is on the dr_hook_util.o file, but the 'mpl_init_mod.mod' should not be considered a dependency on the generated interface file in this case.

@matthewrmshin matthewrmshin self-assigned this Nov 25, 2015
@matthewrmshin matthewrmshin added this to the soon milestone Nov 25, 2015
@matthewrmshin
Copy link
Member

@gdcarver how are you working round this at the moment? Is this causing a lot of problem?

@matthewrmshin matthewrmshin removed their assignment Sep 4, 2023
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

2 participants