mem_device_total_bytes Function

public function mem_device_total_bytes() result(bytes)

Total memory of the device that the OpenACC runtime is bound to, in bytes. Returns -1 when no OpenACC runtime is present (CPU / gfortran / ifx builds).

Arguments

None

Return Value integer(kind=int64)


Called by

proc~~mem_device_total_bytes~~CalledByGraph proc~mem_device_total_bytes mem_device_total_bytes proc~mem_device_used_bytes mem_device_used_bytes proc~mem_device_used_bytes->proc~mem_device_total_bytes proc~mem_log_device_actuals mem_log_device_actuals proc~mem_log_device_actuals->proc~mem_device_total_bytes proc~mem_log_state_budget mem_log_state_budget proc~mem_log_state_budget->proc~mem_device_total_bytes proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~mem_log_device_actuals proc~driver_run_ocean->proc~mem_log_state_budget proc~mem_log_device_growth mem_log_device_growth proc~driver_run_ocean->proc~mem_log_device_growth proc~mem_log_device_growth->proc~mem_device_used_bytes proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Source Code

   function mem_device_total_bytes() result(bytes)
      !! Total memory of the device that the OpenACC runtime is bound to,
      !! in bytes.  Returns `-1` when no OpenACC runtime is present
      !! (CPU / gfortran / ifx builds).
      integer(int64) :: bytes
#ifdef RDB_HAS_OPENACC_RUNTIME
      integer(c_size_t) :: prop
      prop = acc_get_property(acc_get_device_num(acc_get_device_type()), &
                              acc_get_device_type(), acc_property_memory)
      bytes = int(prop, int64)
#else
      bytes = -1_int64
#endif
   end function mem_device_total_bytes