Is the circular dependency an implementation dependency or an interface dependency? How does the circular dependency manifest?
Is it a circular module dependency (interface dependency) ?
! mo_feature.f90
module feature
use grid
! ...
end module
! mo_grid.f90
module grid
#ifdef LIBFEATURE
use feature, only: foo
#endif
! ...
end module
Edit: you can find some previous discussion of circular dependencies,
- Ways to suppress Circularity
- Class array with different types at each index - #4 by ivanpribec; shows use of the surrogate pattern introduced in Scientific Software Design by @rouson, Xia and Xu as a way of circumventing circular dependencies