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

Circular dependencies in NCEPLIBS #193

Closed
Hang-Lei-NOAA opened this issue Jun 2, 2021 · 4 comments
Closed

Circular dependencies in NCEPLIBS #193

Hang-Lei-NOAA opened this issue Jun 2, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@Hang-Lei-NOAA
Copy link
Contributor

Hang-Lei-NOAA commented Jun 2, 2021

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.

@Hang-Lei-NOAA Hang-Lei-NOAA added the bug Something isn't working label Jun 2, 2021
@edwardhartnett
Copy link
Contributor

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: NOAA-EMC/NCEPLIBS-w3emc#71

It has been proposed to add gblevents to UFS_UTILS: ufs-community/UFS_UTILS#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?

@Hang-Lei-NOAA
Copy link
Contributor Author

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.

@edwardhartnett
Copy link
Contributor

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.

@kgerheiser
Copy link
Contributor

gblevents was removed from w3emc, and w3emc and w3nco were combined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants