Topic: Compilation with IML++ failes

Hi,
I want to compile OOFEM 2.2 with IML++ library. I configured make by use of ccmake iwth the following options:

BUILD_TESTING                    ON                                                                               
 CKIT_DIR                                                                                                          
 CMAKE_BUILD_TYPE                 Release                                                                          
 CMAKE_INSTALL_PREFIX             /usr/local                                                                       
 DL_LIB                           /usr/lib64/libdl.so                                                              
 ELIXIR_DIR                                                                                                        
 HOST_NAME                        linux.site                                                                       
 IML_DIR                          /home/bernath/Programme/oofem-2.2                                                
 LAPACK_DIR                                                                                                        
 MPI_DIR                                                                                                           
 MY_PETSC_ARCH                                                                                                     
 MY_PETSC_DIR                                                                                                      
 SLEPC_DIR                                                                                                         
 SPOOLES_DIR                                                                                                       
 TINYXML2_DIR                                                                                                      
 USE_CEMHYD                       OFF                                                                              
 USE_DSS                          ON                                                                               
 USE_FM                           ON                                                                               
 USE_IML                          ON                                                                               
 USE_LAPACK                       OFF                                                                              
 USE_OOFEG                        OFF                                                                              
 USE_OPENMP                       OFF                                                                              
 USE_PARALLEL                     OFF                                                                              
 USE_PARMETIS                     OFF                                                                              
 USE_PETSC                        OFF                                                                              
 USE_PYTHON_BINDINGS              OFF                                                                              
 USE_SHARED_LIB                   OFF                                                                              
 USE_SLEPC                        OFF                                                                              
 USE_SM                           ON                                                                               
 USE_SPOOLES                      OFF                                                                              
 USE_STATIC_LIB                   OFF                                                                              
 USE_TM                           ON                                                                               
 USE_TRIANGLE                     OFF                                                                              
 USE_VTK                          OFF                                                                              
 VTK_DIR                                                                                                           
 X11_DIR                           

After generating the make files I start the compilation and when it reaches 42% it crashes. Actually this is the moment when it comes to compilation of the IML library. The error reads:

