Skip to main content

cuestDFMOIntegralsComputeWorkspaceQuery

Function cuestDFMOIntegralsComputeWorkspaceQuery 

Source
pub unsafe fn cuestDFMOIntegralsComputeWorkspaceQuery(
    handle: cuestHandle_t,
    plan: cuestDFIntPlan_t,
    parameters: cuestDFMOIntegralsComputeParameters_t,
    variableBufferSize: *const cuestWorkspaceDescriptor_t,
    temporaryWorkspaceDescriptor: *mut cuestWorkspaceDescriptor_t,
    numCoefficientMatrices: u64,
    numLeftOrbitals: *const u64,
    numRightOrbitals: *const u64,
    leftCoefficientMatrices: *const f64,
    rightCoefficientMatrices: *const f64,
    outTensors: *mut f64,
) -> cuestStatus_t
Expand description

@brief Query the temporary workspace required to transform the 3-index density fitting tensor from the AO basis to the MO basis. @ingroup DFMOIntegrals @since v0.2.0

This function determines the workspace required to perform an AO to MO transform of the DF 3-index tensor with the given plan, coefficient matrices, and maximum workspace constraint. The output descriptor is filled on success and can be used to allocate host and device workspace buffers prior to calling \c cuestDFMOIntegralsCompute.

Some input pointers (\c coefficientMatrices and \c outTensors) are optional and may be NULL.

@param[in] handle cuEST handle. Must not be NULL. @param[in] plan DF integral computation plan (opaque handle). Must not be NULL. @param[in] parameters Compute parameters (\c cuestDFMOIntegralsComputeParameters_t). Must not be NULL @param[in] variableBufferSize The variableBufferSize determines the size of an internal scratch buffer used for certain transformations. A buffer of 2GB is a reasonable default value. Host memory is currently unused. Note that the variableBufferSize does not limit total memory usage. The value of the variableBufferSize must not change between WorkspaceQuery and Compute calls. @param[out] temporaryWorkspaceDescriptor Output descriptor for required temporary workspace sizes (host and device). Must not be NULL. @param[in] numCoefficientMatrices Number of pairs of coefficient matrices. Must be > 0. @param[in] numLeftOrbitals Array of molecular orbital counts for each left coefficient matrix (size: \c numCoefficientMatrices) on CPU. Each entry must be > 0. Must not be NULL. @param[in] numRightOrbitals Array of molecular orbital counts for each right coefficient matrix (size: \c numCoefficientMatrices) on CPU. Each entry must be > 0. Must not be NULL. @param leftCoefficientMatrices Concatenated left coefficient matrices. Each matrix has shape [\c numLeftOrbitals[i], nao] on GPU. Total size: sum(\c numLeftOrbitals[i]) × nao. May be NULL. @param rightCoefficientMatrices Concatenated right coefficient matrices. Each matrix has shape [\c numRightOrbitals[i], nao] on GPU. Total size: sum(\c numRightOrbitals[i]) × nao. May be NULL. @param outTensors Output concatenated MO integral tensors. Each tensor has shape [naux, \c numLeftOrbitals[i], \c numRightOrbitals[i]] on GPU. Total size: naux × sum(\c numRightOrbitals[i] × \c numLeftOrbitals[i]). May be NULL.

@return

  • \c CUEST_STATUS_SUCCESS on success;
  • \c CUEST_STATUS_INVALID_HANDLE if the cuEST handle is NULL;
  • \c CUEST_STATUS_NULL_POINTER if any required pointer is NULL;
  • \c CUEST_STATUS_INVALID_TYPE if opaque handles are not the correct type;
  • \c CUEST_STATUS_INVALID_PLAN if the \c cuestDFIntPlan_t is not correctly configured or in a dirty state;
  • \c CUEST_STATUS_INVALID_ARGUMENT if \c numCoefficientMatrices == 0, or any \c numLeftOrbitals[i] == 0, or any \c numRightOrbitals[i] == 0;
  • \c CUEST_STATUS_EXCEPTION or \c CUEST_STATUS_UNKNOWN_ERROR otherwise.