Piercarlo Giannattasio on Mon, 30 Jun 2025 12:14:20 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Forprime and posix multithreading


Good morning, 

I'm trying to code a prime number generator in a specified range, using GP and C, and I need to reduce processing times.

I'm trying to use forprime and posix multithreading, but when executing the code I'm exceeding the parisizemax. I've tried with 1-15 threads, assigning 16GB of memory only to PARI, but I still get the same error: sometimes it only calculates the first iteration of forprime_next...

Also, is there any technical documentation for the C implementation, besides the one I'm studying (User Guide, Tutorial, Introduction to gp2c, Introduction to Parallel GP) ?

Piercarlo