How nci900-training-organisation/intro-to-openmp works
• Documentation & Visual Aids:
– README.md (project overview, explanation of OpenMP’s role in shared memory systems, explanations of parallel programming constructs)
– Applications folder (contains tutorial guides on specific applications such as π calculation, Mandelbrot fractal generation, and Cholesky factorization)
• Source Code & Exercises:
– The src directory hosts a range of C programs and one Python plotting script. Each file demonstrates a distinct OpenMP feature (e.g., openmp_parallel_region.c, openmp_reduction.c, openmp_tasks.c, etc.) and exercises that include race condition handling, false sharing issues, schedulling, and task-based computations.
– The Makefile in src is the build system for compiling these multiple modules.
• Execution & Deployment (Scripts):
– The scripts directory includes shell scripts (interactive.sh, job.sh, modules.sh) that might be used for job submission, module loading, and launching interactive sessions. These scripts support the run-time environment and could interface with cluster management or local execution.
• Development Environment:
– The .vscode folder hints at configured IDE settings for development.
Out Relationships and Data Flow
• Components in separate layers or modules. For example, create a “Documentation/Instruction” layer that feeds into an “Educational/Example Applications” layer that is built from the source code.
• Connection between the build system (Makefile) and the source-generated binaries. Then show that the scripts are responsible for running these binaries and setting environment variables (e.g., OMP_NUM_THREADS and OMP_DYNAMIC), which are critical to the OpenMP parallel execution model.
OpenMP Architectural Patterns
– Fork-Join Model: Represent the master thread forking into worker threads on encountering a parallel region.
– Worksharing Constructs: Show how loops are partitioned between threads (e.g. using #pragma omp for) and emphasize differences such as static vs. dynamic scheduling.
– Data Sharing & Synchronization: Indicate how constructs like “atomic”, “critical,” “barrier,” “nowait” are used to manage race conditions and synchronizations.
Technologies & Libraries
• That the projects rely on the OpenMP API for parallelization.
• Components where PAPI (Performance Application Programming Interface) is used to monitor performance—specifically in the file papi.c.
• If necessary, denote the use of standard C libraries for parallel programming with OpenMP directives, and note that one file is in Python (Mandelbrot-plot.py) which likely is used for visualization of computed data.
Final Assembly
• Branch out into the layers: Documentation (with README and figs) on one side, then into the Code Implementation (with src exercises, Makefile) and then into the Execution/Deployment (with scripts).
• Use annotated callouts to indicate where educational and technical content converge—such as in the sample applications (π calculation, Mandelbrot, Cholesky factorization) which are demonstrated both in the applications documentation and realized through the corresponding source files.
• Annotations for external tools (like lstopo for system architecture visualization and OMP environment variables) to tie the hands-on experiments with underlying hardware concepts.