Topic: questions on slepc

Hi, everyone. 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 anyone help me?

Besides, found that it works really quicker with petsc than oofem with dss on Ubuntu. But I found that it works quick than windows only when it compiled and installed. When I poweroff Ubuntu and turn it on  again, I found it works slower than it on windows. In fact, I build it on the VMware Workstation, not real Ubuntu. Is this the reason?

2

Re: questions on slepc

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

Re: questions on slepc

Hi, Borek.I am sorry and busy on other things these days. I am so glad that you can help me, but do you mean that you have put it on https://github.com/oofem/oofem? Well, I have difficulty on installing oofem with it. You see, it seems that I have not installed it right?could you please help me.

bp wrote:

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

4

Re: questions on slepc

HI,
yes, the fix is on github repository (https://github.com/oofem/oofem). It is fixing the cmake problem when SLEPC_DIR is provided, but cmake fails due to slepc libs not found.  So your installation of petsc and slepc libraries is probably ok, the problem was on oofem cmake side.
Borek

Re: questions on slepc

Hi, thank you very much. I found that I miss installation of MPI. And I have install with SLEPC, it seems success. However, it puts like follows:
____________________________________________________
           OOFEM - Finite Element Solver
        Copyright (C) 1994-2017 Borek Patzak
____________________________________________________
Assembling stiffness and mass matrices
Solving ...
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Shift-and-invert requires a target 'which' (see EPSSetWhichEigenpairs), for instance -st_type sinvert -eps_target 0 -eps_target_magnitude
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.8.4, Mar, 24, 2018
[0]PETSC ERROR: ./oofem on a arch-linux2-c-debug named ubuntu by satoshi Tue Apr 24 11:29:56 2018
[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack
[0]PETSC ERROR: #1 EPSSetUp() line 272 in /home/satoshi/Documents/slepc-3.8.3/src/eps/interface/epssetup.c
[0]PETSC ERROR: #2 EPSSolve() line 135 in /home/satoshi/Documents/slepc-3.8.3/src/eps/interface/epssolve.c
[0]PETSC ERROR: #3 solve() line 154 in /home/satoshi/Documents/oofem.git/src/oofemlib/slepcsolver.C
EngngModel info: user time consumed by solution step 5: 1.52s


ANALYSIS FINISHED


Real time consumed: 000h:00m:01s
User time consumed: 000h:00m:01s
Total 0 error(s) and 0 warning(s) reported
By the way, it goes all right with PETSc. So what can I do to deal with it? Could you please tell me.

bp wrote:

HI,
yes, the fix is on github repository (https://github.com/oofem/oofem). It is fixing the cmake problem when SLEPC_DIR is provided, but cmake fails due to slepc libs not found.  So your installation of petsc and slepc libraries is probably ok, the problem was on oofem cmake side.
Borek

6

Re: questions on slepc

Hi,
the answer is in the output. The default slepc solver (Shift-and-invert) requires following options: -st_type sinvert -eps_target 0 -eps_target_magnitude. You can pass them in the command line, when executing oofem, so for example:

oofem -f input.in -st_type sinvert -eps_target 0 -eps_target_magnitude

For more command line options allowing to fine tune slepc, please refer to slepc documentation.
Borek

Re: questions on slepc

Thank you very mush, Mr. Patzak.It works now.However, I still feel confused about the results I get.I run oofem on windows and Ubuntu, but I get the different results. As you can see as follows:
on Windows,it puts,
Eigen Values (Omega^2) are:
-----------------
2.98316123e+06  9.99849540e+06  9.99849540e+06  1.90058007e+07  6.62352588e+07
however, on Ubuntu with SLEPc, it puts,
Eigen Values (Omega^2) are:
-----------------
1.63646667e+08  1.47355085e+08  8.24496496e+07  7.68442649e+07  6.62352549e+07
on Ubuntu without SLEPc, it puts,
Eigen Values (Omega^2) are:
-----------------
2.98316123e+06  9.99849540e+06  9.99849540e+06  1.90058007e+07  6.62352588e+07
Should I do something to control the precision of the SLEPc solver?

bp wrote:

Hi,
the answer is in the output. The default slepc solver (Shift-and-invert) requires following options: -st_type sinvert -eps_target 0 -eps_target_magnitude. You can pass them in the command line, when executing oofem, so for example:

oofem -f input.in -st_type sinvert -eps_target 0 -eps_target_magnitude

For more command line options allowing to fine tune slepc, please refer to slepc documentation.
Borek

8

Re: questions on slepc

Hi,
what I can see is that slepc solver does not sort the eigenvalues (and probably does not compute the lowest ones), Slepc is large library with many options and you should consult slepc documentation on how to select tolerance, problem type, etc.
Some useful links to slepc doc:
http://slepc.upv.es/documentation/curre … eTest.html
http://slepc.upv.es/documentation/curre … mType.html
http://slepc.upv.es/documentation/curre … pairs.html

Borek

Re: questions on slepc

Thank you. I got it. It seems a little difficult for me. But I will try my best. Have a nice day, Borek.

10

Re: questions on slepc

Hi,
perhaps I did not mention one important thing: all the tuning of slepc can be done using command line options when running oofem, so on the slepc documentation pages look for "Database Keys options".
Also, there was a bug in the slepc interface code that I have fixed recently (thanks to your post, when trying to get slepc working). This fix is on github repository, so I recommend to get the latest version from github.
Borek

Re: questions on slepc

I got it and all things goes well after your instructions. Thank you for your hard work, Mr. Patzak. You give me the sunshine on the way of my research. Best wishes to you.