Closed luizfzs closed 2 months ago
I'm pretty sure opencl 2 is required but could be wrong.
Yes it's because global variables in an OpenCL program were added only at some point in OpenCL (I'd guess in OpenCL 2.0?), and it seems this is the problem.
You might try to compile PRPLL, run with "-use NO_ASM" on Nvidia, and see what error you hit there. https://github.com/preda/gpuowl/tree/prpll
@preda thanks for the suggestion. Below are my findings.
make
doesn't end successfully, due to missing a library to compile prpll-amd
, however it compiles prpll
so it's fine.
When running it like ./prpll -prp 1234567 -use NO_ASM
I got a different error.
20240401 13:18:57 PRPLL 0.6-2-gf8d1d7c
20240401 13:18:57 PRPLL 0.6-2-gf8d1d7c
20240401 13:18:57 config: -prp 1234567 -use NO_ASM
20240401 13:18:57 device 0, OpenCL 470.239.06, unique id ''
20240401 13:18:57 0 1234567 FFT: 256K 256:2:256 (4.71 bpw)
20240401 13:18:57 0 1234567 Reused smallTrig
20240401 13:18:57 0 1234567 Using long carry!
20240401 13:18:57 0 1234567 In file included from <kernel>:1:
carryfused.cl:86:46: error: use of undeclared identifier 'memory_scope_device'
work_group_barrier(CLK_GLOBAL_MEM_FENCE, memory_scope_device);
^
carryfused.cl:88:7: warning: implicit declaration of function 'atomic_store' is invalid in C99
atomic_store((atomic_uint *) &ready[gr], 1);
^
carryfused.cl:88:21: error: use of undeclared identifier 'atomic_uint'
atomic_store((atomic_uint *) &ready[gr], 1);
^
carryfused.cl:88:34: error: expected expression
atomic_store((atomic_uint *) &ready[gr], 1);
^
carryfused.cl:96:12: warning: implicit declaration of function 'atomic_load' is invalid in C99
while(!atomic_load((atomic_uint *) &ready[gr - 1]));
^
carryfused.cl:96:25: error: use of undeclared identifier 'atomic_uint'
while(!atomic_load((atomic_uint *) &ready[gr - 1]));
^
carryfused.cl:96:38: error: expected expression
while(!atomic_load((atomic_uint *) &ready[gr - 1]));
^
carryfused.cl:98:44: error: use of undeclared identifier 'memory_scope_device'
work_group_barrier(CLK_GLOBAL_MEM_FENCE, memory_scope_device);
^
20240401 13:18:57 0 1234567 Compiling 'carryfused.cl' error BUILD_PROGRAM_FAILURE (-11) (args -cl-finite-math-only -cl-std=CL2.0 -DEXP=1234567u -DWIDTH=256u -DSMALL_HEIGHT=256u -DMIDDLE=2u -DWEIGHT_STEP=0.22306462926440029 -DIWEIGHT_STEP=-0.18238171878011078 -DIWEIGHTS={0,-0.33150034621503416,-0.10621642577876156,-0.40250599007441273,-0.20115092245230795,-0.46596966823292851,-0.2860018162060845,-0.045384922661346139,} -DFWEIGHTS={0,0.49588708735766496,0.11883908906169915,0.67365694615840821,0.25180090721241277,0.87255281304165877,0.40056378671214449,0.047542641781725854,} -DNO_ASM=1 )
20240401 13:18:57 0 1234567 Can't compile carryfused.cl
20240401 13:18:57 0 Exception "Can't compile carryfused.cl"
20240401 13:18:57 Bye
I've noticed some warnings about C99. My gcc
is gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
, which IIRC, should support C20. I'm using the Makefile
I got from the repository, and it has the C20 flag CXXFLAGS = -Wall -O2 -DNDEBUG -std=c++20
.
Some other things I noticed are the flags -cl-std=CL2.0
and that the NO_ASM
are set.
Is it possible some files/changes haven't been committed to this branch?
It seems the OpenCL you're using does not understand the memory_scope_device in work_group_barrier(), which means you probably need OpenCL 2.0 support.
The makefile missing lib is an unrelated problem, I fixed that one in the makefile in a recent commit.
Closing this as I'm not investigating OpenCL 1.2 support ATM.
I'm trying to get
gpuowl
running on an old system.clinfo
works. I've compiled the code since I got the whole driver dance to work. When I run./gpuowl -prp 82589933
, this is what I get:From
clinfo
, it seems I have OpenCL 1.2 installed.Is that supported or do I need some newer version of OpenCL?