Author: Mandar Gurav

  • Array Sections and Partial Array Transfers

    Think of downloading music – you don’t download the entire album when you only want one song! Similarly, with array sections, you transfer only the data you need to the GPU, not the whole array. This saves memory and makes your programs faster. Learn Fortran array section syntax, master partial transfers, understand stride notation, and…

  • Data Clauses – Create, Present, Delete

    Imagine you’re cooking in a kitchen. Sometimes you need temporary bowls for mixing ingredients – you don’t bring them from another room, and you don’t take them back when done. You just need them for the cooking process! That’s exactly what CREATE, PRESENT, and DELETE clauses do for GPU memory. Learn how to allocate device…

  • Data Clauses – Copyin, Copyout, Copy with Fortran Arrays

    Think of GPU programming like moving to a new house. You need to pack your stuff (data), move it to the new place (GPU), do your work there, and then decide what to bring back. OpenACC data clauses are like moving instructions! The Three Essential Data Movements COPYIN: “Pack this and take it TO the…

  • Loop Directive with Num_gangs, Num_workers, Vector_length

    What You’ll Learn Today Imagine a construction site where you need to organize workers efficiently. You have teams (gangs), workers within each team, and each worker can handle multiple small tasks (vectors). That’s exactly how GPU parallelism works with OpenACC! The Three-Level Parallelism Hierarchy GPUs organize work in three levels, like a well-structured company: Each…

  • Basic Parallel Loop Directive with DO Loops

    What You’ll Learn Today Think of the !$acc parallel loop directive as a magic wand that transforms your regular Fortran DO loop into a super-fast parallel loop that runs on hundreds of GPU cores simultaneously! The Power of Parallel Loops Imagine you’re organizing a school library: Sequential Way (Regular DO loop): Parallel Way (OpenACC DO…