Tag: Beginner

  • CUDA : Introduction

    by

    in

    CUDA (Compute Unified Device Architecture) is NVIDIA’s parallel computing platform that allows scientists and engineers to use GPUs for general-purpose computing. GPUs were built to handle graphics, but CUDA helps them do other types of work too. With CUDA, thousands of cores in a GPU can be used for things like scientific simulations and data…

  • Multi-dimensional Arrays in OpenACC

    Think of multi-dimensional arrays like a bookshelf – in Fortran, books are arranged column by column (column-major), while in C they’re arranged row by row (row-major). Understanding this layout is crucial for GPU performance because accessing data in the wrong order is like reaching across the entire bookshelf instead of taking books from the same…

  • Working with Allocatable Arrays

    Think of allocatable arrays like expandable luggage – you don’t know the exact size you’ll need until runtime, so you adjust the size dynamically. In scientific computing, problem sizes often depend on user input, file data, or computational requirements determined at runtime. Learn dynamic memory with OpenACC, master ALLOCATE/DEALLOCATE patterns, understand variable-sized problems, and see…

  • Data Regions with Fortran Arrays

    Think of data regions like setting up a temporary office space. Instead of carrying your laptop back and forth for every small task, you set up once, do multiple tasks, then pack up at the end. That’s exactly what OpenACC data regions do for your arrays! The Power of Persistent Data Without Data Regions (inefficient):…

  • 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…