AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
Aqua::InputOutput::ProblemSetup::sphSettings::device Class Reference

General program settings. More...

#include <ProblemSetup.hpp>

Public Types

enum  _patch { AUTO = 0 , ENABLED = 1 , DISABLED = 2 }
 Possible patch enabling states. More...
typedef enum Aqua::InputOutput::ProblemSetup::sphSettings::device::_patch patch_state
 Possible patch enabling states.

Public Member Functions

 device (const unsigned int platform_index, const unsigned int device_index, const cl_device_type t=CL_DEVICE_TYPE_ALL, const unsigned int bits=32, const std::string compile_flags="")
 Constructor.
 ~device ()
 Destructor.
bool isPatchEnabled (const std::string name) const
 Is the patch enabled?
bool isPatchDisabled (const std::string name) const
 Is the patch disabled?

Data Fields

unsigned int platform_id
 Index of the OpenCL platform to use.
unsigned int device_id
 Index of the OpenCL device to use in the platform platform_id.
cl_device_type device_type
 Type of devices that will be considered in the platform platform_id.
unsigned int addr_bits
 Address bits of the device.
std::string compilation_flags
 Extra flags considered by this device when compiling kernels.
std::map< std::string, int > patches
 List of patchs to be forcibly enabled/disabled.

Detailed Description

General program settings.

These setting are set between the following XML tags:

<Settings>
</Settings>
See also
Aqua::InputOutput::ProblemSetup

Member Typedef Documentation

◆ patch_state

Member Enumeration Documentation

◆ _patch

Possible patch enabling states.

Enumerator
AUTO 

Let AQUAgpusph decide.

ENABLED 

Enabled.

DISABLED 

Disabled.

Constructor & Destructor Documentation

◆ device()

Aqua::InputOutput::ProblemSetup::sphSettings::device::device ( const unsigned int platform_index,
const unsigned int device_index,
const cl_device_type t = CL_DEVICE_TYPE_ALL,
const unsigned int bits = 32,
const std::string compile_flags = "" )
inline

Constructor.

Parameters
platform_indexIndex of the OpenCL platform to use
device_indexIndex of the OpenCL device to use from the platform
tType of OpenCL device
bitsThe address bits of the device. 0 to consider CL_DEVICE_ADDRESS_BITS
See also
https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/clGetDeviceInfo.html

◆ ~device()

Aqua::InputOutput::ProblemSetup::sphSettings::device::~device ( )
inline

Destructor.

Member Function Documentation

◆ isPatchDisabled()

bool Aqua::InputOutput::ProblemSetup::sphSettings::device::isPatchDisabled ( const std::string name) const
inline

Is the patch disabled?

Parameters
patchPatch name
Returns
true if the patch is disabled, false if it is either enabled or automatically decided by AQUAgpusph

◆ isPatchEnabled()

bool Aqua::InputOutput::ProblemSetup::sphSettings::device::isPatchEnabled ( const std::string name) const
inline

Is the patch enabled?

Parameters
patchPatch name
Returns
true if the patch is enabled, false if it is either disabled or automatically decided by AQUAgpusph

Field Documentation

◆ addr_bits

unsigned int Aqua::InputOutput::ProblemSetup::sphSettings::device::addr_bits

Address bits of the device.

If not provided, 32 will be considered, i.e. the CL_DEVICE_ADDRESS_BITS will be queried

This field can be set with the tag Device, for instance: <Device platform="0" device="0" type="GPU" addr_bits="0" />

See also
https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/clGetDeviceInfo.html

◆ compilation_flags

std::string Aqua::InputOutput::ProblemSetup::sphSettings::device::compilation_flags

Extra flags considered by this device when compiling kernels.

By default no compilation flags are considered. Note that AQUAgpusph will allways enable the compilation flag "-cl-kernel-arg-info", since it is a requirement to get it properly working

This field can be set with the tag Device, using the attributes compile_flags. For instance: <Device platform="0" device="0" type="GPU" compile_flags="-g -cl-opt-disable" />

See also
https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/clBuildProgram.html
https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#compiler-options

◆ device_id

unsigned int Aqua::InputOutput::ProblemSetup::sphSettings::device::device_id

Index of the OpenCL device to use in the platform platform_id.

AQUAgpusph is providing the available OpenCL platforms, and the devices into them.

This field can be set with the tag Device, for instance: <Device platform="0" device="0" type="GPU" addr_bits="0" />

Remarks
The index of the device is refered to the available ones compatibles with the selected type device_type.

◆ device_type

cl_device_type Aqua::InputOutput::ProblemSetup::sphSettings::device::device_type

Type of devices that will be considered in the platform platform_id.

This field can be set with the tag Device, for instance: <Device platform="0" device="0" type="GPU" addr_bits="0" />

See also
device_id.

◆ patches

std::map<std::string, int> Aqua::InputOutput::ProblemSetup::sphSettings::device::patches

List of patchs to be forcibly enabled/disabled.

The several patches currently exist:

  • nvidia_#4665567 : NVIDIA CUDA platform bug #4665567. clEnqueueMarkerWithWaitList() does not properly works
  • nvidia_#9999999 : NVIDIA CUDA platform needs a synchronization point when saving files. (probably related with #4665567)

If a patch is not forcibly enabled/disabled, AQUAgpusph will automatically decide whether it is required or not.

This field can be set with the tag Device, using the attributes enable_patch and disable_patch. The patchs are separated by commas. If a patch is found simultaneously on enable_patch and disable_patch attributes, it will be disabled. For instance: <Device platform="0" device="0" type="GPU" enable_patch="nvidia_#4665567" />

See also
https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/clGetDeviceInfo.html

◆ platform_id

unsigned int Aqua::InputOutput::ProblemSetup::sphSettings::device::platform_id

Index of the OpenCL platform to use.

AQUAgpusph is providing the available OpenCL platforms, and the devices into them.

This field can be set with the tag Device, for instance: <Device platform="0" device="0" type="GPU" addr_bits="0" />


The documentation for this class was generated from the following file: