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

No-Op rebuild of GEOSgcm triggers rebuilds of GOCART2G #117

Closed
mathomp4 opened this issue Mar 11, 2022 · 1 comment
Closed

No-Op rebuild of GEOSgcm triggers rebuilds of GOCART2G #117

mathomp4 opened this issue Mar 11, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mathomp4
Copy link
Member

mathomp4 commented Mar 11, 2022

I think there is something slightly off with the CMake in GOCART2G, probably involving the automatic code generator.

First, build and install GEOSgcm. Now, doing nothing to the source code, go to your build directory and re-run make -jN install. When you do, you'll see what I think is the ACG re-running:

...
[  8%] Generating automatic code for CA2G_StateSpecs.rc
[  8%] Built target NCEP_bacio_r8i8
Consolidate compiler generated dependencies of target NCEP_bacio_r8i4
[  8%] Built target Process_Library
[  8%] Generating automatic code for NI2G_StateSpecs.rc
[  8%] Built target acg_phony_CA2G_GridComp
[  8%] Generating automatic code for SU2G_StateSpecs.rc
...

which I'm guessing generates code with a newer timestamp and so CMake has no choice but to re-compile:

...
[ 80%] Building Fortran object src/Components/@GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/@GEOSchem_GridComp/@GOCART/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMakeFiles/DU2G_GridComp.dir/DU2G_GridCompMod.F90.o
[ 80%] Built target ec_prs2eta.x
[ 80%] Building Fortran object src/Components/@GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/@GEOSchem_GridComp/@GOCART/ESMF/GOCART2G_GridComp/SS2G_GridComp/CMakeFiles/SS2G_GridComp.dir/SS2G_GridCompMod.F90.o
[ 80%] Built target convert_eta.x
...

which then triggers a library re-link and a rebuild of all of GOCART2G's dependents:

...
[100%] Linking Fortran static library ../../../../../../../../../../lib/libNI2G_GridComp.a
[100%] Built target NI2G_GridComp
[100%] Linking Fortran static library ../../../../../../../../../../lib/libCA2G_GridComp.a
[100%] Built target CA2G_GridComp
Scanning dependencies of target GOCART2G_GridComp
[100%] Building Fortran object src/Components/@GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/@GEOSchem_GridComp/@GOCART/ESMF/GOCART2G_GridComp/CMakeFiles/GOCART2G_GridComp.dir/GOCART2G_GridCompMod.F90.o
[100%] Linking Fortran static library ../../../../../../../../../lib/libGOCART2G_GridComp.a
[100%] Built target GOCART2G_GridComp
Scanning dependencies of target Aerosol_GridComp
[100%] Building Fortran object src/Components/@GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/@GEOSchem_GridComp/CMakeFiles/GEOSchem_GridComp.dir/GEOS_ChemGridComp.F90.o
[100%] Building Fortran object src/Components/@GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/@GEOSchem_GridComp/@GOCART/ESMF/Aerosol_GridComp/CMakeFiles/Aerosol_GridComp.dir/Aerosol_GridComp.F90.o
[100%] Linking Fortran static library ../../../../../../../../../lib/libAerosol_GridComp.a
[100%] Built target Aerosol_GridComp
[100%] Linking Fortran static library ../../../../../../lib/libGEOSchem_GridComp.a
[100%] Built target GEOSchem_GridComp
[100%] Building Fortran object src/Components/@GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/CMakeFiles/GEOSphysics_GridComp.dir/GEOS_PhysicsGridComp.F90.o
[100%] Linking Fortran static library ../../../../../lib/libGEOSphysics_GridComp.a
[100%] Built target GEOSphysics_GridComp
[100%] Building Fortran object src/Components/@GEOSgcm_GridComp/GEOSagcm_GridComp/CMakeFiles/GEOSagcm_GridComp.dir/GEOS_AgcmGridComp.F90.o
...

Obviously, if no code has changed, CMake shouldn't need to rebuild.

@mathomp4 mathomp4 added the bug Something isn't working label Mar 11, 2022
@amdasilva
Copy link
Collaborator

I will leave that to the cmake gurus...

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

4 participants