ifdefelse / ProgPOW

A Programmatic Proof-of-Work for Ethash. Forked from https://github.com/ethereum-mining/ethminer
GNU General Public License v3.0
257 stars 84 forks source link

OpenCL Error: clEnqueueWriteBuffer: CL_INVALID_MEM_OBJECT (-38) #48

Open mmrozek opened 5 years ago

mmrozek commented 5 years ago

I have a problem with running ProgPow on my macbook (I am doing this only for test purposes).

When I start benchmark mode, I get:

[~/open-source/ProgPOW/build]$ ./ethminer/ethminer -G -M 10000000 --opencl-devices 1 -v 9                                    [master]
  m  13:05:44|        |  ethminer version 0.15.0.dev0
  m  13:05:44|        |  Build: darwin / release +git. 66e6979
  ℹ  13:05:44|        |  Found suitable OpenCL device [ Intel(R) UHD Graphics 630 ] with 1610612736  bytes of GPU memory
Benchmarking on platform: CL
Preparing DAG for block #10000000
 cl  13:05:44|cl-0    |  No work. Pause for 3 s.
Warming up...
 cl  13:05:47|cl-0    |  New epoch 333 / period 200000
 cl  13:05:49|cl-0    |  Platform: Apple
 cl  13:05:49|cl-0    |  Device:   AMD Radeon Pro 560X Compute Engine  / OpenCL 1.2
  ✘  13:05:50|cl-0    |  Build info: <program source>:33:32: error: parameter may not be qualified with an address space
        __local const uint32_t c_dag[PROGPOW_CACHE_WORDS],
                               ^
<program source>:34:26: error: parameter may not be qualified with an address space
        __local uint64_t share[GROUP_SHARE],
                         ^
<program source>:203:6: warning: no previous prototype for function 'keccak_f800_round'
void keccak_f800_round(uint32_t st[25], const int r)
     ^
<program source>:250:10: warning: no previous prototype for function 'keccak_f800'
uint64_t keccak_f800(__constant hash32_t const* g_header, uint64_t seed, hash32_t digest)
         ^
<program source>:283:10: warning: no previous prototype for function 'kiss99'
uint32_t kiss99(kiss99_t *st)
         ^
<program source>:295:6: warning: no previous prototype for function 'fill_mix'
void fill_mix(uint64_t seed, uint32_t lane_id, uint32_t mix[PROGPOW_REGS])
     ^
<program source>:332:20: warning: unused variable 'nonce'
    uint64_t const nonce = start_nonce + gid;
                   ^

  ✘  13:05:50|cl-0    |  OpenCL Error: clEnqueueWriteBuffer: CL_INVALID_MEM_OBJECT (-38)
Trial 1...
0
Trial 2...
0
Trial 3...
0
Trial 4...
0
Trial 5...
0
min/mean/max: 0/0/0 H/s
inner mean: 0 H/s

I tried to do that on two machines with gpus like that:

FORMAT: [platformID] [deviceID] deviceName
[0] [0] Intel(R) UHD Graphics 630
    CL_DEVICE_TYPE: GPU
    CL_DEVICE_GLOBAL_MEM_SIZE: 1610612736
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 402653184
    CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
[0] [1] AMD Radeon Pro 560X Compute Engine
    CL_DEVICE_TYPE: GPU
    CL_DEVICE_GLOBAL_MEM_SIZE: 4294967296
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 1073741824
    CL_DEVICE_MAX_WORK_GROUP_SIZE: 256```

and that:

Listing OpenCL devices.
FORMAT: [platformID] [deviceID] deviceName
[0] [0] Iris Pro
    CL_DEVICE_TYPE: GPU
    CL_DEVICE_GLOBAL_MEM_SIZE: 1610612736
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 402653184
    CL_DEVICE_MAX_WORK_GROUP_SIZE: 512

In both cases, results are the same.

I am making the project using

cmake .. -DETHASHCUDA=OFF -DETHASHCL=ON

I've seen related ethminer issue but it didn't help me.

dyj10000 commented 3 years ago

me too!! macbook pro 16'

[CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: Build Program driver returned (-2) Break on OpenCLErrorBreak to debug. OpenCL Warning : clBuildProgram failed: could not build program for 0x1021e00 (AMD Radeon Pro 5500M Compute Engine) (err:-2) Break on OpenCLWarningBreak to debug. [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:

:34:32: error: parameter may not be qualified with an address space __local const uint32_t c_dag[PROGPOW_CACHE_WORDS], ^ :35:26: error: parameter may not be qualified with an address space __local uint64_t share[GROUP_SHARE], ^ :220:6: warning: no previous prototype for function 'keccak_f800_round' void keccak_f800_round(uint32_t st[25], const int r) ^ :265:10: warning: no previous prototype for function 'keccak_f800' uint64_t keccak_f800(uint32_t* st) ^ :284:10: warning: no previous prototype for function 'kiss99' uint32_t kiss99(kiss99_t* st) ^ :296:6: warning: no previous prototype for function 'fill_mix' void fill_mix(local uint32_t* seed, uint32_t lane_id, uint32_t* mix) ^ :491:9: warning: 'FNV_PRIME' macro redefined #define FNV_PRIME 0x01000193 ^ :185:9: note: previous definition is here #define FNV_PRIME 0x1000193 ^ :366:10: warning: unused variable 'hash_seed' uint32_t hash_seed[2]; // KISS99 initiator ^ :537:26: warning: unknown OpenCL extension 'cl_amd_media_ops' - ignoring #pragma OPENCL EXTENSION cl_amd_media_ops : enable ^ :542:16: warning: implicit declaration of function 'amd_bitalign' is invalid in C99 return amd_bitalign((vv).xy, (vv).yx, 32 - r); ^