Skip to content

Add CPU devcontainer and fix CMake portability bugs#566

Draft
lukemartinlogan wants to merge 1 commit intomainfrom
devcontainer
Draft

Add CPU devcontainer and fix CMake portability bugs#566
lukemartinlogan wants to merge 1 commit intomainfrom
devcontainer

Conversation

@lukemartinlogan
Copy link
Copy Markdown
Member

Summary

  • Adds a VS Code devcontainer (.devcontainer/cpu/) for local development without Spack, building the mochi stack (argobots 1.2, mercury 2.2.0, mochi-margo 0.13.1, mochi-thallium 0.10.1) from source using standard apt packages for all other deps
  • Follows the iowarp/core devcontainer conventions: cpu/ variant subdirectory, HOST_UID/HOST_GID remapping, shared post-create.sh/post-start.sh lifecycle scripts, SSH key + Claude config mounts, Docker socket, and Claude Code pre-installed
  • Fixes three CMake portability bugs masked by Spack's global prefix path

CMake fixes

File Bug Fix
chrono_common, ChronoPlayer, ChronoGrapher CMakeLists Missing ${HDF5_INCLUDE_DIRS}H5Cpp.h not found outside Spack prefix Added to target_include_directories
ChronoVisor, ChronoKeeper, ChronoGrapher, ChronoPlayer CMakeLists chrono_monitor.cpp compiled directly without spdlog::spdlog link — fmt symbols unresolved when using system libfmt Added find_package(spdlog) + spdlog::spdlog
Client/examples/cpp CMakeLists ${MPI_CXX_LIBRARIES} linked without ${MPI_CXX_INCLUDE_DIRS} Replaced with MPI::MPI_CXX imported target

Test plan

  • Open repo in VS Code → Reopen in Container → selects cpu variant
  • post-create.sh runs, ChronoLog builds to 100% inside the container
  • Docker image builds cleanly: docker build --build-arg HOST_UID=$(id -u) --build-arg HOST_GID=$(id -g) -f .devcontainer/cpu/Dockerfile .
  • Verify no InvalidDefaultArgInFrom linter warning (fixed by ARG BASE_IMAGE=ubuntu:24.04 before FROM)

🤖 Generated with Claude Code

Adds a VS Code devcontainer for local development without Spack.
The devcontainer builds the mochi stack (argobots 1.2, mercury 2.2.0,
mochi-margo 0.13.1, mochi-thallium 0.10.1) from source using standard
apt packages for everything else.

Follows the iowarp/core devcontainer conventions:
- cpu/ subdirectory for future variant support (nvidia-gpu, etc.)
- HOST_UID/HOST_GID build args to avoid bind-mount permission issues
- Shared post-create.sh / post-start.sh lifecycle scripts
- SSH key and Claude config mounts from host
- Docker socket mount + --privileged for Docker-in-Docker
- Claude Code pre-installed
- LD_LIBRARY_PATH set for /usr/local/lib

Also fixes three CMake portability bugs that were masked by Spack's
global prefix path but fail with standard system package layouts:
- chrono_common, ChronoPlayer, ChronoGrapher: missing ${HDF5_INCLUDE_DIRS}
  in target_include_directories (H5Cpp.h not found outside spack prefix)
- ChronoVisor, ChronoKeeper, ChronoGrapher, ChronoPlayer: missing
  find_package(spdlog) + spdlog::spdlog link for targets that compile
  chrono_monitor.cpp directly (fmt symbols unresolved with external libfmt)
- Client/examples/cpp: MPI include dirs missing for distributed telemetry
  writer example; replaced ${MPI_CXX_LIBRARIES} with MPI::MPI_CXX imported
  target which propagates includes automatically

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lukemartinlogan lukemartinlogan marked this pull request as draft April 15, 2026 17:44
@ibrodkin
Copy link
Copy Markdown
Collaborator

Actually chrono_common doesn't need hd5 library, all hdf5 references can be removed from chrono_common CMakeLists

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