Add the AGENTS.md - #2092
Conversation
|
Might be interesting to look at mom-ocean/MOM6#1699 In that @adcroft made a sort of symlink or reference nest of various markdown files to support a few different agents ( This might not be needed anymore? |
climbfuji
left a comment
There was a problem hiding this comment.
A few minor comments and corrections, other than that I am fine with merging this and making incremental changes as we go.
| - Never `module load` the vendor toolchain in the shell running `spack install`: | ||
| an already-loaded module reads as a *failed* load — `ModuleLoadError` for a | ||
| module that loads fine by hand. `module use` the directory, purge, let spack | ||
| load. | ||
| - No module may appear in two externals' `modules:` lists in one DAG; the second | ||
| load is a no-op and errors. Each list must also be self-sufficient and in | ||
| prereq order, since spack loads externals in DAG order. When those two collide, | ||
| drop `modules:` from the dependent external and rely on `prefix:` — many vendor | ||
| packages (e.g. intel-oneapi-mkl) self-configure. | ||
| - It fails *late* and blames the wrong thing (concretize never loads modules). | ||
| Probe cheaply: `spack build-env <mpi-using-spec> -- true`. |
There was a problem hiding this comment.
This is no longer true thanks to the bug fix from @mathomp4 that we merged into spack (the submodule spack) recently.
| the config for its *variants*, not its version. Scope them: `- spec: ~crypt` + | ||
| `when: '@:3.12'`. | ||
|
|
||
| **4. Every external needs `prefix:`** (and `buildable: false`). Spack silently |
There was a problem hiding this comment.
You don't need prefix if you have modules, I think
| `setup_build_environment`, external `modules:`, all of it) without building: | ||
| `-- bash` for a shell in it, `-- bash -c 'echo $CFLAGS'` to check a flag reached | ||
| the build, `-- true` to test whether it assembles at all (the cheap module-trap | ||
| probe). Highest-value, most underused command in spack. |
There was a problem hiding this comment.
The command to use is
spack build-env <spec> -- bash --norc --noprofile
which is what Spack uses when it runs spack install.
|
|
||
| | Symptom | Likely cause | | ||
| |---|---| | ||
| | `ModuleLoadError` but it loads by hand | preloaded module, or two externals list it (§5.1) | |
Add an AGENTS.md file. This file sets ground rules for how agents interact with spack-stack and gives documentation pointers and agent-specific instructions.
This file was primarily generated by claude using notes from a long-running install and debug session.
Motivations
concretizeandinstall