<div dir="ltr"><div>Fine. MWE is unchanged :<br></div><div>* Run<a href="https://hub.docker.com/r/dolfinx/dolfinx"> this docker container</a><br>* Do : python3 -c "from petsc4py import PETSc; PETSc.Viewer().createHDF5('dummy.h5')"<br><br></div><div>Updated attempt at a fix :<br></div><div>* cd /usr/local/petsc/<br>* ./configure PETSC_ARCH=
linux-gnu-real-32
PETSC_DIR=/usr/local/petsc
--with-hdf5 --force<br>* make PETSC_DIR=/usr/local/petsc PETSC-ARCH=
linux-gnu-real-32
all<br><br></div><div>Still no joy. The same error remains.<br></div><div><br>Quentin<br><br><br><br>On Mon, 6 Dec 2021 at 20:04, Pierre Jolivet <<a href="mailto:pierre@joliv.et">pierre@joliv.et</a>> wrote:<br>><br>><br>><br>> On 6 Dec 2021, at 7:42 PM, Quentin Chevalier <<a href="mailto:quentin.chevalier@polytechnique.edu">quentin.chevalier@polytechnique.edu</a>> wrote:<br>><br>> The PETSC_DIR exactly corresponds to the previous one, so I guess that rules option b) out, except if a specific option is required to overwrite a previous installation of PETSc. As for a), well I thought reconfiguring pretty direct, you're welcome to give me a hint as to what could be wrong in the following process.<br>><br>> Steps to reproduce this behaviour are as follows :<br>> * Run this docker container<br>> * Do : python3 -c "from petsc4py import PETSc; PETSc.Viewer().createHDF5('dummy.h5')"<br>><br>> After you get the error Unknown PetscViewer type, feel free to try :<br>><br>> * cd /usr/local/petsc/<br>> * ./configure --with-hfd5<br>><br>><br>> It’s hdf5, not hfd5.<br>> It’s PETSC_ARCH, not PETSC-ARCH.<br>> PETSC_ARCH is missing from your configure line.<br>><br>> Thanks,<br>> Pierre<br>><br>> * make PETSC_DIR=/usr/local/petsc PETSC-ARCH=linux-gnu-real-32 all<br>><br>> Then repeat the MWE and observe absolutely no behavioural change whatsoever. I'm afraid I don't know PETSc well enough to be surprised by that.<br>><br>> Quentin<br>><br>> <br>><br>> Quentin CHEVALIER – IA parcours recherche<br>><br>> LadHyX - Ecole polytechnique<br>><br>> __________<br>><br>><br>><br>> On Mon, 6 Dec 2021 at 19:24, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>>><br>>> On Mon, Dec 6, 2021 at 1:22 PM Quentin Chevalier <<a href="mailto:quentin.chevalier@polytechnique.edu">quentin.chevalier@polytechnique.edu</a>> wrote:<br>>>><br>>>> It failed all of the tests included in `make<br>>>> PETSC_DIR=/usr/local/petsc PETSC-ARCH=linux-gnu-real-32 check`, with<br>>>> the error `/usr/bin/bash: line 1: cd: src/snes/tutorials: No such file<br>>>> or directory`<br>>>><br>>>> I am therefore fairly confident this a "file absence" problem, and not<br>>>> a compilation problem.<br>>>><br>>>> I repeat that there was no error at compilation stage. The final stage<br>>>> did present `gmake[3]: Nothing to be done for 'libs'.` but that's all.<br>>>><br>>>> Again, running `./configure --with-hdf5` followed by a `make<br>>>> PETSC_DIR=/usr/local/petsc PETSC-ARCH=linux-gnu-real-32 all` does not<br>>>> change the problem. I get the same error at the same position as<br>>>> before.<br>>><br>>><br>>> If you reconfigured and rebuilt, it is impossible to get the same error, so<br>>><br>>> a) You did not reconfigure<br>>><br>>> b) Your new build is somewhere else on the machine<br>>><br>>> Thanks,<br>>><br>>> Matt<br>>> <br>>>><br>>>> I will comment I am running on OpenSUSE.<br>>>><br>>>> Quentin<br>>>><br>>>> On Mon, 6 Dec 2021 at 19:09, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>>>> ><br>>>> > On Mon, Dec 6, 2021 at 1:08 PM Quentin Chevalier <<a href="mailto:quentin.chevalier@polytechnique.edu">quentin.chevalier@polytechnique.edu</a>> wrote:<br>>>> >><br>>>> >> Hello Matthew and thanks for your quick response.<br>>>> >><br>>>> >> I'm afraid I did try to snoop around the container and rerun PETSc's<br>>>> >> configure with the --with-hdf5 option, to absolutely no avail.<br>>>> >><br>>>> >> I didn't see any errors during config or make, but it failed the tests<br>>>> >> (which aren't included in the minimal container I suppose)<br>>>> ><br>>>> ><br>>>> > Failed which tests? What was the error?<br>>>> ><br>>>> > Thanks,<br>>>> ><br>>>> > Matt<br>>>> ><br>>>> >><br>>>> >> Quentin<br>>>> >><br>>>> >><br>>>> >><br>>>> >> Quentin CHEVALIER – IA parcours recherche<br>>>> >><br>>>> >> LadHyX - Ecole polytechnique<br>>>> >><br>>>> >> __________<br>>>> >><br>>>> >><br>>>> >><br>>>> >> On Mon, 6 Dec 2021 at 19:02, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>>>> >> ><br>>>> >> > On Mon, Dec 6, 2021 at 11:28 AM Quentin Chevalier <<a href="mailto:quentin.chevalier@polytechnique.edu">quentin.chevalier@polytechnique.edu</a>> wrote:<br>>>> >> >><br>>>> >> >> Hello PETSc users,<br>>>> >> >><br>>>> >> >> This email is a duplicata of this gitlab issue, sorry for any inconvenience caused.<br>>>> >> >><br>>>> >> >> I want to compute a PETSc vector in real mode, than perform calculations with it in complex mode. I want as much of this process to be parallel as possible. Right now, I compile PETSc in real mode, compute my vector and save it to a file, then switch to complex mode, read it, and move on.<br>>>> >> >><br>>>> >> >> This creates unexpected behaviour using MPIIO, so on Lisandro Dalcinl's advice I'm moving to HDF5 format. My code is as follows (taking inspiration from petsc4py doc, a bitbucket example and another one, all top Google results for 'petsc hdf5') :<br>>>> >> >>><br>>>> >> >>> viewer = PETSc.Viewer().createHDF5(file_name, 'r', COMM_WORLD)<br>>>> >> >>> q.load(viewer)<br>>>> >> >>> q.ghostUpdate(addv=PETSc.InsertMode.INSERT, mode=PETSc.ScatterMode.FORWARD)<br>>>> >> >><br>>>> >> >><br>>>> >> >> This crashes my code. I obtain traceback :<br>>>> >> >>><br>>>> >> >>> File "/home/shared/code.py", line 121, in Load<br>>>> >> >>> viewer = PETSc.Viewer().createHDF5(file_name, 'r', COMM_WORLD)<br>>>> >> >>> File "PETSc/Viewer.pyx", line 182, in petsc4py.PETSc.Viewer.createHDF5<br>>>> >> >>> petsc4py.PETSc.Error: error code 86<br>>>> >> >>> [0] PetscViewerSetType() at /usr/local/petsc/src/sys/classes/viewer/interface/viewreg.c:442<br>>>> >> >>> [0] Unknown type. Check for miss-spelling or missing package: <a href="https://petsc.org/release/install/install/#external-packages">https://petsc.org/release/install/install/#external-packages</a><br>>>> >> >>> [0] Unknown PetscViewer type given: hdf5<br>>>> >> ><br>>>> >> > This means that PETSc has not been configured with HDF5 (--with-hdf5 or --download-hdf5), so the container should be updated.<br>>>> >> ><br>>>> >> > THanks,<br>>>> >> ><br>>>> >> > Matt<br>>>> >> ><br>>>> >> >><br>>>> >> >> I have petsc4py 3.16 from this docker container (list of dependencies include PETSc and petsc4py).<br>>>> >> >><br>>>> >> >> I'm pretty sure this is not intended behaviour. Any insight as to how to fix this issue (I tried running ./configure --with-hdf5 to no avail) or more generally to perform this jiggling between real and complex would be much appreciated,<br>>>> >> >><br>>>> >> >> Kind regards.<br>>>> >> >><br>>>> >> >> Quentin<br>>>> >> ><br>>>> >> ><br>>>> >> ><br>>>> >> > --<br>>>> >> > What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>>>> >> > -- Norbert Wiener<br>>>> >> ><br>>>> >> > <a href="https://www.cse.buffalo.edu/~knepley/">https://www.cse.buffalo.edu/~knepley/</a><br>>>> ><br>>>> ><br>>>> ><br>>>> > --<br>>>> > What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>>>> > -- Norbert Wiener<br>>>> ><br>>>> > <a href="https://www.cse.buffalo.edu/~knepley/">https://www.cse.buffalo.edu/~knepley/</a><br>>><br>>><br>>><br>>> --<br>>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>>> -- Norbert Wiener<br>>><br>>> <a href="https://www.cse.buffalo.edu/~knepley/">https://www.cse.buffalo.edu/~knepley/</a><br>><br>> <image003.jpg><br>><br>></div></div>