Skip to content

Latest commit

 

History

History
127 lines (95 loc) · 4 KB

DLA-Future-Fortran.md

File metadata and controls

127 lines (95 loc) · 4 KB
project summary project_github project_download print_creation_date output_dir media_dir doc_license
DLA-Future-Fortran
Fortran interface for DLA-Future
true
doc-ford
docs
bsd

DLA-Future-Fortran is a Fortran interface for DLA-Future, a task-based linear algebra library providing GPU-enabled distributed eigensolver. DLA-Future is based on the pika library for concurrency and parallelism, and supports both Nvidia and AMD GPUs.

Usage

Initialization and finalization

Before calling any DLA-Future routine, the library (and the underlying pika runtime) need to be initialized:

call dlaf_initialize()

DLA-Future should be finalized when it is no longer needed:

call dlaf_finalize()

Grid initialization

DLA-Future needs to know how a matrix is distributed. A DLA-Future grid can be created directly on top of a BLACS grid, using the corresponding BLACS context:

! blacs_context is an existing BLACS context
call dlaf_create_grid_from_blacs(blacs_context)

When a grid is no longer needed, it can be freed:

! blacs_context is an existing BLACS context
call dlaf_free_grid(blacs_context)

ScaLAPACK drop-in

DLA-Future-Fortran can be used as a ScaLAPACK drop-in. DLA-Future takes a subset of ScaLAPACK arguments. For example, workspaces are managed internally in DLA-Future.

Example: Hermitian generalized eigensolver

The following is an example of how a code using ScaLAPACK's hermitian generalized eigensolver can be adapted to use DLA-Future instead:

 call mpi_init_thread(...)
+call dlaf_initialize()
 call blacs_get(0, 0, blacs_context)
 call blacs_gridinit(blacs_context, ...)
+call dlaf_create_grid_from_blacs(blacs_context)

 ! ...

-! Workspaces setup (work, rwork, iwork)

-call pzheevd('V', 'L', n, a, 1, 1, desca, w, z, 1, 1, descz, work, lwork, rwork, lrwork, iwork, liwork, info)
+call call dlaf_pzheevd('L', n, a, 1, 1, desca, w, z, 1, 1, descz, info)

-! Workspaces cleanup (work, rwork, iwork)
 
 ! ...

+call dlaf_free_grid(blacs_context)
 call blacs_gridexit(blacs_context)
+call dlaf_finalize()
 call mpi_finalize(...)

Citation

DLA-Future Conference Paper

If you are using DLA-Future-Fortran, please cite the following conference paper in addition to the DLA-Future-Fortran and the DLA-Future repositories:

@InProceedings{10.1007/978-3-031-61763-8_13,
    author="Solc{\`a}, Raffaele
        and Simberg, Mikael
        and Meli, Rocco
        and Invernizzi, Alberto
        and Reverdell, Auriane
        and Biddiscombe, John",
    editor="Diehl, Patrick
        and Schuchart, Joseph
        and Valero-Lara, Pedro
        and Bosilca, George",
    title="DLA-Future: A Task-Based Linear Algebra Library Which Provides a GPU-Enabled Distributed Eigensolver",
    booktitle="Asynchronous Many-Task Systems and Applications",
    year="2024",
    publisher="Springer Nature Switzerland",
    address="Cham",
    pages="135--141",
    isbn="978-3-031-61763-8"
}

Acknowledgements

The development of DLA-Future-Fortran is supported by the following organizations:

  • CSCS: Swiss National Supercomputing Center
  • ETH Zurich: Swiss Federal Institute of Technology Zurich
  • PASC: Platform for Advanced Scientific Computing

CSCS{: style="text-align: center" height=75} ETHZ{: style="text-align: center" height=75} PASC{: style="text-align: center" height=75}