Re: [petsc-users] Face Set not appearing when loading GMSH mesh to DMPlex

2023-09-21 Thread Anna Dalklint via petsc-users
Hi again, David was right, the DMView call only printed the sets on the master rank (which I wasn't aware of). So there was no issue! Thank you, Anna From: Blaise Bourdin Sent: Thursday, September 21, 2023 5:05:35 PM To: Anna Dalklint Cc: petsc-users@mcs.anl.go

Re: [petsc-users] 'Unable to locate PETSc dynamic library' error

2023-09-21 Thread Junchao Zhang
>From the code, it seems you need to let your users set env var PETSC_LIB_DIR to the library location, or PETSC_DIR to the prefix path and PETSC_ARCH to "" static PetscErrorCode PetscLoadDynamicLibrary(const char *name, PetscBool *found) { char libs[PETSC_MAX_PATH_LEN], dlib[PETSC_MAX_PATH_LEN];

Re: [petsc-users] 'Unable to locate PETSc dynamic library' error

2023-09-21 Thread Di Miao via petsc-users
Hi Barry, I found the following snippet in PetscInitialize_DynamicLibraries: #if defined(PETSC_HAVE_THREADSAFETY) /* These must be all initialized here because it is not safe for individual threads to call these initialize routines */ preload = PETSC_TRUE; #endif and ‘PetscLoadDynamicLibrar

Re: [petsc-users] 'Unable to locate PETSc dynamic library' error

2023-09-21 Thread Barry Smith
The recommended approach is to use --with-prefix=directory where you want PETSc installed instead of copying files manually after configure and make I don't see why —with-thread-safety would affect this but > On Sep 21, 2023, at 5:07 PM, Di Miao via petsc-users > wrote: > > To whom it

[petsc-users] 'Unable to locate PETSc dynamic library' error

2023-09-21 Thread Di Miao via petsc-users
To whom it may concern, In our build system, PETSc/SLEPc is compiled in one place and the *.so lib are then moved to another place for future use. Before we add the '-with-thread-safety' flag, this works well. Now, we would like to run PETSc on multiple threads. As suggested by the manual, we a

Re: [petsc-users] [petsc-maint] PETSc with Xcode 15

2023-09-21 Thread Pierre Jolivet
This is enough to bypass most of the warnings.There is still the "ld: warning: ignoring duplicate libraries:", but I think these should be filtered (unlike the other warnings which should be fixed).Thanks,Pierrediff --git a/config/BuildSystem/config/setCompilers.py b/config/BuildSystem/config/setC

Re: [petsc-users] [petsc-maint] PETSc with Xcode 15

2023-09-21 Thread Barry Smith
Where are the flags such as -multiply_defined being added? PETSc configure is suppose to check each flag before it adds it to the list of flags it uses. So normally I would expect these flags would just not exist in the link lines etc. > On Sep 21, 2023, at 11:02 AM, Blaise Bourdin wrote:

Re: [petsc-users] PETSc openMP

2023-09-21 Thread Barry Smith
If you plan to use OpenMP for threading then use --with-threadsafety --with-openmp > On Sep 21, 2023, at 11:10 AM, Junchao Zhang wrote: > > include/petsc/private/petscimpl.h has > > #if defined(__cplusplus) > #error "Thread safety requires either --download-concurrencykit, > st

Re: [petsc-users] PETSc with Xcode 15

2023-09-21 Thread Satish Balay via petsc-users
Do you get this failure with petsc main branch as well? Satish On Thu, 21 Sep 2023, Blaise Bourdin wrote: > FWIW, CLT 15.0 also seems to include changes to the linker, with incompatible > options etc… I was able to rebuild mpich and petsc but I get many linker > warnings and have not fully te

Re: [petsc-users] PETSc openMP

2023-09-21 Thread Junchao Zhang
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

Re: [petsc-users] Face Set not appearing when loading GMSH mesh to DMPlex

2023-09-21 Thread Blaise Bourdin
Can you send me the geo or msh file, or instruction on how to build your example? I am not familiar with the gmsh API Blaise On Sep 20, 2023, at 8:16 AM, Anna Dalklint via petsc-users wrote: Caution: External email.  Hello, I am trying to lo

Re: [petsc-users] PETSc with Xcode 15

2023-09-21 Thread Blaise Bourdin
FWIW, CLT 15.0 also seems to include changes to the linker, with incompatible options etc… I was able to rebuild mpich and petsc but I get many linker warnings and have not fully tested my build Before CLT 15.0 update SiMini:mef90-dmplex (dmplex)$ ld -v @(#)PROGRAM:ld  PROJECT:ld

[petsc-users] PETSc openMP

2023-09-21 Thread Di Miao via petsc-users
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 abou

Re: [petsc-users] Problem with matrix and vector using GPU

2023-09-21 Thread Ramoni Z. Sedano Azevedo
Using the following flags when calling the code -A_mat_type aijcusparse\ -P_mat_type aijcusparse \ -dm_vec_type cuda\ -use_gpu_aware_mpi 0 \ and adding the function PetscCallA(DMSetFromOptions(da, ierr)) between functions PetscCallA( DMDACreate3d(PETSC_COMM_WORLD, DM_BOUNDARY_NONE, DM_BOUN