How archembaud/ncku-parallel-gpu works
Project type and purpose
• This is not a single monolithic application but a teaching repository for parallel and GPU computing.
• It contains multiple small C/CUDA/MATLAB/Python examples organized into categories:
• Basic C introduction codes
• OpenMP examples
• CUDA GPU examples
• SIMD vectorization examples (SSE/AVX)
• Mathematics & engineering algorithms (MATLAB)
• Tutorials & case-study code (e.g., 3D heat transfer)
File structure
• Top-level files: README.md, ALGORITHMS.md, *_README.md for each tech.
• Category directories named “0_Simple_Hello_World” through “9_OMP_…”, “A_…”, “E_…”, “G_…”, “Tutorials/…”.
• Each example has its own makefile and source files (.c/.cu/.m/.py).
• Build artifacts are produced by make (gcc or nvcc); results are CSV or plots.
• No centralized server or database—focus is local compile/run workflow.
README for additional insights
• The README describes how to cd into each folder, use make, run executables, inspect with valgrind, objdump, matplotlib, or MATLAB.
• External toolchain: Linux, gcc, nvcc, OpenMP, Python/matplotlib, MATLAB, VS Code with SSH.
a. Main components
• Developer environment (local/remote Linux machine, VS Code, scp)
• Source repository (categories of code examples)
• Build system (Makefiles invoking gcc or nvcc)
• Execution environments:
• CPU runtime (compiled C/OpenMP binaries)
• GPU runtime (CUDA binaries on NVIDIA GPU)
• MATLAB runtime for algorithms (.m files)
• Python runtime for plotting (plot_results.py)
• Artifacts: compiled executables, object files, results.csv, plots
b. Relationships & interactions
• Developer edits code in VS Code (ssh) → pushes to local repo
• make invokes toolchain → compiles sources → links into executables
• Executables run on CPU or dispatch kernels to GPU via CUDA/OpenMP
• Data produced (CSV, console output) flows into Python/MATLAB for visualization
c. Architectural patterns & design principles
• Modular folder-per-example structure for isolation and clarity
• Use of Makefile abstraction to standardize build/test/clean workflows
• Separation of concerns: compute kernels vs. I/O vs. visualization
• Hierarchical grouping by technology and complexity
d. Key technologies/frameworks
• C with gcc
• OpenMP pragma directives
• CUDA (nvcc compiler, .cu/.h for GPU kernels)
• SIMD intrinsics (SSE/AVX)
• MATLAB scripts for algorithms
• Python + matplotlib for plotting
• Makefiles as build orchestrators