Closed Hang-Lei-NOAA closed 2 years ago
As far as I know there is only one circular dependency problem: the gblevents problem, which is a result of combining the w3emc and w3nco libraries.
There is a discussion here: https://github.com/NOAA-EMC/NCEPLIBS-w3emc/issues/71
It has been proposed to add gblevents to UFS_UTILS: https://github.com/NOAA-EMC/UFS_UTILS/issues/523
Will this work? @kgerheiser says that UFS_UTILS is different because it is not installed as part of NCEPLIBS. However, it is still installed as part of hpc-stack, so does that matter?
We proposed to create a repo just for gblevents, but this has been objected to by @arunchawla-NOAA based on the idea we are supposed to be reducing the number of NCEPLIBS repos.
@Hang-Lei-NOAA points out that this code has only one user, so they could simply take the subroutine back, and keep it with their code. According to Hang:
The ideal place is the obspro prep.
@Hang-Lei-NOAA what is obspro prep? Is there a repo?
Obspro prep is the main code for prep step of workflow, which is used by both GSI and GFS. The code is operated by obspro group. I believe that the code ObsProc_global is kept on vlab.
We have decided to move this to UFS_UTILS immediately. @Hang-Lei-NOAA will work with @GeorgeGayno-NOAA and @kgerheiser to put this in UFS_UTILS next week. @kgerheiser will then help get out another release of UFS_UTILS with the gblevents subroutine.
The global workflow downloads a version of UFS_UTILS and builds it.
We will then work with the obspro prep team to see if they would like to take this code within their build, since they are maintaining it in any case.
gblevents was removed from w3emc, and w3emc and w3nco were combined.
Describe the bug This is following Chief's order to open the ticket on NCEPLIBS repo level and to find a solution. NCEPLIBS has some hidden circular dependencies. We don't normally find these because there are no interfaces and we statically link, but when building shared libraries you need to resolve all symbols. The main issue is that combined w3emc (w3emc+w3nco) depends (gblevents code rely on nemsio) on nemsio, and nemsio (optional use getgbm and putgben) depends on w3emc. If some of these dependencies (nemsio depends on w3emc) are optional they should be handled by something like an ifdef or by not compiling those files. But ifdef is forbidden in NCO EE2 standard. Or some code like gblevents which is a obspro prep code, can be removed from w3emc libraries. Otherwise, it forms the circular dependencies.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Build Information How did you build or access NCEPLIBS?
System On what system are you running the code?
Additional context Add any other context about the problem here.