Bill Allombert on Mon, 30 Jun 2025 22:59:22 +0200


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

Re: Forprime and posix multithreading


Hi Piercarlo,

You need to use pari_thread_alloc/pari_thread_start/pari_thread_close
to initialize the threads.

See the example file examples/thread.c.
This is documented in the appendix B of the libpari manual

Note that an alternative that wraps around pthread is examples/pari-mt.c, the
documentation is in chapter 4 of the Developer's Guide to the PARI library

If you are using Windows, I recommend to use the Windows subsystem for Linux for
running parallel code.

Cheers,
Bill.