I hope everyone is doing well.
I am using OpenMP on the cluster to parallelize the computation. I also want to link to UMFPACK to solve the sparse equation system. The UMFPACK is not used in the OMP block.
But I found that when I run the code, the parallelization does not work well. I use htop to monitor the CPU. It does say that there are 20 CPUs running, but the bars imply that's not true:
And my code does run much slower than the one without linking by -lumfpack. Actually, if not linking to the library using -lumfpack, htop should display something like:
I use the following code to compile and run the code:
module load suitesparse/5.6.0
gfortran main.f90 -lumfpack -o main.out -O3 -fopenmp -ffree-line-length-none -Wno-unused -fimplicit-none -Wall -fcheck=bound,do -ffpe-trap=invalid,zero,overflow
./main.out
Since UMFPACK is not used in the OMP block, why -lumfpack
conflicts with -fopenmp
? I was wondering how to make them work together. Any advice is appreciated. Thank you!