Skip to content

starting on autotools...#2

Closed
edhartnett wants to merge 5 commits into
NOAA-GFDL:masterfrom
edhartnett:ejh_autotools
Closed

starting on autotools...#2
edhartnett wants to merge 5 commits into
NOAA-GFDL:masterfrom
edhartnett:ejh_autotools

Conversation

@edhartnett
Copy link
Copy Markdown

Here's the beginning of the autotools build.

I build this with:
autoreconf -i && CC=mpicc FC=mpifort CPPFLAGS=-I/usr/local/fms/include LDFLAGS=-L/usr/local/fms/lib ./configure && make clean && make check

It starts by trying to build in directory driver/GFDL, and fails like this:

Making check in GFDL
make[2]: Entering directory '/home/ed/tmp/GFDL_atmos_cubed_sphere/driver/GFDL'
mpifort -DPACKAGE_NAME=\"GFDL_atmos_cubed_shere\" -DPACKAGE_TARNAME=\"gfdl_atmos_cubed_shere\" -DPACKAGE_VERSION=\"2.0-development\" -DPACKAGE_STRING=\"GFDL_atmos_cubed_shere\ 2.0-development\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"gfdl_atmos_cubed_shere\" -DVERSION=\"2.0-development\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -Duse_netCDF=1 -Duse_libMPI=1 -I.   -I/usr/local/fms/include  -g -O2 -c -o atmosphere.o atmosphere.F90
/usr/local/fms/include/fms_platform.h:114:0:

 #define QUAD_KIND DOUBLE_KIND
 
Warning: "QUAD_KIND" redefined
/usr/local/fms/include/fms_platform.h:39:0:

 #define QUAD_KIND 16
 
note: this is the location of the previous definition
atmosphere.F90:33:4:

 use atmos_co2_mod,      only: atmos_co2_rad, co2_radiation_override
    1
Fatal Error: Can't open module file ‘atmos_co2_mod.mod’ for reading at (1): No such file or directory
compilation terminated.
Makefile:405: recipe for target 'atmosphere.o' failed
make[2]: *** [atmosphere.o] Error 1
make[2]: Leaving directory '/home/ed/tmp/GFDL_atmos_cubed_sphere/driver/GFDL'
Makefile:364: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/home/ed/tmp/GFDL_atmos_cubed_sphere/driver'
Makefile:395: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1

I cannot find atmos_co2_mod in the FMS package. Where is it?

@wrongkindofdoctor
Copy link
Copy Markdown

@lharris4 @bensonr

atmos_co2 is in the atmos_shared/tracer_driver subdirectory of the AM4 repo:
https://github.com/NOAA-GFDL/AM4/tree/master/src/atmos_shared/tracer_driver. I'm not sure whether atmos_co2_rad and co2_radiation_override have been moved elsewhere in the in-house development stream, and have tagged the relevant folks in this response so we can correct the module.

@edhartnett
Copy link
Copy Markdown
Author

OK, thanks for the answer!

I will grab that repo and try to build it...

@edhartnett
Copy link
Copy Markdown
Author

OK, when I grab atmos_co2.F90 and attempt to build it I get this error. This kind of surpises me as I have FMS installed and diag_manager_mod.mod is present. Could you be using a different version?

