How can I specify linker options for PETSc?
I need to link PETSc against the blas and lapack libraries. The script is able to find the libraries.
-- Checking for package 'BLAS'
-- Found BLAS: /usr/lib64/
-- Checking for package 'LAPACK'
-- Found LAPACK: /usr/lib64/
And is able to find PETSc:
-- Checking for package 'PETSc'
-- PETSC_DIR is /vol/apps/system
-- PETSC_ARCH is empty
-- Found petscconf.h
-- PETSc test failed
-- PETSc configured without Cusp support
-- PETSc could not be found. Be sure to set PETSC_DIR and PETSC_ARCH. (missing: PETSC_TEST_RUNS)
But in every single case, CMakeFiles/
Performing C++ SOURCE FILE Test PETSC_TEST_RUNS failed with the following output:
Change Dir: /vol/apps/
Run Build Command:
/usr/bin/gmake -f CMakeFiles/
gmake[1]: Entering directory `/n/oregano.
/vol/apps/
Building CXX object CMakeFiles/
/usr/bin/c++ -DPETSC_TEST_RUNS -fopenmp -I/vol/
Linking CXX executable cmTryCompileExec
/vol/apps/
/usr/bin/c++ -DPETSC_TEST_RUNS -fopenmp CMakeFiles/
Followed by a couple hundred lines of undefine references to blas and lapack. Now, obviously I need to specify to link against blas and lapack, but how do I do so?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Johannes Ring
- Solved:
- Last query:
- Last reply: