Skip to content

[siesta] 新規パッケージ追加(unsupported) - #190

Open
k-yoshimi wants to merge 2 commits into
developfrom
feat/siesta-app
Open

[siesta] 新規パッケージ追加(unsupported)#190
k-yoshimi wants to merge 2 commits into
developfrom
feat/siesta-app

Conversation

@k-yoshimi

Copy link
Copy Markdown
Collaborator

概要

SIESTA 5.4.2 のインストールパッケージを apps/siesta として追加します。unsupported 扱いです: README(en/ja)冒頭に「MateriApps チームの公式サポート対象外・CI 対象外」と明記し、CI マトリクスには追加していません。

構成

標準のパッケージ契約に準拠(version.sh / download.sh / setup.sh / install.sh / link.sh / runtest.sh / config / test / README)。

  • 取得元: GitLab 公式リリース tarball。バージョンパラメータ化された安定 URL releases/<ver>/downloads/siesta-<ver>.tar.gz を使用(opaque な package_files ID 不要)
  • ビルド: CMake、純 MPI(OpenMP 無効)+ ScaLAPACK。netCDF / libxc / ELSI・ELPA / flook / DFT-D3 / unit tests は無効(README に理由と有効化方法を記載)
  • config/default: 汎用 gcc + OpenMPI。SCALAPACK_LIBRARIES 未指定時は CMake の自動検出に委ねる
  • config/intel: 物性研 ohtaka で動作実績のあるツールチェーン構成(OpenMPI ラッパー越しの ifort/icc + MKL ScaLAPACK)。ifort classic では DFT-D3/unit tests の依存 test-drive がコンパイル不能という既知の落とし穴をコメントで明記し無効化
  • 注意点: SIESTA 5.x は configure 時に内部ライブラリ(libfdf, xmlf90, libpsml, libgridxc)を fetch するため install.sh 実行時にネットワークが必要。pkg-config も必須(README 記載)
  • runtest.sh: 同梱 H2O サンプルを 1 MPI プロセスで実行し Total =End of run を確認

検証(macOS, Homebrew gcc-15 + open-mpi + scalapack で実施)

  • install.shlink.shruntest.sh をエンドツーエンドで実行し Test Passed(82 バイナリ、TBtrans/ユーティリティ含む)
  • H2O 全エネルギー Total = -466.104493 eV が、ISSP ohtaka の Intel ツールチェーンで独立にビルド・検証した値と完全一致
  • 全スクリプト sh -n 通過
  • 既知の非致命的警告: macOS では補助ツール 2 本(psml2psf, psop)のインストール時に install_name_tool の headerpad 警告が出るが、インストールは完走し本体・テストに影響なし

🤖 Generated with Claude Code

SIESTA 5.4.2 from the official GitLab release tarball, built with
CMake: pure MPI, ScaLAPACK, DFT-D3/tests/netCDF/libxc/ELSI/flook
disabled. config/default is a generic gcc/OpenMPI build; config/intel
matches the toolchain verified on ISSP ohtaka (ifort classic behind
OpenMPI wrappers + MKL), where DFTD3/unit tests must stay off because
their test-drive dependency does not compile with ifort classic.
runtest.sh runs the bundled H2O example.

Marked UNSUPPORTED in README/README_ja: not in the CI matrix and not
officially supported by the MateriApps team.

Verified end-to-end on macOS (Homebrew gcc-15/open-mpi/scalapack):
install, link, runtest all pass; the H2O total energy (-466.104493 eV)
matches the value obtained with the Intel toolchain on ohtaka.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- test.sh now asserts the H2O total energy against the reference
  -466.104493 eV within 1e-3 (the value reproduced identically by
  gcc/OpenBLAS on macOS and ifort/MKL on ohtaka); verified to pass on
  a fresh rebuild (serial fallback, MPIEXEC="") and to fail on a
  perturbed value
- preprocess.sh prints a hint when SCALAPACK_LIBRARIES is unset and
  documents that both cmake branches must stay in sync
- READMEs note that offline build hosts are unsupported (configure
  fetches internal libraries); download.sh notes the URL pattern must
  be re-verified on version bumps

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@k-yoshimi

Copy link
Copy Markdown
Collaborator Author

AI review cycle (Codex + Antigravity) 結果

Phase 1 (Codex): must_fix 0 / should_fix 1 / optional 2 → 全て追加コミットで対応:

  • H2O テストに数値検証を追加: 全エネルギーを基準値 -466.104493 eV(gcc/OpenBLAS と ifort/MKL の独立ビルドが同値を再現)と許容差 1e-3 eV で比較。正値で PASS・摂動値(-465.9)で FAIL・エネルギー行欠落でも FAIL することを確認
  • SCALAPACK 2 分岐の cmake 呼び出しにドリフト防止コメント、download.sh にバージョン更新時の URL 確認注記
  • シェル制御フロー(set -e 下の || { }、MPIEXEC_CMD の意図的 word-splitting、MKLROOT ガードと pipefail の相性)は問題なしと確認

Phase 2 (Antigravity):

  • 「Sphinx appendix への README_siesta 登録」の must_fix 指摘は検証の上で不採用: appendix は既存 15 アプリ(CI 対象の physbo/hwave/py2dmat 含む)が未収録・削除済み 5 アプリが残存する陳腐化スナップショットで、登録は維持されている慣習ではない(全体同期 or 廃止の判断を [保守] 古い資材の棚卸し(macos/ports.sh, misc/old/, tools/gcc8・gcc10 等) #185 に記録)。unsupported パッケージを公式マニュアルに載せることも位置づけと矛盾
  • 採用した指摘: SCALAPACK_LIBRARIES 未設定時の案内メッセージ、オフラインビルド非対応の README 明記

最終検証: 修正後の test.sh でクリーン再ビルド → シリアルフォールバック(MPIEXEC="")でも Total energy: -466.104493 eV / Test Passed を確認。

→ 両フェーズ収束。

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.

2 participants