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

Build with cmake #22

Open
aerorahul opened this issue Jul 29, 2021 · 12 comments
Open

Build with cmake #22

aerorahul opened this issue Jul 29, 2021 · 12 comments
Assignees

Comments

@aerorahul
Copy link

aerorahul commented Jul 29, 2021

Migrate the build system to cmake to facilitate porting to new machines.

@aerorahul aerorahul self-assigned this Jul 29, 2021
@aerorahul
Copy link
Author

Is there someone I can work with on the GLDAS team who could verify the output from executables with cmake reproduce current build?

Much appreciated.

@barlage
Copy link

barlage commented Jul 30, 2021

@aerorahul do you need sample inputs as well? I assume this is a full system test and not any testing of sub-components.

@jiaruidong2017 are you able to participate in this? or @HelinWei-NOAA do you have any other suggestions?

@jiaruidong2017
Copy link

I am able to participate in this task, and please let me know how I can assist. Thanks.

@aerorahul
Copy link
Author

@jiaruidong2017
I can provide you with a branch that builds the executables in this repository with CMake. If you can run test cases and validate whether these CMake built executables reproduce current master, that would be appreciated. If there are differences, I can troubleshoot iteratively with you and identify the source of the discrepancies.

I will have a branch for you with instructions to build with CMake sometime next week.

Thank you for your assistance.

@jiaruidong2017
Copy link

@aerorahul Sure, and please let me know when it is ready.

@aerorahul
Copy link
Author

@jiaruidong2017

I have a branch feature/cmake ready for testing most of the source code built under sorc/ except sorc/gldas_model.fd. The build for the executable gldas_model is complicated. It does not need to be so. There are duplicate files in sorc/gldas_model.fd/make e.g. absoft.h, mpif.h, ftn_drv.h that also exist in sorc/gldas_model.fd/core. There are also unique files in sorc/gldas_model.fd/make e.g. misc.h, ftn.h. misc.h is included in a lot of files throughout the code.

I have a few questions before I go down the path of converting this (gldas_model.fd) to cmake.

  • is this gldas_model executable used in our applications? I could not find its use or reference in any of the scripts, ush or jobs directories.
  • do we have someone who understands this source code and its build? Or is it just a dump from the NASA-LIS/LISF repository?

@HelinWei-NOAA
Copy link
Collaborator

  • is this gldas_model executable used in our applications? I could not find its use or reference in any of the scripts, ush or jobs directories.
    Yes. It is used in scripts/exgdas_gldas.sh.ecf as shown below
    ln -fs $EXECgldas/gldas_${model} $RUNDIR/LIS
  • do we have someone who understands this source code and its build? Or is it just a dump from the NASA-LIS/LISF repository?
    It is built by @YoulongXia-NOAA. He should know the source code and its build.

@aerorahul
Copy link
Author

  • is this gldas_model executable used in our applications? I could not find its use or reference in any of the scripts, ush or jobs directories.
    Yes. It is used in scripts/exgdas_gldas.sh.ecf as shown below
    ln -fs $EXECgldas/gldas_${model} $RUNDIR/LIS
  • do we have someone who understands this source code and its build? Or is it just a dump from the NASA-LIS/LISF repository?
    It is built by @YoulongXia-NOAA. He should know the source code and its build.

Thanks @HelinWei-NOAA
I will direct further questions on the build of gldas_model to @YoulongXia-NOAA

@jiaruidong2017
Copy link

Thanks @HelinWei-NOAA for the response.

NO, they are totally different. This LIS based GLDAS was maintained at EMC by modifying the old version of NASA LIS.

@jiaruidong2017
Copy link

@aerorahul
The gldas_model.fd should come from our EMC maintained repository at https://github.com/NOAA-EMC/GLDAS, which were totally different from the NASA-LIS/LISF/lis. Our EMC GLDAS modified the very old version of NASA LIS. 

When you build the gldas_model.fd module, it will generate the gldas_model.fd/make/ directory and all the dependent code (.o and .d files) will be copied to the /make directory. Before compiling the code, the configure will be executed to move some .h files into the ./make directory. In our EMC version, we don't execute the configure file, instead we copied them directly into the ./make directory. Therefore, you see the duplication codes. 

@YoulongXia-NOAA
Copy link
Collaborator

Yes, @jiaruidong2017 is correct. This comes directly from Jesse Meng's CFS/GLDAS framework. If you like to know more, please contact to @JesseMeng-NOAA. I think that he used old LIS framework and made some modifications. I should have any direct relationship with NEW LIS framework if I understand correctly.

@YoulongXia-NOAA
Copy link
Collaborator

It should have any direct relationship with NEW LIS framework if I understand correctly. @JesseMeng-NOAA, if I am wrong, please correct me and give more explanations.

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

5 participants