mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   mtsieve (https://www.mersenneforum.org/showthread.php?t=23042)

rogue 2020-05-29 10:35

[QUOTE=Citrix;546721]I was finally able to modify the GPU code. I had to do the Perl portion manually. The script did not work for me. It goes into an infinite while loop. The code did compile.

Though I cannot get the code to run. I have tried the original gcwsievecl.exe from mtsieve and that does not work either. afsievecl.exe does not work either. ppsieve (open cl) etc works fine.

Any thoughts on how to fix this.[/QUOTE]

Hmm. Are you getting an error at runtime with gcwsievecl? If so, what error are you getting?

In the meantime, I'll do some tests to see if it is working for me. Maybe I broke something with a more recent change.

Citrix 2020-05-29 23:10

[QUOTE=rogue;546730]Hmm. Are you getting an error at runtime with gcwsievecl? If so, what error are you getting?

In the meantime, I'll do some tests to see if it is working for me. Maybe I broke something with a more recent change.[/QUOTE]


No message, It does crash before the start banner is printed. Possibly I am not using the input line correctly.

I am using :- Should I be using something else? Both programs crash for me.

[CODE]

gcwsievecl.exe -p 3770000000000 -P 4000000000000 -b 2 -n 825 -N 1000 -s +
afsievecl.exe -n 825 -N 1000

[/CODE]


Even using "any*cl.exe -h" will crash and not print the help options.

Citrix 2020-05-30 01:19

Looking at the code more closely -

In the make file for linking the *cl files the $(GPUCPPFLAGS) and $(*_GPU_OBJS) is missing so the compiler does not even build the GPU.o files.

I now have
[CODE]

gcwsievecl: $(GPU_CORE_OBJS) $(PRIMESIEVE_OBJS) $(ASM_OBJS) $(GCW_OBJS) $(GCW_GPU_OBJS)
$(CC) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(GPUCPPFLAGS) $(GPULDFLAGS) $(EXTRALDFLAGS)

[/CODE]

In ip_CullenWoodallApp->GetDevice() ; there is no function defined as GetDevice.
Maybe an object of device type needs to be created under CullenWoodallGpuWorker.

Then use function *GetDeviceIdPtr or GetDeviceId (in device.h)

Are you able to correct the code?

rogue 2020-05-30 12:51

I really messed up the makefile for GPU builds. You need this line:

GCW_GPU_OBJS=cullen_woodall/CullenWoodallApp_gpu.o cullen_woodall/CullenWoodallWorker.o cullen_woodall/CullenWoodallGpuWorker_gpu.o

and this line:

gcwsievecl: $(GPU_CORE_OBJS) $(PRIMESIEVE_OBJS) $(ASM_OBJS) $(GCW_GPU_OBJS)
$(CC) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(GPULDFLAGS) $(EXTRALDFLAGS)

to get a clean build. I haven't tested it yet, but I know that I have to fix the other OpenCL exes.

Thanks for the find.

BTW, I just committed an updated makefile that should fix all OpenCL exes.

Citrix 2020-05-30 15:15

It did not work for me. :confused2:

rogue 2020-05-30 15:16

[QUOTE=Citrix;546811]It did not work for me. :confused2:[/QUOTE]

Did not compile or failed when it ran?

Citrix 2020-05-30 16:38

[QUOTE=rogue;546812]Did not compile or failed when it ran?[/QUOTE]

Did not compile - "too many paths"

rogue 2020-05-30 16:51

I made another change to the makefile which might address the issue. Both gcwsieve and gcwsievecl run on Windows, but I haven't tried any GPU workers. It builds, but fails on OS X, for an unknown reason that I have to look into.

Citrix 2020-05-30 16:57

[QUOTE=rogue;546821]I made another change to the makefile which might address the issue. Both gcwsieve and gcwsievecl run on Windows, but I haven't tried any GPU workers. It builds, but fails on OS X, for an unknown reason that I have to look into.[/QUOTE]

Where do you get the new makefile from?

rogue 2020-05-30 17:32

[QUOTE=Citrix;546822]Where do you get the new makefile from?[/QUOTE]

I had committed to svn.

Citrix 2020-05-30 17:54

[QUOTE=rogue;546823]I had committed to svn.[/QUOTE]

You need to add gcwsievecl to

GPU_PROGS=afsievecl mfsievecl gfndsievecl pixsievecl xyyxsievecl

Compiles for me and at least I get
"gcwsievecl.exe -p 3770000000000 -P 4000000000000 -b 2 -n 825 -N 1000 -s +
gcwsieve v1.2, a program to find factors numbers of the form n*b^n+1 and n*b^n-1
Sieve started: 377e10 < p < 4e12 with 0 terms (825 <= n <= 1000, n*2^n+1) (expecting 0 factors)"

Then it crashes.


All times are UTC. The time now is 22:33.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.