Files
lammps/lib/gpu/geryon
Ben Menadue 294a1c2168 Use primary context in CUDA GPU code.
Since LAMMPS uses the low-level driver API of CUDA, it needs to ensure
that it is in the correct context when invoking such functions. At the
moment it creates and switches to its own context inside `UCL_Device::set`
but then assumes that the driver is still in that context for subsequent
calls into CUDA; if another part of the program uses a different context
(such as the CUDA runtime using the "primary" context) this will cause
failures inside LAMMPS.

This patch changes the context creation to instead use the primary
context for the requested device. While it's not perfect, in that it
still doesn't ensure that it's in the correct context before making
driver API calls, it at least allows it to work with libraries that use
the runtime API.
2022-09-06 09:28:51 +10:00
..
2020-01-28 20:35:08 +03:00
2020-01-28 20:35:08 +03:00
2022-02-17 23:13:13 -05:00
2022-02-17 23:13:13 -05:00
2021-09-17 22:45:26 -04:00
2021-08-26 06:30:16 -04:00
2022-04-10 20:47:42 -04:00
2021-08-31 15:11:46 -04:00

NOTE: This Geryon distribution has been modified to remove files not
      necessary for the LAMMPS implementation. The full distribution
      is available at http://users.nccs.gov/~wb8/geryon/index.htm

Geryon

   Copyright (2010) Sandia Corporation.  Under the terms of Contract
   DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
   certain rights in this software.  This software is distributed under
   the Simplified BSD License.

Geryon is intended to be a simple library for managing the CUDA Runtime,
CUDA Driver, and OpenCL APIs with a consistent interface:

    * Change from one API to another by simply changing the namespace
    * Use multiple APIs in the same code
    * Lightweight (only include files - no build required)
    * Manage device query and selection
    * Simple vector and matrix containers
    * Simple routines for data copy and type casting
    * Simple routines for data I/O
    * Simple classes for managing device timing
    * Simple classes for managing kernel compilation and execution

Geryon does not require building (although a Makefile is provided for testing
purposes). The library is a set of header files that can be included with
your code.

Documentation and examples are provided at

http://users.nccs.gov/~wb8/geryon/index.htm