<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div> The recommended approach is to use --with-prefix=directory where you want PETSc installed instead of copying files manually after configure and make<div><br></div><div> I don't see why <span style="font-family: Calibri, sans-serif; font-size: 11pt;">—with-thread-safety </span>would affect this but</div><div><br><div><br><blockquote type="cite"><div>On Sep 21, 2023, at 5:07 PM, Di Miao via petsc-users <petsc-users@mcs.anl.gov> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">To whom it may concern,<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">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 added ‘—with-thread-safety’ flag. The udpated libpetsc.so leads to the following error message:<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Unable to locate PETSc dynamic library<span class="Apple-converted-space"> </span><o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> You cannot move the dynamic libraries!<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">My question is other than compile PETSc as a static library, is there any other solutions that can let us compile libpetsc.so in one place and distribute it to other folders without causing this error?<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Thank you,<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Di<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: Unable to open file<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: Unable to locate PETSc dynamic library<span class="Apple-converted-space"> </span><o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"> You cannot move the dynamic libraries!<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: See<span class="Apple-converted-space"> </span><a href="https://petsc.org/release/faq/">https://petsc.org/release/faq/</a><span class="Apple-converted-space"> </span>for trouble shooting.<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: Petsc Release Version 3.19.2, Jun 01, 2023<span class="Apple-converted-space"> </span><o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: Unknown Name on a arch-linux-c-opt named<span class="Apple-converted-space"> </span><a href="http://tcadprod39.synopsys.com/">tcadprod39.synopsys.com</a><span class="Apple-converted-space"> </span>by tcad Wed Sep 20 02:37:04 2023<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: Configure options --with-mpi-dir=/SCRATCH/tcad/ci_2_0/workspace/incremental_build_main@2/petsc/../tcad_mpi_mpich --with-64-bit-indices=true --with-blaslapack-dir=/SCRATCH/tcad/ci_2_0/workspace/incremental_build_main@2/petsc/../mkl --with-shared-libraries --with-clean=true --with-debugging=0 --with-mkl_pardiso-dir=/SCRATCH/tcad/ci_2_0/workspace/incremental_build_main@2/petsc/../mkl COPTFLAGS=-O3 CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 --download-mumps=/SCRATCH/tcad/ci_2_0/workspace/incremental_build_main@2/petsc/MUMPS_5.6.0.tar.gz --download-scalapack=/SCRATCH/tcad/ci_2_0/workspace/incremental_build_main@2/petsc/v2.2.0.tar.gz --with-ssl-dir=/SCRATCH/tcad/ci_2_0/workspace/incremental_build_main@2/petsc/../libressl --with-openmp=true --with-threadsafety=true --with-log=0<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: #1 PetscInitialize_DynamicLibraries() at /SCRATCH/tcad/ci_2_0/workspace/incremental_build_main@2/petsc/petsc-3.19.2/src/sys/dll/reg.c:88<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: #2 PetscInitialize_Common() at /SCRATCH/tcad/ci_2_0/workspace/incremental_build_main@2/petsc/petsc-3.19.2/src/sys/objects/pinit.c:1030<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: #3 PetscInitialize() at /SCRATCH/tcad/ci_2_0/workspace/incremental_build_main@2/petsc/petsc-3.19.2/src/sys/objects/pinit.c:1276<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: #4 SlepcInitialize() at /SCRATCH/tcad/ci_2_0/workspace/incremental_build_main@2/slepc/slepc-3.19.2/src/sys/slepcinit.c:264<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: #5 EPSCreate() at /SCRATCH/tcad/ci_2_0/workspace/incremental_build_main@2/slepc/slepc-3.19.2/src/eps/interface/epsbasic.c:56<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: #6 EPSCreate() at /SCRATCH/tcad/ci_2_0/workspace/incremental_build_main@2/slepc/slepc-3.19.2/src/eps/interface/epsbasic.c:56<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">Start calculating extreme eigenvalues..<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: ------------------------------------------------------------------------<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: or see<span class="Apple-converted-space"> </span><a href="https://petsc.org/release/faq/#valgrind">https://petsc.org/release/faq/#valgrind</a><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><a href="https://petsc.org/release/faq/">https://petsc.org/release/faq/</a><o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: to get more information on the crash.<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[0]PETSC ERROR: Run with -malloc_debug to check if memory corruption is causing the crash.<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=59<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">:<o:p></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">system msg for write_line failure : Bad file descriptor</div></div></div></blockquote></div><br></div></body></html>