[petsc-users] How to link SuperLU_MT library in GCC_default.mk file?
Salman Ahmad
salmanuom206 at gmail.com
Thu Feb 23 01:54:23 CST 2023
Dear All,
I compiled the library "SuperLU_MT" and got the "libsuperlu_mt_PTHREAD.a"
and "libsuperlu_mt_PTHREAD.a" to /usr/lib to /usr/lib. I am using the
following file to link but not working:
CC = gcc
CXX = g++
F77 = gfortran
LINKER = ${CXX}
WARNINGS = -Wall -pedantic -Wextra -Weffc++ -Woverloaded-virtual
-Wfloat-equal -Wshadow \
-Wredundant-decls -Winline -fmax-errors=1
CXXFLAGS += -ffast-math -O3 -march=native -std=c++17 ${WARNINGS}
LINKFLAGS += -O2
#architecture
#CPU = -march=znver2
CXXFLAGS += ${CPU}
LINKFLAGS += ${CPU}
ifeq ($(UBUNTU),1)
LINKFLAGS += -llapack -lblas
CXXFLAGS += -DUBUNTU
else
# on archlinux
LINKFLAGS += -llapack -lopenblas -lcblas
endif
SANITARY = -fsanitize=address -fsanitize=undefined -fsanitize=null
-fsanitize=return \
-fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero
-fsanitize=float-cast-overflow \
-fsanitize=bool -fsanitize=enum -fsanitize=vptr
# SuperLU_MT
CXXFLAGS += -L/usr/lib/lsuperlu_mt_PTHREAD
LINKFLAGS += -L/usr/lib/lsuperlu_mt_PTHREAD
#
SUPERLU_INC= -I/usr/include/superlu -I/usr/include/superlu-dist
CXXFLAGS += ${SUPERLU_INC}
LINKFLAGS +=-lsuperlu
# OpenMP
CXXFLAGS += -fopenmp
LINKFLAGS += -fopenmp
Any suggestions?
Best Regards,
Salman Ahmad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230223/852b9e45/attachment.html>
More information about the petsc-users
mailing list