Dear Behrooz, > I already have 9.0 installed via SPACK, through which all the required > external libraries are installed and consequently recognized by deal.II. I > recently tried to migrate to version 9.2 (while keeping 9.0). It was > installed through regular procedures described in the README file.
you can do this by simply updating spack itself, and running spack install [email protected] > However the new version doesn't recognize libraries that are already > available on the machine. It was tested through step-18 and as an instance > one particular error I received was "‘PETScWrappers’ does not name a type". > I didn't compile deal.II with PETSc ON during library installation. This is the issue. You have to compile the library with PETSC on. The deal.II library has several wrappers (like the ones in the namespace PETScWrappers) which are compiled once, and included in the library, so that you don’t have to recompile them everytime you compile your application. This, however, implies that you have to let deal.II discover all the libraries you think you will be using during the compilation of deal.II itself. It is not enough to specify the external libraries when you compile an example, since in this case you would not have the compiled wrappers, but just the header files, which contain typdef guards around all definitions that require external libraries that were not discovered during the build of deal.II itself. > However in step-18 configuration, I passed following arguments to cmake: > -DDEAL_II_WITH_PETSC=ON > -DPETSC_DIR=/home/behrooz/Spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/petsc-3.10.3-4w55lkacqsfyidojpbouvm6gmadidcnn > -DPETSC_ARCH=arch-linux2-c-opt (a Python file!). I received > "Manually-specified variables were not used by the project" (Apparently not > updated). > Additionally I added the PETSC_DIR to the bashrc file. Besides, though not a > proper way, having deal.IIcmake.config files of 9.0, I even manipulated > correspondings in 9.2 (were then returned to original state). The compiler > was also changed. > But, none of them worked! Can anyone kindly point out the problem/solution? Rebuild the library, either using spack directly (after updating spack itself, which know knows about 9.2.0), or manually, by specifying -DDEAL_II_WITH_PETSC=ON -DPETSC_DIR=/path/to/petsc. After this, PETSc will be available. Best, Luca. -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/D1079FEE-8F37-4AC2-989E-397F063F9077%40gmail.com.