mpifort -DPACKAGE_NAME=\"GFDL_atmos_cubed_shere\" -DPACKAGE_TARNAME=\"gfdl_atmos_cubed_shere\" -DPACKAGE_VERSION=\"2.0-development\" -DPACKAGE_STRING=\"GFDL_atmos_cubed_shere\ 2.0-development\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"gfdl_atmos_cubed_shere\" -DVERSION=\"2.0-development\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -Duse_netCDF=1 -Duse_libMPI=1 -I.   -I/usr/local/fms/include  -g -O2 -c -o atmos_co2.o atmos_co2.F90
atmos_co2.F90:627:20:

    id_co2restore  = register_diag_field ('atmos_co2_restoring', 'co2_restore', axes, Time, &
                    1
Error: There is no specific function for the generic ‘register_diag_field’ at (1)
atmos_co2.F90:631:15:

    id_pwt    = register_diag_field ('atmos_co2', 'pwt', axes, Time, &
               1
Error: There is no specific function for the generic ‘register_diag_field’ at (1)
atmos_co2.F90:635:22:

    id_co2_mol_emiss = register_diag_field ('atmos_co2_emissions', 'co2_mol_emission', axes(1:2), Time, &
                      1
Error: There is no specific function for the generic ‘register_diag_field’ at (1)
atmos_co2.F90:639:23:

    id_co2_emiss_orig = register_diag_field ('atmos_co2_emissions', 'co2_emissions_orig', axes(1:2), Time, &
                       1
Error: There is no specific function for the generic ‘register_diag_field’ at (1)
atmos_co2.F90:525:17:

   ind_co2_flux = aof_set_coupler_flux('co2_flux',                       &
                 1
Error: Type mismatch in argument ‘param’ at (1); passed REAL(4) to REAL(8)
atmos_co2.F90:384:75:

     call data_override('ATM', 'co2_emiss', co2_emis2d, Time, override=used)
                                                                           1
Error: There is no specific subroutine for the generic ‘data_override’ at (1)
atmos_co2.F90:392:88:

     call data_override('ATM', 'co2_dvmr_restore', restore_co2_dvmr, Time, override=used)
                                                                                        1
Error: There is no specific subroutine for the generic ‘data_override’ at (1)
atmos_co2.F90:341:36:

   if (id_co2_emiss_orig > 0) sent = send_data (id_co2_emiss_orig, co2_emis2d(is:ie,js:je), Time_next, is_in=is,js_in=js)
                                    1
Error: There is no specific function for the generic ‘send_data’ at (1)
atmos_co2.F90:251:84:

   call data_override('ATM', 'co2_dvmr_rad', radiation_co2_dvmr, Time, override=used)
                                                                                    1
Error: There is no specific subroutine for the generic ‘data_override’ at (1)
atmos_co2.F90:200:23:

 if (id_pwt > 0) sent = send_data (id_pwt, pwt, Time_next, is_in=is,js_in=js)
                       1
Error: There is no specific function for the generic ‘send_data’ at (1)
Makefile:412: recipe for target 'atmos_co2.o' failed
make[2]: *** [atmos_co2.o] Error 1
make[2]: Leaving directory '/home/ed/tmp/GFDL_atmos_cubed_sphere/driver/GFDL'
Makefile:364: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/home/ed/tmp/GFDL_atmos_cubed_sphere/driver'
Makefile:395: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1

@wrongkindofdoctor
Copy link
Copy Markdown

Yes, it is likely that the development workflow differs from the one you are trying to build. I need @lharris4 and/or @bensonr to confirm.

@lharris4
Copy link
Copy Markdown
Contributor

lharris4 commented Jul 24, 2019 via email

@edhartnett
Copy link
Copy Markdown
Author

Well, let me ask this question: does this repo build for anyone there at GFDL? If so, can you send me your build output, so I can see what happens with this missing file? If not, could you fix the repo so that it can be built in some way? Thanks!

@lharris4
Copy link
Copy Markdown
Contributor

lharris4 commented Jul 24, 2019 via email

@edhartnett
Copy link
Copy Markdown
Author

How do you build the version of the model that does not use those files? If you can build this code, can you please send me your full build output? Thanks!

@bensonr
Copy link
Copy Markdown
Contributor

bensonr commented Jul 24, 2019 via email

@edhartnett
Copy link
Copy Markdown
Author

Howdy @bensonr ! What's a good time to call you? I am free all day.

@edhartnett
Copy link
Copy Markdown
Author

I have learned from rusty that the master branch on this repo is not really worth messing with. I will switch to the two active branches instead.

I urge the code managers of this project to make the decisions necessary to merge code to master. I understand that in the absence of a proper build system, it can be a challenge to integrate versions of the code developed for different purposes.

I will get a build system going for each of the two branches. Hopefully, there can then be an effort to merge changes to master and come up with a version of this code that everyone can use.

@edhartnett edhartnett closed this Jul 25, 2019
DomHeinzeller referenced this pull request in NOAA-GSL/GFDL_atmos_cubed_sphere Dec 12, 2019
DomHeinzeller referenced this pull request in NOAA-GSL/GFDL_atmos_cubed_sphere Dec 12, 2019
bensonr pushed a commit that referenced this pull request Sep 15, 2020
update noaa-psd fork with EMC develop branch
bensonr pushed a commit that referenced this pull request Sep 15, 2020
- bugfix for GNU compiler
- reduce noise in stdout

Squashed commit of the following:

commit 86c127f
Merge: ce66d6a f9bbb4f
Author: Dom Heinzeller <dom.heinzeller@icloud.com>
Date:   Fri Apr 10 11:32:21 2020 -0600

    Merge pull request #11 from climbfuji/update_dtc_develop_from_dev_emc_20200409

    Update dtc/develop from dev/emc 2020/04/09

commit f9bbb4f
Author: Dom Heinzeller <climbfuji@ymail.com>
Date:   Thu Apr 9 20:14:24 2020 -0600

    Bugfix for GNU compiler in model/fv_regional_bc.F90, reduce verbosity in driver/fvGFS/atmosphere.F90

commit ecca997
Merge: ce66d6a 80ce8ce
Author: Dom Heinzeller <climbfuji@ymail.com>
Date:   Thu Apr 9 09:38:48 2020 -0600

    Merge branch 'dev/emc' of https://github.com/NOAA-EMC/GFDL_atmos_cubed_sphere into HEAD

commit ce66d6a
Merge: 4279bf7 9bacf55
Author: Dom Heinzeller <dom.heinzeller@icloud.com>
Date:   Fri Mar 13 13:00:41 2020 -0600

    Merge pull request #10 from climbfuji/update_from_dev_emc_20200312_and_other_changes

    Update from dev/emc 2020/03/12

commit 9bacf55
Merge: 4279bf7 371a29a
Author: Dom Heinzeller <climbfuji@ymail.com>
Date:   Thu Mar 12 10:33:44 2020 -0600

    Merge branch 'dev/emc' of https://github.com/NOAA-EMC/GFDL_atmos_cubed_sphere into HEAD

commit 4279bf7
Merge: 846f5a5 4858d33
Author: Dom Heinzeller <dom.heinzeller@icloud.com>
Date:   Mon Mar 9 12:41:51 2020 -0600

    Merge pull request #9 from climbfuji/update_dtc_develop_from_emc

    Update dtc/develop from dev/emc 2020/03/04

commit 4858d33
Merge: 846f5a5 db3acfb
Author: Dom Heinzeller <climbfuji@ymail.com>
Date:   Fri Feb 28 08:46:55 2020 -0700

    Merge branch 'dev/emc' of https://github.com/NOAA-EMC/GFDL_atmos_cubed_sphere into HEAD

commit 846f5a5
Merge: 3a4dfd8 9a290ee
Author: Dom Heinzeller <dom.heinzeller@icloud.com>
Date:   Mon Feb 3 07:43:08 2020 -0700

    Merge pull request #7 from climbfuji/update_dtc_develop_from_dev-emc

    dtc/develop: update from dev/emc 2020/01/27

commit 9a290ee
Merge: 3a4dfd8 a56907a
Author: Dom Heinzeller <climbfuji@ymail.com>
Date:   Mon Jan 27 09:28:57 2020 -0700

    Merge branch 'dev/emc' of https://github.com/noaa-emc/GFDL_atmos_cubed_sphere into HEAD

commit 3a4dfd8
Merge: 0c9ab9e 68576a6
Author: Dom Heinzeller <dom.heinzeller@icloud.com>
Date:   Tue Dec 3 15:19:24 2019 -0700

    Merge pull request #6 from climbfuji/dtc_develop_udpate_from_emc_20191127

    dtc/develop: update from EMC 2019/11/27

commit 68576a6
Merge: 0c9ab9e 452333a
Author: Dom Heinzeller <climbfuji@ymail.com>
Date:   Wed Nov 27 14:13:08 2019 -0700

    Merge branch 'dev/emc' of https://github.com/NOAA-EMC/GFDL_atmos_cubed_sphere into HEAD

commit 0c9ab9e
Merge: 9871607 b280b37
Author: Dom Heinzeller <dom.heinzeller@icloud.com>
Date:   Fri Nov 22 16:17:57 2019 -0700

    Merge pull request #5 from mzhangw/HAFS_fer_hires

    minimal changes to make nwat =4 compatible with Ferrier-Aligo MP scheme

commit b280b37
Author: Man.Zhang <Man.Zhang@noaa.gov>
Date:   Tue Nov 19 14:53:57 2019 -0700

    bug fix

commit 98c58ad
Author: Man.Zhang <Man.Zhang@noaa.gov>
Date:   Tue Nov 19 14:35:10 2019 -0700

    bug fix

commit 8805acd
Author: Man.Zhang <Man.Zhang@noaa.gov>
Date:   Tue Nov 19 14:16:22 2019 -0700

    From Chunxi: The file fv_mapz.F90 also needs to be modified (K_warm)

commit f8a257a
Author: Man.Zhang <Man.Zhang@noaa.gov>
Date:   Thu Nov 14 19:12:39 2019 -0700

    use upper-case CCPP

commit 77f4fba
Author: Man.Zhang <Man.Zhang@noaa.gov>
Date:   Thu Nov 14 13:40:59 2019 -0700

     implement FA scheme water loading option if nwat =4

commit 9871607
Merge: ed75004 786447c
Author: Dom Heinzeller <climbfuji@ymail.com>
Date:   Tue Nov 5 06:59:34 2019 +0900

    Merge branch 'dev/emc' of https://github.com/NOAA-EMC/GFDL_atmos_cubed_sphere into HEAD

commit ed75004
Merge: 1d6035a f627bfb
Author: Dom Heinzeller <dom.heinzeller@icloud.com>
Date:   Sat Oct 12 08:45:14 2019 +0900

    Merge pull request #4 from climbfuji/update_gmtb_develop_with_vlab_master_20191006

    Update NCAR gmtb/develop with NOAA-EMC dev/emc 2019/10/06

commit f627bfb
Author: Dom Heinzeller <climbfuji@ymail.com>
Date:   Mon Oct 7 12:12:24 2019 +0900

    Add missing change in fv_cmp.F90 - now identical with EMC code

commit e868186
Author: Dusan Jovic <dusan.jovic@noaa.gov>
Date:   Tue Sep 24 01:57:11 2019 +0000

    change delz from positive value to the original value in the model

commit 672eb0e
Author: fanglin.yang <fanglin.yang@noaa.gov>
Date:   Thu Sep 5 19:24:09 2019 +0000

        VLab Issue #68141

        modified:   docs/FV3_citations.bib
        modified:   model/fv_cmp.F90

        1) Add an option (namelist parameter: intqs) to use temperature instead of the liquid frozen
        temperature to calculate saturation mixing ratio in deriving GFDLMP PDF cloud cover.
        2) Add a literature reference.

commit 1d6035a
Merge: 94ab0e1 fec8205
Author: Dom Heinzeller <dom.heinzeller@icloud.com>
Date:   Mon Sep 23 09:32:55 2019 -0600

    Merge pull request #2 from climbfuji/remove_transition_mode

    Remove TRANSITION mode

commit fec8205
Author: climbfuji <dom.heinzeller@icloud.com>
Date:   Fri Sep 20 08:52:01 2019 -0600

    Remove TRANSITION mode

commit 94ab0e1
Author: Jun.Wang <Jun.Wang@noaa.gov>
Date:   Mon Aug 26 21:03:55 2019 +0000

    add option to output omega

commit b700cae
Author: climbfuji <dom.heinzeller@icloud.com>
Date:   Fri Aug 30 11:58:00 2019 -0600

    model/fv_dynamics.F90: replicating previous change to gmtb/develop branch of FV3, always allocate dtdt_m for IPD version

commit 3df1171
Author: Laurie Carson <carson@ucar.edu>
Date:   Fri Aug 16 10:46:56 2019 -0600

    Add codeowners for NCAR fork
mmiesch referenced this pull request in JCSDA/GFDL_atmos_cubed_sphere Jun 4, 2021
Turn on INTERNAL_NML_FILE and add option not to re-read namelist in initialize
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

Successfully merging this pull request may close these issues.

4 participants