Memory space used by cusolverDN_getrf

I solve linear hydrodynamic problems usin cusolver on a gtx 1080 ti . With 11 gb of memory on the card I should be able to solver linear problems with about 36000 unknowns and have done so in the past. Recently I discovered that I could go no further than about 24000 unknowns. After that I get memory errors.
What I found was that the LWORK variable (number of memory locations used by the solver ABOVE the size of the matrix being inverted) was very high (mxn). In the past I had much lower LWORK values. I seem to have updated CUDA and not noticed that the solver is set at its highest performance regarding speed while I need maximum problem size and can accept some speed loss. There seems to be a method using cusolverDnSetAdvOptions to get the solver to minimize memory use. I have not been able to find examples of how that is used . Can somebody show me some Fortran code examples of the application of this option. Thanks a million

From here:

Remark: getrf uses fastest implementation with large workspace of size m*n. The user can choose the legacy implementation with minimal workspace by Getrf and cusolverDnSetAdvOptions(params, CUSOLVERDN_GETRF, CUSOLVER_ALG_1).

You have to use the 64-bit API.

Thank you for your quick reply Robert. I have read that but not being a professional programmer (I am a naval architect solving hydrodynamic problems) this does not get me help me . For instance, what are ‘params’ , where do I get that information . What I need is an example in the form of a few lines of Fortran code which contains relevant declarations and statements showing where the cusolverDnSetAdvOptions statement comes . This is the code as it is now :
nig4 x nig4 : size of matrix G4 of single precision complex numbers

  STATUS = CUSOLVERDNCREATE(HANDLE)

  STATUS = CUSOLVERDNCGETRF_BUFFERSIZE(HANDLE,NIG4,NIG4,
 *  G4,NIG4,LWORK) 
  PRINT *, 'BUFFER SIZE STATUS ', STATUS
  PRINT*,'LWORK',LWORK
  ALLOCATE(WORKSPACE_D(LWORK))

!$ACC DATA CREATE(WORKSPACE_D, DEVIPIV, DEVINFO)
!$ACC HOST_DATA USE_DEVICE(DEVIPIV, WORKSPACE_D, DEVINFO)
STATUS = CUSOLVERDNCGETRF(HANDLE, NIG4, NIG4, G4, NIG4,
* WORKSPACE_D, DEVIPIV, DEVINFO)
STATUS = CUSOLVERDNCGETRS(HANDLE, CUBLAS_OP_N, NIG4,
* NRHS, G4, NIG4, DEVIPIV, RL, NIG4, DEVINFO)
! PRINT*,'CUSOLVERDNCGETRS STATUS = ',STATUS
!$ACC END HOST_DATA
!$ACC END DATA
STATUS = CUSOLVERDNDESTROY(HANDLE)
PRINT*,'CUSOLVERDNDESTROY STATUS = ',STATUS

Elsewhere I have a module containing interfaces for cusolverDnCreate, cusolverDnDestroy, cusolverDnCgetrf_bufferSize, cusolverDnCgetrf, cusolverDnCgetrs and get_dev_mem

This module was put together based on the kind directions of the engineers from PGI. All works fine except for the present problem of the large memory requirement for cusolverDnCgetrf.

Hope this helps,

Regards,

Jo