Tag: Hello World

  • OpenMP: Hello World!

    by

    in

    Writing your first parallel region in OpenMP is a good starting point. The “Hello Parallel World” program shows how multiple threads run at the same time, each with its own unique identity. This example teaches you how to create threads, identify them, and understand that their order of execution can be unpredictable. Understanding these basics…

  • Introduction to OpenMP

    by

    in

    OpenMP is a tool that helps programmers write faster computer programs using multiple processors at the same time. It works with C, C++, and Fortran languages. With OpenMP, you don’t need to worry about managing threads yourself. The tool makes it easier to write parallel code, which means your program can use many cores of…

  • CUDA: Hello World Kernel

    by

    in

    Our first CUDA kernel helps connect CPU and GPU programming. It runs a simple function using many parallel threads. This is different from normal “Hello World” programs because it shows true parallelism, where hundreds or thousands of threads work at the same time. To understand how this works, you need to know some basics: These…

  • Message Passing Interface (MPI) : Hello World!

    by

    in

    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

    by

    in

    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…