slepc 3.3 test failed

Asked by Chaffra Affouda

When building dolfin with slepc 3.3 the test fails with this output. Is the test code valid for 3.3?

-- Checking for package 'SLEPc'
-- SLEPC_DIR is /usr/lib/slepcdir/3.3
-- SLEPc test failed
-- SLEPc could not be found. Be sure to set SLEPC_DIR, PETSC_DIR, and PETSC_ARCH. (missing: SLEPC_LIBRARIES SLEPC_TEST_RUNS)

--CMakeError.log---

Performing C++ SOURCE FILE Test SLEPC_TEST_RUNS failed with the following output:

Return value: 1
Source file was:

#include "petsc.h"
#include "slepceps.h"
int main()
{
  PetscErrorCode ierr;
  int argc = 0;
  char** argv = NULL;
  ierr = SlepcInitialize(&argc, &argv, PETSC_NULL, PETSC_NULL);
  EPS eps;
  ierr = EPSCreate(PETSC_COMM_SELF, &eps); CHKERRQ(ierr);
  //ierr = EPSSetFromOptions(eps); CHKERRQ(ierr);
#if PETSC_VERSION_MAJOR == 3 && PETSC_VERSION_MINOR <= 1
  ierr = EPSDestroy(eps); CHKERRQ(ierr);
#else
  ierr = EPSDestroy(&eps); CHKERRQ(ierr);
#endif
  ierr = SlepcFinalize(); CHKERRQ(ierr);
  return 0;
}

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Chaffra Affouda
Solved:
Last query:
Last reply:
Revision history for this message
Johannes Ring (johannr) said :
#1

This worked fine for me with SLEPc 3.3-p1 built manually from source.

I see SLEPC_DIR is /usr/lib/slepcdir/3.3 in your case. What system are you on and how did you install SLEPc?

Revision history for this message
Chaffra Affouda (chaffra) said :
#2

I used the dev version of slepc on ubuntu. I think I found the problem. Some of the libraries in slepc might have been moved around in the dev version. I modified FindSLEPc.cmake accordingly. I added ${SLEPC_DIR}/${PETSC_ARCH}/lib to the hints and it worked.

# Get variables from SLEPc configuration
if (SLEPC_DIR)

  find_library(SLEPC_LIBRARY
    NAMES slepc
    HINTS ${SLEPC_DIR}/${PETSC_ARCH}/lib ${SLEPC_DIR}/lib $ENV{SLEPC_DIR}/lib
    DOC "The SLEPc library"
    )
  mark_as_advanced(SLEPC_LIBRARY)