GithubHelp home page GithubHelp logo

dmr's Introduction

DMR

DMR, fortran library for C/C++ OpenMP* Device Memory Routines

  • DMR is a Fortran library for mimicking OpenMP device memory routines in Fortran
  • DMR is Fortran 2008 standard compliant;

Table of Contents

What is DMR?

OpenMP API version 4.5 introduced device memory routines, that support allocation of memory and pointers management in the data environment of target devices: these routines only support C/C++ languages, while the Fortran support is still missing also in the latest OpenMP API (version 5.0). DMR introduces Fortran support to OpenMP device memory routines.

What are OpenMP Device Memory Routines?

From OpenMP API version 4.51 is possible to directly manage device memory environment from C and C++ languages. In particular, is possible to allocate, deallocate device pointers and to move data between host and device using pointers. There's no support for Fortran language, but from Fortran Standard 2003 is possible to easily mixing Fortran and C.

Using C functions, Fortran interfaces to these functions and Fortran routines, DMR provides the capability to allocate, deallocate Fortran pointers on a device and to transfer data to and from a Fortran pointer allocated on the device to an host target.

Cited references

[1] OpenMP API version 4.5, OpenMP Architecture Review Board, 2015, https://www.openmp.org/wp-content/uploads/openmp-4.5.pdf

Go to Top

Main features

DMR is aimed to be a Fortran library for managing OpenMP allocation of memory and pointers in the data environment of target device:

  • KISS and user-friendly:
    • simple API;
    • easy building and porting on heterogeneous architectures;
  • comprehensive:
    • pointers allocation;
    • pointers deallocation;
    • pointers data transfer between host and device;
    • pointers association;
    • pointers deassociation;
  • well documented:
    • clear documentation of OpenMP API implemented;
    • complete API reference;

Any feature request is welcome.

Go to Top

Status

DMR provides the following Fortran routines:

  • pointer presence check on device (omp_target_is_present --> omp_target_is_present_f)
  • pointer allocation on device (omp_target_alloc --> omp_target_alloc_f)
  • pointer deallocation from device (omp_target_free --> omp_target_free_f)
  • pointer already mapped on the device (omp_get_mapped_ptr --> omp_get_mapped_ptr_f)2
  • data synchronization between host and device (omp_target_memcpy --> omp_target_memcpy_f)
  • rectangular data transfer (omp_target_memcpy_rect --> omp_target_memcpy_rect_f)
  • device pointer mapping with host pointer (omp_target_associate_ptr --> omp_target_associate_ptr_f)
  • device pointer association removing from host pointer (omp_target_disassociate_ptr --> omp_targetdis_associate_ptr_f)

Go to Top

DMR for the Impatient

DMR can be compiled using cmake. Cmake still not supports OpenMP offload, so in order to compile the library with Intel compiler and default options, use the commands:

mkdir build
cd build
cmake -DCMAKE_Fortran_COMPILER=ifx ..
make VERBOSE=1

DMR can also be compiled using FoBiS: fobos file is provided.

Finally, DMR can be compiled using the provided makefile, compatible with GNU gfortran, IBM XLF and Intel ifx compilers.

In order to compile the library, use the following command:

make compiler=1 debug=1

Where compiler can be one of the following: gnu, ibm, intel.

Go to Top

Copyrights

© 2020 Giacomo Rossi, Intel Corporation

Anyone is interest to use, to develop or to contribute to DMR is welcome!

Go to Top

dmr's People

Contributors

giacrossi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.