TAO test error [petsc-maint]

Issue #28 resolved
Thomas Hisch created an issue

The petsc4py unit tests fail with the following output:

======================================================================
ERROR: testOptions (test_object.TestObjectTAO)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_object.py", line 62, in testOptions
    self.obj.setFromOptions()
  File "PETSc/TAO.pyx", line 124, in petsc4py.PETSc.TAO.setFromOptions (src/petsc4py.PETSc.c:185164)
Error: error code 86
[0] TaoSetFromOptions() line 402 in /home/jenkins/jobs/petsc-maint-complex/workspace/petsc/src/tao/interface/taosolver.c
[0] TaoSetType() line 2140 in /home/jenkins/jobs/petsc-maint-complex/workspace/petsc/src/tao/interface/taosolver.c
[0] Unknown type. Check for miss-spelling or missing package: http://www.mcs.anl.gov/petsc/documentation/installation.html#external
[0] Unable to find requested Tao type lmvm

Comments (10)

  1. Thomas Hisch reporter

    Yes this is with the current maint branches.

    This are the flags used to compile petsc:

    --download-scalapack
    --download-suitesparse
    --download-metis
    --download-parmetis
    --download-mumps
    --download-scotch
    --download-ptscotch
    --with-c++-support=1
    --with-scalar-type=complex
    --with-x11=0
    --with-shared-libraries=1
    --with-fortran-kernels=1
    --download-sowing
    --with-c2html=0
    --with-debugging=0
    

    Did you try to test it with complex petsc scalars? It seems that I only get this test error with complex petsc scalars, but I have to double check it.

  2. Lisandro Dalcin

    Oh, now I see. Indeed, TAO does not support complex scalars. I'll push a fix disabling these tests for complex builds.

  3. Thomas Hisch reporter

    It still does not work. Please use np.iscomplexobj instead of np.iscomplex to test whether the scalar is complex or not.

    In [3]: np.iscomplex(0j)
    Out[3]: False
    
  4. Log in to comment