Rookie HPC

OpenMP exercises

You want to practice your OpenMP skills? This page is made for you. Here is a list of exercises, help yourself and have fun!

Hello worldProducing a hello world is the first exercise in any language / library / framework / API you learn. OpenMP is no exception, so, first things first: a hello world. In OpenMP, it consists in creating a parallel region where each thread prints the world wide known message followed by their thread number and the total number of threads present.
Calculate squares in parallelThis exercise is simple; writing an application that calculates for each array element the square of their index and stores it as the element value. Of course, these calculations must be done in parallel.