Modernize codebase to C++17/CUDA standards with CMake build system and CI#1
Conversation
- Add root CMakeLists.txt with CUDA detection and OpenMP support - Create CMakeLists.txt for all four applications - Modernize Makefiles with C++17, improved flags, and modern CUDA architectures - Update .gitignore for build artifacts and IDE files - Expand README with comprehensive documentation - Build instructions for both CMake and Make - Detailed application descriptions - Performance tips and troubleshooting - Code structure documentation Co-authored-by: schiedung <3582229+schiedung@users.noreply.github.com>
- Update kobayashi-gpu code to modern C++17/CUDA standards - Fix spurious URL comment in code - Use modern CUDA memory allocation patterns - Improve error checking with cudaGetLastError - Use cerr for error messages - Add const correctness for string parameters - Clean up commented code - Update wrapper.h header - Add inline to device functions - Improve formatting and consistency - Use proper header guards - Remove commented-out code - Update vtk.h header - Add error checking for file operations - Improve formatting - Use const string references - Add proper header guards - Update kobayashi-cpu code - Replace sys/time.h with chrono for modern C++ timing - Use string instead of string.h - Add const correctness - Improve floating point literal formatting - Better error handling in file I/O Co-authored-by: schiedung <3582229+schiedung@users.noreply.github.com>
- Update physical-cpu code to modern C++17 standards - Replace sys/time.h with chrono for timing - Use string instead of string.h - Add const correctness to function parameters - Improve WriteToFile with error checking - Better formatting and consistency - Update physical-gpu code to modern C++17/CUDA standards - Replace sys/time.h with chrono for timing - Modernize CUDA memory allocation patterns - Add comprehensive error checking - Use cerr for error messages - Improve const correctness - Clean up WriteToFile function - Add device synchronization for timing accuracy Co-authored-by: schiedung <3582229+schiedung@users.noreply.github.com>
- Add cstring header to kobayashi-cpu and physical-cpu - Required for memset function in C++17 builds - Resolves compilation errors with modern compilers Co-authored-by: schiedung <3582229+schiedung@users.noreply.github.com>
- Fix GPU Makefiles to properly use HOST_COMPILER variable - Add -ccbin flag to nvcc to explicitly specify host compiler - Improves consistency and allows better control over compilation Co-authored-by: schiedung <3582229+schiedung@users.noreply.github.com>
Co-authored-by: schiedung <3582229+schiedung@users.noreply.github.com>
|
@copilot Is it possible to automatically test the gpu cuda build ? |
- Enhanced CPU CI workflow with CMake and Make builds - Added CUDA GPU CI workflow for build verification - CUDA workflow compiles GPU code using CUDA toolkit - Added runtime testing capabilities (requires GPU runner) - Documented CI/CD setup in README - Both workflows run on push and pull requests - Includes instructions for enabling GPU runtime tests with self-hosted runners Co-authored-by: schiedung <3582229+schiedung@users.noreply.github.com>
Yes! I've added automated GPU CUDA build testing in commit ef1c4e1. What's included:
Current capabilities:
For runtime GPU testing:
See the README "Continuous Integration" section for details. |
|
@copilot Run Jimver/cuda-toolkit@v0.2.14 Error: Error: The process '/usr/bin/wget' failed with exit code 8 I do not have a cuda runner, please remove them again |
- Removed .github/workflows/cuda.yml (caused 404 errors without CUDA runner) - Simplified cpp.yml to only build CPU applications with Make - Updated README to remove GPU CI documentation - CI now only tests CPU builds which work on standard GitHub runners Co-authored-by: schiedung <3582229+schiedung@users.noreply.github.com>
Removed the CUDA CI workflow in commit e8aaa26. Changes made:
The CI now only runs CPU builds which work on standard GitHub runners without requiring CUDA toolkit installation. |
Legacy 2015 codebase updated from C++11 to C++17 standards, added modern CMake build system, replaced outdated NVIDIA Makefile templates with clean implementations, and added automated CI for CPU builds.
Build System
CMake: Added complete build system with CUDA detection, OpenMP linking, and per-app configurations. Root CMakeLists.txt provides unified builds; individual apps maintain independence.
Makefiles: Replaced 250-line 2015 NVIDIA templates with 50-line modern implementations. Updated CUDA architectures from SM 20-52 to SM 70-89 (Volta→Ada Lovelace). Added host compiler specification via
-ccbin.Code Modernization
C++ Standards:
CUDA Improvements:
(void**)casts, added error checkingcudaPeekAtLastError()withcudaGetLastError(), added synchronization pointsconst string&where appropriateDocumentation
Expanded README from 8 to 250+ lines covering build instructions (CMake + Make), requirements, application details, performance tips, troubleshooting, and CI setup.
Continuous Integration
CPU CI Pipeline (
.github/workflows/cpp.yml):Files Changed
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.