Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T ThirdPartyCompilationFactory
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MoReFEM
  • ThirdPartyCompilationFactory
  • Issues
  • #18
Closed
Open
Issue created Nov 11, 2022 by GILLES Sebastien@sgillesOwner

Compile PETSc and Slepc "in place"

So far, all of my libraries were compiled "out of place" (to use the denomination on PETSc website): the sources were unpacked (in a temporary location), then make/make install was called and only the installed libraries were kept.

However, I didn't manage to run properly Slepc installed that way:

  • The code failed in the SlepcInitialize() call - I could work around this by adding a call to PetscInitialize()beforehand
  • The instruction EPSSetOperators() failed with the following message:
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Invalid argument
[0]PETSC ERROR: Wrong type of object: Parameter # 2
[0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.18.1, Oct 26, 2022 
[0]PETSC ERROR: /Users/sgilles/Codes/MoReFEM/CoreLibrary/build_clang_debug/Sources/TestSlepcHandsOn1 on a  named Sebastiens-MacBook-Pro-3.local by sgilles Fri Nov 11 09:50:17 2022
[0]PETSC ERROR: Configure options CXXFLAGS="  -m64 -g   -stdlib=libc++" CFLAGS="  -m64 -g   -Wno-implicit-function-declaration" FFLAGS="  -g  " FCFLAGS="  -g  " LDFLAGS="  " --with-mpi-dir=/Users/sgilles/opt/clang_debug/Openmpi --download-mumps --download-superlu_dist --download-scalapack --with-clib-autodetect=0 --with-debugging=yes --prefix=/Users/sgilles/opt/clang_debug/Petsc --download-sowing-cc=clang ---download-sowing-cxx=clang++ --with-cxx-dialect=C++17

Trying to compile the code entirely outside of MoReFEM yielded the exact same result.

However, if inside the Slepc directories ("in place", i.e. where the source were decompressed) the same code was present in a tutorial directory... and it works flawlessly. By trial-and-error in my sandbox directory I managed to figure out it was due to the were we fetched the library: if using the in-place Petsc (not Slepc) directory it works, but if I'm using the out of place PETSc it fails with the above message.

It is therefore wiser to modify the installation for PETSc and Slepc to use the inplace method only (I have already struggled with something similar in PETSc alone years ago: I remember having to play around PetscInitialize() without understanding why I had to do it - now I know...)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking