Skip to content

Latest commit

 

History

History

cuDSS

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

cuDSS Library

Description

This folder demonstrates main cuDSS APIs usage.

Note: samples are updated to work with the latest version of cuDSS available (currently: 1.0.0) and might be incompatible with older versions. For further details, please check the release notes in the official documentation.

cuDSS Documentation

cuDSS Samples

Fortran Samples

Fortran interfaces and examples are available since cudss 1.0.0. The examples provide the same cuDSS workflows in two flavors:

  • Standard Fortran (.f90) under fortran/<name>/ — build with any Fortran compiler that supports C interoperability (set FC, e.g. gfortran, ifx, or nvfortran).
  • CUDA Fortran (.cuf) under nvfortran/<name>/ — requires the NVIDIA HPC compiler nvfortran.

Each sample directory contains the example source, the support modules it uses, and both a CMakeLists.txt and a Makefile. The cuDSS Fortran interface itself is compiled from the installed cuDSS (include/fortran/).

The following <name> samples are available under both fortran/ and nvfortran/:

Building the Fortran samples

Use cuDSS 1.0.0 with its installed include/fortran/ sources and a compatible CUDA Toolkit. Each project builds independently; no precompiled Fortran modules are required.

For standard Fortran, for example:

cmake -S fortran/simple -B build-simple -DCMAKE_Fortran_COMPILER=gfortran -Dcudss_DIR=/path/to/cudss/lib/cmake/cudss
cmake --build build-simple
./build-simple/simple_example

For CUDA Fortran, use nvfortran as the Fortran compiler and nvfortran/simple as the source directory. The standard Fortran and CUDA Fortran trees provide the same workflows listed above.

Alternatively, run make in an individual sample directory, setting FC, CUDSS_INC, CUDSS_LIB, and, for standard Fortran, CUDA_INC and CUDA_LIB. Run the resulting executable directly (for example, ./simple). MPI Fortran module files are compiler-specific; use an MPI installation built with your Fortran compiler. The MGMN sample requires MPI C and Fortran compilers; set MPICC and MPIF90 for Makefile builds, then launch with mpirun -np 2 ./mgmn_mode /path/to/libcudss_commlayer_openmpi.so. For CMake MGMN builds with multiple MPI installations, select matching wrappers with -DMPI_Fortran_COMPILER=/path/to/mpifort and -DMPI_C_COMPILER=/path/to/mpicc. The multithreaded sample needs the threading-layer library as its first argument or through CUDSS_THREADING_LIB. Multi-GPU samples require at least two GPUs, and high-precision samples require compute capability 9.0 or higher.

License and Contributions

The examples are licensed under Apache-2.0; see the per-file license notices and repository license. The Fortran bindings used from the installed cuDSS package are licensed under BSD-3-Clause; see that package's license file. Contributions follow the repository contribution guidelines.