hashcat Forum
CL_DEVICE_NOT_AVAILABLE on GCP Xeon CPU - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Support (https://hashcat.net/forum/forum-3.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-45.html)
+--- Thread: CL_DEVICE_NOT_AVAILABLE on GCP Xeon CPU (/thread-10846.html)



CL_DEVICE_NOT_AVAILABLE on GCP Xeon CPU - albert4 - 06-22-2022

Linux newbie here - could you kindly guide me to make hashcat works on GCP e2 instance (2 vCPU, no GPU, OS Debian) - which package should I install ? (i know it will be slow without GPU).
OpenCL seems to be already installed.
Considering error "clCreateContext(): CL_DEVICE_NOT_AVAILABLE"

Code:
:~/hashcat-6.2.5$ ./hashcat.bin -I
hashcat (v6.2.5) starting in backend information mode

clCreateContext(): CL_DEVICE_NOT_AVAILABLE

OpenCL Info:
============
OpenCL Platform ID #1
  Vendor..: Intel(R) Corporation
  Name....: Intel(R) CPU Runtime for OpenCL(TM) Applications
  Version.: OpenCL 2.1 LINUX

  Backend Device ID #1
    Type...........: CPU
    Vendor.ID......: 8
    Vendor.........: Intel(R) Corporation
    Name...........: Intel(R) Xeon(R) CPU @ 2.20GHz
    Version........: OpenCL 2.1 (Build 0)
    Processor(s)...: 2
    Clock..........: 2200
    Memory.Total...: 975 MB (limited to 121 MB allocatable in one block)
    Memory.Free....: 0 MB
    OpenCL.Version.: OpenCL C 2.0
    Driver.Version.: 18.1.0.0920

Code:
:~/hashcat-6.2.5$ ./hashcat.bin -b -m 0
hashcat (v6.2.5) starting in benchmark mode

clCreateContext(): CL_DEVICE_NOT_AVAILABLE

OpenCL API (OpenCL 2.1 LINUX) - Platform #1 [Intel(R) Corporation]
=========================================================
* Device #1: Intel(R) Xeon(R) CPU @ 2.20GHz, skipped

Benchmark relevant options:
===========================
* --optimized-kernel-enable

-------------------
* Hash-Mode 0 (MD5)
-------------------

Started: Wed Jun 15 13:47:52 2022
Stopped: Wed Jun 15 13:48:16 2022

Thanks a lot.


RE: CL_DEVICE_NOT_AVAILABLE on GCP Xeon CPU - Snoopy - 06-23-2022

* Device #1: Intel(R) Xeon(R) CPU @ 2.20GHz, skipped

hahscat is skipping CPU by default

you will need to add option 
Code:
-D1 -d1
to tell hashcat to use CPU


RE: CL_DEVICE_NOT_AVAILABLE on GCP Xeon CPU - albert4 - 06-25-2022

Thanks, but it gives the same result - skipped :

Code:
$ ./hashcat.bin -D1 -d1 -b -m0
hashcat (v6.2.5) starting in benchmark mode

clCreateContext(): CL_DEVICE_NOT_AVAILABLE

OpenCL API (OpenCL 2.1 LINUX) - Platform #1 [Intel(R) Corporation]
==================================================================
* Device #1: Intel(R) Xeon(R) CPU @ 2.20GHz, skipped

Benchmark relevant options:
===========================
* --backend-devices=1
* --opencl-device-types=1
* --optimized-kernel-enable

-------------------
* Hash-Mode 0 (MD5)
-------------------

Started: Sat Jun 25 11:24:15 2022
Stopped: Sat Jun 25 11:24:18 2022



RE: CL_DEVICE_NOT_AVAILABLE on GCP Xeon CPU - marc1n - 06-25-2022

Only -D1 not -D1 -d1 Smile


RE: CL_DEVICE_NOT_AVAILABLE on GCP Xeon CPU - albert4 - 06-25-2022

Same result :

Code:
$ ./hashcat.bin -D 1  -b -m0
hashcat (v6.2.5) starting in benchmark mode

clCreateContext(): CL_DEVICE_NOT_AVAILABLE

OpenCL API (OpenCL 2.1 LINUX) - Platform #1 [Intel(R) Corporation]
==================================================================
* Device #1: Intel(R) Xeon(R) CPU @ 2.20GHz, skipped



RE: CL_DEVICE_NOT_AVAILABLE on GCP Xeon CPU - marc1n - 06-25-2022

See that you have

Memory.Total...: 975 MB (limited to 121 MB allocatable in one block)
Memory.Free....: 0 MB

your instance has no memory to run...


RE: CL_DEVICE_NOT_AVAILABLE on GCP Xeon CPU - albert4 - 06-26-2022

Good point.
Code:
$ grep Mem /proc/meminfo
MemTotal:         998768 kB
MemFree:          520656 kB
MemAvailable:     616156 kB

Any hints why hashcat finds MemFree = 0 Mb whereas real MemFree is around 520 Mb ?


RE: CL_DEVICE_NOT_AVAILABLE on GCP Xeon CPU - marc1n - 06-26-2022

(06-26-2022, 02:03 PM)albert4 Wrote: Good point.
Code:
$ grep Mem /proc/meminfo
MemTotal:        998768 kB
MemFree:          520656 kB
MemAvailable:    616156 kB

Any hints why hashcat finds MemFree = 0 Mb whereas real MemFree is around 520 Mb ?

You can't run everything on 1GB it's not those times Smile You have too little memory as I already wrote...


RE: CL_DEVICE_NOT_AVAILABLE on GCP Xeon CPU - Snoopy - 06-28-2022

didnt spot the memory = 0

i guess this is a small (free) vps?, these virtual machines are not made for loving you baby, i mean hashcat, if you dont have the option to get more ram for free, try using hashcat on your pc at home

@ Marc1n, -D1 -d1 is also right in this context, depending on the settings and driverconfiguration the cpu could be shown more than once, i have a workstation with 2* xeon working, when just using option -D1 (CPU -only)

Code:
hashcat -m0 -b -D1
Speed.#1.........:  905.1 MH/s (51.60ms) @ Accel:1024 Loops:1024 Thr:1 Vec:8
Speed.#2.........:  980.8 MH/s (50.03ms) @ Accel:1024 Loops:1024 Thr:1 Vec:8
Speed.#*.........:  1885.9 MH/s

Code:
hashcat -m0 -b -D1 -d1
Speed.#1.........:  1844.6 MH/s (13.28ms) @ Accel:1024 Loops:512 Thr:1 Vec:8

as you can see, -D1 -d1 sticks to one possibiliy how the CPU is utilized, but same overall speed (i think this is better thna using 2 different ways how hahscat talks to the CPU