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
Conversation
…ntions feature/cmake-gchp
…are basic compiler options, and the rundir getter
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
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 |
Thanks Liam. I am going to try this out with GCHP today.
…--
Lizzie Lundgren
Senior Scientific Programmer
GEOS-Chem Support Team
geos-chem-support@g.harvard.edu<mailto:geos-chem-support@g.harvard.edu>
http://wiki.geos-chem.org/GEOS-Chem_Support_Team
Please direct all GEOS-Chem support issues to the entire GEOS-Chem Support Team
at geos-chem-support@g.harvard.edu<mailto:geos-chem-support@g.harvard.edu>. This will allow us to serve you better.
From: Liam Bindle <notifications@github.com>
Reply-To: geoschem/geos-chem <reply@reply.github.com>
Date: Thursday, June 6, 2019 at 11:17 AM
To: geoschem/geos-chem <geos-chem@noreply.github.com>
Cc: "Lundgren, Elizabeth W" <elundgren@seas.harvard.edu>, Comment <comment@noreply.github.com>
Subject: Re: [geoschem/geos-chem] [WIP] Add support for CMake (#35)
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<https://urldefense.proofpoint.com/v2/url?u=http-3A__fizz.phys.dal.ca_-7Eatmos_wiki_index.php_Building-5FGEOS-2DChem-5FClassic-5Fwith-5FCMake-5F-28draft-29&d=DwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=xyVOGV-4mAPz62S8RZON4khwZesGKcGg2_BHL4y5NjQ&m=0KaHmC2qhYItkqvRxEkVm2rq-XtB8uK2J4h3l5Cp3ZU&s=fvmx48A4lKv6na8GMGXcM2jfjFZGl3f_mZ2iujv0w_c&e=>
* Instructions for building GCHP with CMake are here<https://urldefense.proofpoint.com/v2/url?u=http-3A__fizz.phys.dal.ca_-7Eatmos_wiki_index.php_Building-5FGCHP-5Fwith-5FCMake-5F-28draft-29&d=DwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=xyVOGV-4mAPz62S8RZON4khwZesGKcGg2_BHL4y5NjQ&m=0KaHmC2qhYItkqvRxEkVm2rq-XtB8uK2J4h3l5Cp3ZU&s=tqt1lRhdgKxxk5scthhxcMun54ss_w0joMpDx4qSs5Q&e=>
* 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<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_LiamBindle_An-2DIntroduction-2Dto-2DUsing-2DCMake_wiki&d=DwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=xyVOGV-4mAPz62S8RZON4khwZesGKcGg2_BHL4y5NjQ&m=0KaHmC2qhYItkqvRxEkVm2rq-XtB8uK2J4h3l5Cp3ZU&s=qU3je41e-40K1L9PwoAWOw8rw3-HnMrwbqr8YB4czSk&e=>.
* CMake should work out of the box with your current GEOS-Chem environment. If you do this you can skip the "Setting things up" part of the instructions (i.e. start here<https://urldefense.proofpoint.com/v2/url?u=http-3A__fizz.phys.dal.ca_-7Eatmos_wiki_index.php_Building-5FGEOS-2DChem-5FClassic-5Fwith-5FCMake-5F-28draft-29-23Getting-5FGEOS-2DChem-5FClassic.27s-5Fsource-5Fcode&d=DwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=xyVOGV-4mAPz62S8RZON4khwZesGKcGg2_BHL4y5NjQ&m=0KaHmC2qhYItkqvRxEkVm2rq-XtB8uK2J4h3l5Cp3ZU&s=zA3GsRqEhmJaAh_ngioDCTmM0I25z57kMj6cWBTuwvw&e=>).
* The procedure for building GC-Classic and GCHP is the same (besides GCHP having additional external dependencies)
* You shouldn't be able to get compiler errors, even if you try. Any problems should be identified by cmake during the build configuration stage, and you should be able to resolve them with another cmake command.
* 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.
--Liam
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_geoschem_geos-2Dchem_pull_35-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAAE7FK6RTYNZE7WTGI3O4ITPZETAHA5CNFSM4HJGARQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXDF44A-23issuecomment-2D499539568&d=DwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=xyVOGV-4mAPz62S8RZON4khwZesGKcGg2_BHL4y5NjQ&m=0KaHmC2qhYItkqvRxEkVm2rq-XtB8uK2J4h3l5Cp3ZU&s=K-YRpZYfACoh6grA9xDbp2kj_rsW3mz6kUEOCB_59W0&e=>, or mute the thread<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAE7FK2WYRBSCZY42WF3UA3PZETAHANCNFSM4HJGARQA&d=DwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=xyVOGV-4mAPz62S8RZON4khwZesGKcGg2_BHL4y5NjQ&m=0KaHmC2qhYItkqvRxEkVm2rq-XtB8uK2J4h3l5Cp3ZU&s=s7x1r_BaQk_TiJE0kjnssuOmUYHlVexTTnaTgHJZsBc&e=>.
|
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. |
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. |
Hi Liam -- I am starting work on this now, with the goal of including CMake in GEOS-Chem Classic in 12.6.0. |
Hi Melissa -- sounds good! Let me know if you need help with anything. |
This is now live in dev/12.6.0. I still need to add APM option to CMake. |
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 #23PR #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.
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