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

Add support for CMake #35

Closed
wants to merge 118 commits into from
Closed

Conversation

LiamBindle
Copy link
Contributor

@LiamBindle LiamBindle commented Apr 29, 2019

Hi everyone,

This is a pull request (PR) for the changes that implement CMake support into GEOS-Chem. This PR adds about 20 new files but doesn't modify any preexisting files or the Makefile structure. These files implement a new modular build system that can compile GEOS-Chem Classic, or be controlled to build libGeosCore for dependents like GCHP.

These changes have little effect on GEOS-Chem Classic users (GEOS-Chem Classic is already easy to build) but are the basis for PR #23 PR #27 (on GCHP) which aims to improve the ease and transparency of building GCHP. Because these changes have a wider bearing than GCHP, I thought here (this PR) was the most appropriate place to discuss these changes rather than in my GCHP PR.

Motivation

A priority of the GCHP Working Group has been making the model easier to use. Particularly for new users, compiling GCHP can be challenging because your operating environment needs to be configured properly and the build process is rather hard to follow (the log files are very verbose and not necessarily clear).

I think that these user-level challenges stem from the Makefile structure being difficult to maintain for large codebases like GCHP (GCHP contains more than 3000 Fortran, C, and C++ files compared to GEOS-Chem Classic which has 365 Fortran files). Makefile structures rely on dependents calling the Makefiles of their dependencies. This forms a monolithic structure with internal relationships that are difficult to maintain for dependencies with complex build configurations like GCHP's MAPL dependency. With a CMake-based build system, these internal relationships are maintained automatically by the CMake engine, rather than by the manual effort of developers.

Task list

Below is a list of tasks I need to be completed before this PR is ready to merge.

  • User-level documentation (my in-progress draft is here)
  • Developer documentation (inline)
  • Verify that compiler definitions are correct for each run directory (see here)
  • Verify that compiler options are the same for each run directory (see here)
  • Verify that the executable for each run directory compile (see here)
  • Run important diff tests (see here)
  • Merge HEAD into my branch

Updates to this PR

I'm going to be updating this PR regularly so this is the best place to track my progress. Please let me know if you have any questions or concerns.

Liam

Liam Bindle and others added 30 commits September 10, 2018 10:24
@LiamBindle LiamBindle changed the base branch from master to dev/12.4.0 June 4, 2019 17:55
@LiamBindle
Copy link
Contributor Author

LiamBindle commented Jun 6, 2019

Hi everyone,

I think that CMake support is ready for people to try out! 😄

If anyone is interested in giving it a go, please do! I'd really appreciate any feedback or ideas that you have—anything and everything! It's no rush though. CMake support is scheduled for 12.5, so we have time.

A few notes to get you started

  • Instructions for building GC-Classic with CMake are here (they're the same)
  • Instructions for building GCHP with CMake are here (they're the same)
  • I wrote a tutorial that introduces people to the cmake command and goes over how to use it. I've been told it takes about 30-45 minutes to complete, and by the end of it, you should feel comfortable using cmake. That tutorial is here.
  • The procedure for building GC-Classic and GCHP is the same (besides GCHP having additional external dependencies)
  • Please let me know if you get any warnings
  • Please stress test it!

If you'd like a bit more help getting started, let me know when you plan to try it out and I'll make sure I'm on Slack.

Note: I'll be away June 7-11 and 17th.

--Liam

@LiamBindle LiamBindle marked this pull request as ready for review June 6, 2019 15:18
@LiamBindle LiamBindle changed the title [WIP] Add support for CMake Add support for CMake Jun 6, 2019
@LiamBindle LiamBindle changed the title Add support for CMake [12.5.0] Add support for CMake Jun 6, 2019
@lizziel
Copy link
Contributor

lizziel commented Jun 6, 2019 via email

@lizziel
Copy link
Contributor

lizziel commented Jun 13, 2019

Hi Liam, given CMake in GCHP will be delayed until after 12.5 pending the GCHP restructuring, we think it best to hold off on CMake in GC Classic to release at the same time. We can still test this now, however, but I want to give you the heads up that the version of release will be a bit later now. This is actually an opportunity since perhaps we could do some simple restructuring in the GEOS-Chem repo at the same time as GCHP.

@LiamBindle
Copy link
Contributor Author

Hi Lizzie,

Sure, that makes sense to me! And yeah, if we could do test-driving now though, that would be really helpful from my end. It's probably a good idea to keep CMake in mind for upcoming structural changes to GC-Classic and GCHP.

@LiamBindle LiamBindle changed the title [12.5.0] Add support for CMake Add support for CMake Jun 13, 2019
@msulprizio
Copy link
Contributor

Hi Liam -- I am starting work on this now, with the goal of including CMake in GEOS-Chem Classic in 12.6.0.

@LiamBindle
Copy link
Contributor Author

Hi Melissa -- sounds good! Let me know if you need help with anything.

@msulprizio
Copy link
Contributor

msulprizio commented Aug 1, 2019

This is now live in dev/12.6.0. I still need to add APM option to CMake.

@msulprizio msulprizio closed this Aug 5, 2019
@LiamBindle LiamBindle closed this Aug 7, 2019
@msulprizio msulprizio added this to the 12.6.0 milestone Sep 5, 2019
@yantosca yantosca added the feature New feature or request label Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants