<div dir="ltr">You want to configure PETSc with threads and not add them yourself:<div><br></div><div>    '--with-openmp=1',<br>    '--with-log=0',<br>    '--with-threadsafety',<br></div><div><br></div><div>And you want a threadsafe lapack probably.</div><div><br></div><div>Mark</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 23, 2023 at 2:54 AM Salman Ahmad <<a href="mailto:salmanuom206@gmail.com">salmanuom206@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear All,</div><div><br></div>I compiled the library "SuperLU_MT" and got the "<span style="color:rgb(0,0,0)">libsuperlu_mt_PTHREAD.a" and </span>

"<span style="color:rgb(0,0,0)">libsuperlu_mt_PTHREAD.a"</span>  to <span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,0,0)">/usr/lib to</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,0,0)">/usr/lib. I am using the following file to link but not working:</span><div><br></div><div>CC     = gcc<br></div><div>CXX     = g++<br>F77      = gfortran<br>LINKER  = ${CXX}<br><br>WARNINGS = -Wall -pedantic -Wextra -Weffc++ -Woverloaded-virtual -Wfloat-equal -Wshadow \<br>           -Wredundant-decls -Winline -fmax-errors=1<br><br>CXXFLAGS += -ffast-math -O3 -march=native -std=c++17 ${WARNINGS}<br><br>LINKFLAGS   += -O2<br><br>#architecture<br>#CPU = -march=znver2<br>CXXFLAGS  += ${CPU}<br>LINKFLAGS += ${CPU}<br><br><br>ifeq ($(UBUNTU),1)<br>LINKFLAGS += -llapack -lblas<br>CXXFLAGS  += -DUBUNTU<br>else<br># on  archlinux<br>LINKFLAGS += -llapack -lopenblas -lcblas<br>endif<br><br>SANITARY =  -fsanitize=address  -fsanitize=undefined -fsanitize=null -fsanitize=return \<br> -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow \<br> -fsanitize=bool -fsanitize=enum -fsanitize=vptr<br><br><font style="background-color:rgb(255,0,0)" color="#4c1130"># SuperLU_MT<br>CXXFLAGS += -L/usr/lib/lsuperlu_mt_PTHREAD<br>LINKFLAGS += -L/usr/lib/lsuperlu_mt_PTHREAD</font><br>#<br>SUPERLU_INC= -I/usr/include/superlu -I/usr/include/superlu-dist <br>CXXFLAGS  += ${SUPERLU_INC}<br>LINKFLAGS +=-lsuperlu<br># OpenMP<br>CXXFLAGS += -fopenmp<br>LINKFLAGS += -fopenmp<br></div><div><br></div><div>Any suggestions?</div><div>Best Regards,</div><div>Salman Ahmad</div></div>
</blockquote></div>