Consider switching CESM to a CMake-based build
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- cmake
- 領域
- build-system
調査の方向性
このissueではCESMのファイル、テスト、エントリポイントが指定されていません。まず既存のmakeベースのビルドを確認し、次にリンクされているE3SM issue 5943とビルドシステムのドキュメントを読んで、提案されている移行を理解してください。完了とするには、CMakeのリファクタリングを行う前に、現在のビルドを再現するための合意済みのスコープと計画が必要です。
索引モデルが issue の本文から書いたものです。
説明
I talked with Jim Foucar about the E3SM experience in migrating to a CMake-based build system. (The recent context is that they're switching to using a ninja-based build as the backend rather than a make-based build, because ninja allows more parallelism. This is something we could consider in CESM as well if we moved to a CMake-based build. But I also wanted to hear some bigger picture thoughts.)
Jim F says that they find huge benefits in E3SM from using a CMake-based build.
Two examples are:
- This simplifies pulling in 3rd party libraries like NetCDF: They can rely on CMake's find_package mechanism rather than needing to set this up explicitly on every system. This simplifies porting to new systems.
- After an initial case.build, you can drop down into a given source code directory and quickly do an incremental rebuild by just running "make" from that directory. This speeds up the incremental rebuild process, and is more similar to how many projects do their build.
He said that those two examples don't do justice to the numerous benefits they find.
However, he also feels that - based on his experience setting this up for E3SM - this would be a large undertaking. He would estimate a few months of effort for someone who isn't intimately familiar with both CMake and CIME. And he notes that the E3SM CMake build is mostly E3SM-specific, so for the most part we'd need to reimplement what he did on the CESM side – this is not just a matter of leveraging things that now exist in CIME.
For E3SM, he did this in a two-step process. The first step was replicating the current make-based system in CMake, with all of its quirks. The actual implementation of this wasn't terrible - maybe something on the order of 1000 lines of code. Verifying that this gave the same results as before took a lot of work - making sure that all targets were built with the same flags. The second, more recent step was refactoring the Cmake to be more in the style of standard CMake - with CMake-native flags (e.g., for compilation flags), managing 3rd party libraries via CMake mechanisms, etc. See https://github.com/E3SM-Project/E3SM/issues/5943 for details on this second step.
See also https://e3sm.atlassian.net/wiki/spaces/DOC/pages/1011942171/E3SM+Build+System+and+CMake for more details on the E3SM CMake build system.
As a side note, Jim F notes that EAMXX allows both a standalone build and a CIME-based build. There is logic in its CMakeLists determining whether it's doing a standalone or CIME-based build, and acts accordingly. Jim finds benefits from the ability to do a standalone build: this makes the build itself significantly simpler in situations where you don't need CIME. However, he notes that, when you actually want to run the model, CIME is required.
- 主要言語
- Python
- スター
- 493
- フォーク
- 253
- 平均マージ
- 34分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ESCOMP/CESM のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
There are no default PE layouts using the tx2_3v3 grid再び着手できるかも @mnlevy1981 が 55 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
-
No default PE layout on derecho for CESM3 development runs with MARBL再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
New Dart tests are failing再び着手できるかも @fischer-ncar が 94 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
似ている issue
-
New Internshipオープンnew_internship
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
get_graph warns that the oneway column is missing when no way has a oneway tag対応中かも @HTenkanen が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cython/cython#8110 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
fix: security 🔐 style: article/section 📝 system: data-mgmt 🗃️ system: security 🔐 system: software 💻
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
uabrc/uabrc.github.io#1267 ·
-
Link Checker ReportオープンBot Type: Bug Type: Documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信