/cuda_demo

Fortran and CUDA interfacing with ISO_C_BINDING

Primary LanguageFortranMIT LicenseMIT

CUDA Fortran Minimal Working Example

This repository contains a minimal working example (MWE) demonstrating how to use CUDA with Fortran using the ISO_C_BINDING module. The project uses CMake as the build system.

Prerequisites

  • CMake 3.8 or higher
  • GNU compilers (gfortran, g++)
  • CUDA
  • BLAS/LAPACK

Building the project

  1. Clone the repository:
git clone https://github.com/Panadestein/cuda_demo.git
cd cuda_demo
  1. Create a build directory and navigate to it:
mkdir build
cd build
  1. Configure the project using CMake and compile:
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j

Note: the default build type is Debug.

Contributing

Feel free to open an issue or submit a pull request if you have any suggestions, improvements, or bug fixes.