Scanning dependencies of target core
[ 40%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iml/dyncomprow.C.o
[ 40%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iml/dyncompcol.C.o
[ 40%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iml/symcompcol.C.o
[ 40%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iml/compcol.C.o
[ 41%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iml/precond.C.o
[ 41%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iml/voidprecond.C.o
[ 41%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iml/icprecond.C.o
[ 41%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iml/iluprecond.C.o
[ 42%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iml/ilucomprowprecond.C.o
[ 42%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iml/diagpre.C.o
[ 42%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iml/imlsolver.C.o
In file included from /home/bernath/Programme/oofem-2.2/src/oofemlib/iml/imlsolver.C:56:0:
/home/bernath/Programme/oofem-2.2/iml/gmres.h: In instantiation of ‘int GMRES(const Operator&, Vector&, const Vector&, const Preconditioner&, Matrix&, int&, int&, Real&) [with Operator = oofem::SparseMtrx; Vector = oofem::FloatArray; Preconditioner = oofem::Preconditioner; Matrix = oofem::FloatMatrix; Real = double]’:
/home/bernath/Programme/oofem-2.2/src/oofemlib/iml/imlsolver.C:186:63:   required from here
/home/bernath/Programme/oofem-2.2/iml/gmres.h:90:9: error: ‘ApplyPlaneRotation’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from /home/bernath/Programme/oofem-2.2/src/oofemlib/iml/imlsolver.C:56:0:
/home/bernath/Programme/oofem-2.2/iml/gmres.h:143:6: note: ‘template<class Real> void ApplyPlaneRotation(Real&, Real&, Real&, Real&)’ declared here, later in the translation unit
In file included from /home/bernath/Programme/oofem-2.2/src/oofemlib/iml/imlsolver.C:56:0:
/home/bernath/Programme/oofem-2.2/iml/gmres.h:92:7: error: ‘GeneratePlaneRotation’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from /home/bernath/Programme/oofem-2.2/src/oofemlib/iml/imlsolver.C:56:0:
/home/bernath/Programme/oofem-2.2/iml/gmres.h:125:6: note: ‘template<class Real> void GeneratePlaneRotation(Real&, Real&, Real&, Real&)’ declared here, later in the translation unit
In file included from /home/bernath/Programme/oofem-2.2/src/oofemlib/iml/imlsolver.C:56:0:
/home/bernath/Programme/oofem-2.2/iml/gmres.h:93:7: error: ‘ApplyPlaneRotation’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from /home/bernath/Programme/oofem-2.2/src/oofemlib/iml/imlsolver.C:56:0:
/home/bernath/Programme/oofem-2.2/iml/gmres.h:143:6: note: ‘template<class Real> void ApplyPlaneRotation(Real&, Real&, Real&, Real&)’ declared here, later in the translation unit
In file included from /home/bernath/Programme/oofem-2.2/src/oofemlib/iml/imlsolver.C:56:0:
/home/bernath/Programme/oofem-2.2/iml/gmres.h:94:7: error: ‘ApplyPlaneRotation’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from /home/bernath/Programme/oofem-2.2/src/oofemlib/iml/imlsolver.C:56:0:
/home/bernath/Programme/oofem-2.2/iml/gmres.h:143:6: note: ‘template<class Real> void ApplyPlaneRotation(Real&, Real&, Real&, Real&)’ declared here, later in the translation unit
make[2]: *** [src/oofemlib/CMakeFiles/core.dir/iml/imlsolver.C.o] Fehler 1
make[1]: *** [src/oofemlib/CMakeFiles/core.dir/all] Fehler 2
make: *** [all] Fehler 2
bernath@linux:~/build/release> ccmake ~/Programme/oofem-2.2/

I looked up those two missing functions and I did find them in the corresponding header file. So what is the problem here?
I also downloaded the h-Files from the IML website and linked them in ccmake but that didn't change anything.

Thanks in advance!
Alex

Re: Compilation with IML++ failes

Hi Alex.

It is indeed a bug in the 2.2 release. I never noticed it myself, because I've found the IML solvers very lacking in performance compared to PETSc.
If you run simulations of less than ~50 thousand equations I think you'll find that running PETSc with some external package with a Cholesky solver is the fastest. PETSc also has all the iterative solvers your could imagine (with parallel support).

If you must have IML, it should work if you grab the gmres.h file from the development version (I don't have any problems compilatng with IML support from GIT at least, and I think that is the faulty file).
http://www.oofem.org/gitweb/?p=oofem.gi … .h;hb=HEAD
I think that is all you need to do.

(Borek, could you verify this works for you and upload a fixed 2.2 release on the homepage?)

Re: Compilation with IML++ failes

Hi Mikael,
actually I was thinking about IML because I thought this would give a nice boost in performance smile
At the moment I have ~57000 equations. Since I already achieved a nice speedup by using direct solver (DSS) the performance issue isn't that import anymore but I will give it a try.
Is there a reason for low performance of PETSc when there are more than 50 thousand of equations?

Thanks, Alex

Re: Compilation with IML++ failes

Somewhere around 50k-100k equations the direct factorizations begin to grow in time a lot, but the exact limit depends on the system itself (primarily its bandwidth). For a well banded problem, the limit should be higher. Basically it's the so called "fill-in" problem you have to worry about (the factorization is dense up to the bandwidth of your problem).
It has nothing specific to do with PETSc.

I think you'll find that a direct solver from PETSc is going to speed up your simulations a bit compared to the DSS solver.
You have a table of options here:
http://www.mcs.anl.gov/petsc/documentat … table.html
CHOLMOD and MUMPS are popular packages for Cholesky factorization.
The big advantage is that you could run these in parallel as well.