Topic: How to install oofem with slepc and other libraries

Hello all,

I'm try to install OOFEM in ubuntu 14.04. I can successfully build it with petsc. But I don't know how to build it with slepc. slepc is succefully build in my desktop now, and pass the default test. I DONOT know what should write after SLEPC_DIR and SLEPC_LIBS. Can any one help me?

I have one more question. I found other libraries might be used in oofem (i.e. ckit (CKIT_DIR), dl (DL_DIR), lapack (LAPACK_DIR), metis (METIS_DIR), parmetis (PARMETIS_DIR), x11 (X11_DIR), and vtk (VTK_DIR)). What are they? Do they necessary? When should I use them? Can any one give me a suggestion which of them I'd better install?

Thanks!

Re: How to install oofem with slepc and other libraries

SLEPC_LIBS is the generated value. SLEPC_DIR is the one you should enter if you have a local installation. It should be the folder that contains the "lib" and "include" subfolders of your SLEPC installation.

SLEPC depends on PETSc, so you probably need to specify the paths to that installation as well. I know most system installations of PETSc skips out on including the PKGCONFIG-file, which we use to find the dependencies when compiling OOFEM.

* CKIT, X11, are for OOFEG
* LAPACK is for lapack/blas support in FloatMatrix/FLoatArray (i.e. OOFEM becomes slightly faster).
* VTK is for *binary* VTU files (saves space for large outputs.
* METIS & PARMETIS is for the load balancing (distributed memory parallelism).

3 (edited by Zhang.Ji 04-04-2015 10:58:33)

Re: How to install oofem with slepc and other libraries

Mikael Öhman wrote:

SLEPC_LIBS is the generated value. SLEPC_DIR is the one you should enter if you have a local installation. It should be the folder that contains the "lib" and "include" subfolders of your SLEPC installation.

SLEPC depends on PETSc, so you probably need to specify the paths to that installation as well. I know most system installations of PETSc skips out on including the PKGCONFIG-file, which we use to find the dependencies when compiling OOFEM.

* CKIT, X11, are for OOFEG
* LAPACK is for lapack/blas support in FloatMatrix/FLoatArray (i.e. OOFEM becomes slightly faster).
* VTK is for *binary* VTU files (saves space for large outputs.
* METIS & PARMETIS is for the load balancing (distributed memory parallelism).

Hello Mikael,

Thank you very much for your reply.

Could I understand it as there is no need to install the METIS and PSRMETIS in a single machine?

When I was configured the OOFEM under cmake,  with:
SLEPC_DIR=/home/mrcandle/OOFEM/relatedcode/slepc-3.5.1/arch-linux2-c-debug.
And, automatically, it generates:
SLEPC_LIB=/home/mrcandle/OOFEM/relatedcode/slepc-3.5.1/arch-linux2-c-debug/lib/libslepc.so.
However, when I build it, it failure with the message:
/home/mrcandle/OOFEM/oofem/src/oofemlib/slepcsolver.h|42|fatal error: slepceps.h: No such file or directory.
The file named slepceps.h can be find from the path:
/home/mrcandle/OOFEM/relatedcode/slepc-3.5.1/include.

A list of slepc folder in a tree-like format can be find in the attachment.

I also googled information about PKGCONFIG-file, but I still donnot know how to build OOFEM with slepc.

Can you give me more help?
Thanks very much.

Re: How to install oofem with slepc and other libraries

That should be enough to find the headers.

All my advice is alwayds for the latest version from git. I cant keep track of what has changed (OOFEM is quite actively developed). I don't ever run the stable releases unless there are some user who submits a bug report.

In git, the CMakelist.txt contains this section on SLEPC

if (USE_SLEPC)
    if (SLEPC_DIR)
        find_library (SLEPC_LIBS slepc PATH "${SLEPC_DIR}/lib")
        include_directories ("${SLEPC_DIR}/include")
    else ()
        find_library (SLEPC_LIBS slepc)
    endif ()
    if (${SLEPC_LIBS} STREQUAL "SLEPC_LIBS-NOTFOUND")
        message (FATAL_ERROR "SLEPc library not found")
    endif ()
    list (APPEND EXT_LIBS ${SLEPC_LIBS})
    list (APPEND MODULE_LIST "slepc")
    set (USE_PETSC ON)
    add_definitions (-D__SLEPC_MODULE)
endif ()

where, if a directory is specified, the path to "${SLEPC_DIR}/include" is used.

5 (edited by Zhang.Ji 06-04-2015 13:21:44)

Re: How to install oofem with slepc and other libraries

Mikael Öhman wrote:

That should be enough to find the headers.

All my advice is alwayds for the latest version from git. I cant keep track of what has changed (OOFEM is quite actively developed). I don't ever run the stable releases unless there are some user who submits a bug report.

In git, the CMakelist.txt contains this section on SLEPC

if (USE_SLEPC)
    if (SLEPC_DIR)
        find_library (SLEPC_LIBS slepc PATH "${SLEPC_DIR}/lib")
        include_directories ("${SLEPC_DIR}/include")
    else ()
        find_library (SLEPC_LIBS slepc)
    endif ()
    if (${SLEPC_LIBS} STREQUAL "SLEPC_LIBS-NOTFOUND")
        message (FATAL_ERROR "SLEPc library not found")
    endif ()
    list (APPEND EXT_LIBS ${SLEPC_LIBS})
    list (APPEND MODULE_LIST "slepc")
    set (USE_PETSC ON)
    add_definitions (-D__SLEPC_MODULE)
endif ()

where, if a directory is specified, the path to "${SLEPC_DIR}/include" is used.


Hello,

Previously, I was forked erisve in the github. Now I change into Micket version (is it your version?). But I still cannot build it with slepc.

Further more, after I tried these days, I found oofem do not work with VTK-6.2.0 currently. I also tried VTK5.10.1 but did not work.

Now I configure OOFEM with following options:
USE_DSS USE_FM USE_IML USE_LAPACK USE_PETSC USE_OPENMP USE_SHARED_LIB USE_SM USE_TM

So can you tell me which version do you select. And could you tell me how to build with slepc?

Thank you.

Re: How to install oofem with slepc and other libraries

That's most certainly just because there is a missing
#include "dof.h"
somewhere in the code (for example, the IML solver), which I haven't discovered in the builds I typically do.
It should be a trivial fix.

Re: How to install oofem with slepc and other libraries

Mikael Öhman wrote:

That's most certainly just because there is a missing
#include "dof.h"
somewhere in the code (for example, the IML solver), which I haven't discovered in the builds I typically do.
It should be a trivial fix.

Hi,

Thank you very much for your reply. Moreover, I think, instead of use too much time to build OOFEM, I should do some thing useful.

Now I begin to read the codes. But I found that one latest feature of OOFEM for crack propagation has no example or any manual to illustrate how to employ it. I have post a new topic in the forum. If it is pleasure, could you check it?

Thank you very much, again. I can do noting using OOFEM without your help.

Re: How to install oofem with slepc and other libraries

There was a missing include in the dssmatrix, which is now fixed. It should work.
Unfortunately, SLEPc requires PETSc which requires MPI and all of that, so it's (unfortunately) by far the most complicated installation procedure out of all the dependencies in OOFEM (partly because of the massive dependencies of all the PETSc libraries).

It requires quite a bit of familiarity with the standard compilation procedures of open source / free software. We try to provide such a simple compilation procedure as possible, but with changes, and different version of all the external libraries, it's difficult to maintain.

Re: How to install oofem with slepc and other libraries

Hello, Mr. Zhang. I am trying oofem on Ubuntu these days. I believe that I have compile oofem with PETSc successfully on Ubuntu. However, I found it is difficult to do with slepc. I type it like as follows:
Export PETSC_DIR=/…/petsc-3.8.3
Export PETSC_ARCH=arch-linux2-c-debug
Export LD_LIBRARY_PATH=/…/arch-linux2-c-debug
Cmake –DUSE_PARALLEL=“ON” –DUSE_SLEPC=“ON” –DSLEPC_DIR=/…/slepc –DUSE_PETSC=“ON” –DMY_PETSC_DIR=/…/petsc-3.8.3 –DMY_PETSC_ARCH=arch-linux2-c-debug  oofem.git
make
It is a pity that it puts that"slepc lib not found".
can you help me?

Zhang.Ji wrote:

Hello all,

I'm try to install OOFEM in ubuntu 14.04. I can successfully build it with petsc. But I don't know how to build it with slepc. slepc is succefully build in my desktop now, and pass the default test. I DONOT know what should write after SLEPC_DIR and SLEPC_LIBS. Can any one help me?

I have one more question. I found other libraries might be used in oofem (i.e. ckit (CKIT_DIR), dl (DL_DIR), lapack (LAPACK_DIR), metis (METIS_DIR), parmetis (PARMETIS_DIR), x11 (X11_DIR), and vtk (VTK_DIR)). What are they? Do they necessary? When should I use them? Can any one give me a suggestion which of them I'd better install?

Thanks!

Re: How to install oofem with slepc and other libraries

Hi, what is the exact error you get?

11

Re: How to install oofem with slepc and other libraries

Hi, thank you for reporting.
I have committed a fix to the github repository, that allows to compile with SLEPc. I have used petsc-3.9.0 and corresponding slepc version.
Borek