Error: failed to pass tests
Hi,
I installed petsc4py successfully on Mac OS, but I failed to pass the tests of petsc4py. I firstly got petsc installed and tests of petsc are passed. From the error info, it seems to has something with MPI. I am sure that I add option "--download-mpich" when configure petsc. I don't know what caused the error. The detail info is as follows. Thanks a lot. --Zheng
FAIL: testCompatMPI4PY (test_comm.TestComm)
Traceback (most recent call last): File "test_comm.py", line 63, in testCompatMPI4PY self.assertEqual(cn, PETSc.COMM_NULL) AssertionError: <petsc4py.PETSc.Comm object at 0x107ae2050> != <petsc4py.PETSc.Comm object at 0x107593510>
Comments (7)
-
-
reporter Thanks for your reply, Lisandro. I did not install mpi4py explicitly before and just added --download-mpich when configured PETSc. You mean I need to install mpi4py alone?
-
So, it seems you have mpi4py previously installed. In that case, please note petsc4py DOES NOT require mpi4py yo run, so you can just ignore the failing test. However, please remember your mpi4py and petsc4py are "incompatible" because they are using different MPI implementations, so never ever try to use both in your code. In case of doubt, if you are not using mpi4py and do not need it, I suggest to just uninstall it to save you of potential headaches in the near future.
-
reporter Ok. When I specify the MPI used by PETSc and rebuild mpi4py, there is an error like this:
unable to execute '/usr/local/petsc/linux-gnu/externalpackages/mpich-3.1.3/src/env/mpicc': Permission denied failure. removing: _configtest.c _configtest.o error: Cannot compile MPI programs. Check your configuration!!!
even I use root privilege. How to fix this?
-
reporter I delete all mpi4py and test for petscpy pass now. Thanks for your patience reply.
-
I think you have to add
$PETSC_DIR\$PETSC_ARCH\bin
to your$PATH
, the path within`$PETSC_DIR\$PETSC_ARCH\externalpackages
is not the right one. Anyway, if you do not need mpi4py, just removing it (or otherwise ignore the test failure) is fine. -
- changed status to closed
- Log in to comment
As you used
--download-mpich
, I guess mpi4py and PETSc are using different MPI implementations. You have to either not use--download-mpich
and let PETSc use the same MPI you used to build mpi4py, or rebuild and reinstall mpi4py to use the MPI that PETSc downloaded and installed.