If you plan to use OpenMP for threading then use --with-threadsafety --with-openmp
> On Sep 21, 2023, at 11:10 AM, Junchao Zhang <[email protected]> wrote: > > include/petsc/private/petscimpl.h has > > #if defined(__cplusplus) > #error "Thread safety requires either --download-concurrencykit, > std::atomic, or --with-openmp" > #else > #error "Thread safety requires either --download-concurrencykit, > stdatomic.h, or --with-openmp" > #endif > > So it means when you require --with-threadsafety, your system needs to have > std atomic; otherwise you need to add --download-concurrencykit or > --with-openmp > > --Junchao Zhang > > > On Thu, Sep 21, 2023 at 9:39 AM Di Miao via petsc-users > <[email protected] <mailto:[email protected]>> wrote: >> To whom it may concern, >> >> >> >> I would like to run PETSc in a multi-threaded way (KSP per thread). I >> checked PETSc’s manual and it says: >> >> >> >> There is an OpenMP thread-safe subset of PETSc that may be configured for >> using --with-threadsafety [--with-openmp or --download-concurrencykit]. >> >> >> >> I am confused about the square bracket here. Does this mean I need to >> --with-threadsafety +( --with-openmp/--download-concurrencykit) or this mean >> I can add --with-threadsafety or --with-openmp or --download-concurrencykit? >> >> >> >> Looking for your explanation on these flags! >> >> >> >> Thank you >> >> Di >>
