Tag: Hello World

  • Message Passing Interface (MPI) : Hello World!

    In this post, we are going to look at the hello world code for Message Passing Interface (MPI). To compile this code, use following command – To execute this code, run following command – This command creates 4 processes. Each of this process, executes the same “a.out” file. For 4 processes, one will get output…

  • CUDA “Hello World!” : Array addition using single block

    In this post, we are going to look at basic CUDA code. Even though it doesn’t necessarily prints “Hello World!”, being a very simple arithmetic operation, we will treat it as a “Hello World!” code for CUDA. As we are aware that the discrete GPU cards have their own memory, in CUDA we need to…

  • OpenMP C/C++: Hello World!

    This is the first OpenMP program, one can write for understanding the parallelization process using OpenMP. First, let us find out how to compile and execute this code. The ‘-fopenmp’ option here requests compiler to generate parallel threads for the given code using OpenMP. If we do not provide this option, compiler will ignore all…