1 (edited by hchen 02-04-2014 14:33:19)

Topic: Ctest fails when quick installation

Hi Guys:

I am pretty new to linux system and oofem.
I follow http://www.oofem.org/wiki/doku.php?id=installation first to do a quick installation to see if it can work.

It seems that the installation is ok but when I use ctest to test the examples, 54 fails...

The log file is attached. It seems that most of them are due to the reason that can not construct the engineering model..

And when I want to test manually, I type:

oofem -f path_to_test_file

It says command not found.

Anybody can help me? Thanks in advance!

Post's attachments

LastTest.log 317.33 kb, 5 downloads since 2014-04-02 

You don't have the permssions to download the attachments of this post.

2

Re: Ctest fails when quick installation

Hi Hao,

it seems that you have not configured tm module. Could you check if it has been enabled when running cmake?
If you are not able to run oofem command from the directory containing oofem executable, then you have to add "." (the current directory) to your PATH, or you can simply invoke oofem by specifying the full path to oofem executable.
So, for example if you are already in a directory contatining oofem:

./oofem -f input

Borek

3 (edited by hchen 02-04-2014 15:37:29)

Re: Ctest fails when quick installation

Hi Borek:

Thanks for your reply!

I tried ./oofem , and works well.

When I executed the tm input file in the tm module, it does not work. So I suppose that is because of the tm module.

How can I check that module is configured or not?

I rerun cmake and it just says configuration done....

Hao

4

Re: Ctest fails when quick installation

Hi Hao,

you can try to run

./oofem -v

and you should get oofem version printed with the list of compiled modules.

Re: Ctest fails when quick installation

Hi Borek:

I got it as:



OOFEM version 2.3 (x86_64-Linux, fm;tm;sm)
of Apr  2 2014 on hchen

Copyright (C) 1994-2014 Borek Patzak
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



Does it mean tm has been compiled?

Hao

6

Re: Ctest fails when quick installation

Hi,
yes, this means that tm has been compiled. Seems that the problem is in the compilation phase. Could you report, what is your compiler and cmake versions?

Re: Ctest fails when quick installation

Hi

My compiler is gcc 4.6.3, cmake version is cmake 2.8.7

Hao

Re: Ctest fails when quick installation

From the test log, the error is definitely is because the components from the TM module isn't included in the ClassFactory.
The symptoms are definitely as if the TM module was excluded from the build.

Did you do set any settings in the configuration step (cmake)?
Any suspicious warnings during build?
Did you for example see that "stationaryproblem" was part of the build and link process?

You can run

make clean
make VERBOSE=1 > buildlog.txt

and attach the buildlog.txt file

9

Re: Ctest fails when quick installation

I just checked that the version 2.3 used by Hao works. I fortunately have the same versions of gcc and cmake, and I can confirm that the problem is not there.  I agree that there is something wrong with tm, however Hao reported that "oofem -v"  reports tm - which somehow could indicate that tm module was included. I would rather guess a linker problem.

Re: Ctest fails when quick installation

Hi:

My linux system does not work so I just reinstall the system.

Then I try again but it is exactly the same problem. In the configuration step it says Doxygen is not found, others are ok.
In the make step I can not see any problem...

So I run the command as Mikael said:

make clean
make VERBOSE=1 > buildlog.txt

The buildlog.txt is attached.

I am wondering if it is due to I do not install some prerequisite softwares?

Thanks!

Hao

Post's attachments

buildlog.txt 320.51 kb, 7 downloads since 2014-04-02 

You don't have the permssions to download the attachments of this post.

11

Re: Ctest fails when quick installation

Hi Hao,
seems that the support for cmake 2.8.7 and lower is broken. I wrongly reported that it worked for me with cmake 2.8.7. I have it but for the configuration I have used the newer one. The solution is to install the newer version of cmake (from a package or from the sources (www.cmake.org)). This will fix the problem.

Re: Ctest fails when quick installation

Hi Borek:

Thanks! It works and no tests failed!

So next maybe I can start to build the released version and start some simple calculation?

What does '' compiling the targets '' mean?

Hao

13

Re: Ctest fails when quick installation

Hi,
you can configure different targets in separate directories, simply by adjusting the cmake settings. So for example, You can build Debug or Release version of the code by adjusting CMAKE_BUILD_TYPE, or compile oofem with additional libraries.
Borek

Re: Ctest fails when quick installation

For testing out simulations and input files, use the Debug-build (which is default). It checks much more things and gives better warning and error messages if there are something wrong.
For running real simulations, you should always run through the Release-build, as it will be magnitudes faster.
Running ccmake when you configure opens up a console menu with all the options you can set.
Depending on the simulations, it can be very benifitial to compile with PETSc (+ some solvers), LAPACK, and OpenMP.

See the *.in files under oofem-2.3/tests/  for examples.



I'm still not sure how the linking failed with 2.8.7, it looks like it would be alright from the log.

15

Re: Ctest fails when quick installation

Mikael,
I was able to replicate the problem exactly. No error during compilation or linking. However, it seems that the tm module engineerng models and perhaps other component are not registered at the class factory properly. No idea what could be a problem.
Borek

16 (edited by hchen 03-04-2014 17:20:32)

Re: Ctest fails when quick installation

Hi:

Thanks guys.

Basically there is no problem with the serial version of oofem.
But when I compile oofem with petsc and openmpi to do the parallel computation, no error in configuration and build I think but all the paratests fail...
Do I misunderstand something or...
The log file of the build is attached.

when type './oofem' it looks like:

[hchen:10378] *** Process received signal ***
[hchen:10378] Signal: Segmentation fault (11)
[hchen:10378] Signal code: Address not mapped (1)
[hchen:10378] Failing at address: 0x44000098
[hchen:10378] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x36ff0)[0x7f152010eff0]
[hchen:10378] [ 1] /usr/local/lib/libmpi.so.1(MPI_Comm_rank+0x46)[0x7f1520a135e6]
[hchen:10378] [ 2] ./oofem(main+0x130)[0x403369]
[hchen:10378] [ 3] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f15200f9de5]
[hchen:10378] [ 4] ./oofem[0x403139]
[hchen:10378] *** End of error message ***
Segmentation fault (core dumped)


Hao

Post's attachments

log 33.97 kb, 1 downloads since 2014-04-03 

You don't have the permssions to download the attachments of this post.

17

Re: Ctest fails when quick installation

Please read related topic here: http://www.oofem.org/forum/viewtopic.php?id=1403

Re: Ctest fails when quick installation

But just running oofem without any arguments should be OK (it should print the options).

Hao, could you try out running it through valgrind? It might give some more useful information.
valgrind --track-origins=yes --leak-check=full ./oofem

Re: Ctest fails when quick installation

I tried running it through valgrind. There are some errors detected I think. The log is attached.

Post's attachments

log 358.73 kb, 4 downloads since 2014-04-03 

You don't have the permssions to download the attachments of this post.

Re: Ctest fails when quick installation

The lost blocks valgrind reports on is probably just due to the premature exit of OOFEM.
This

==18322== Invalid read of size 1
==18322==    at 0x6F025E6: PMPI_Comm_rank (in /usr/local/lib/libmpi.so.1.5.0)
==18322==    by 0x403368: main (main.C:111)
==18322==  Address 0x44000098 is not stack'd, malloc'd or (recently) free'd

is probably the only thing we need to care about.

It is during this functioncall that the program crashes.
I would suspect there is something wrong with the MPI installation.
Can you check to see if the minimal PETSc examples are working?


For running parallel simulations, you need to start oofem through mpirun, so, just in case, you can try to see if this works

mpirun -np 1 ./oofem

21 (edited by hchen 04-04-2014 10:48:16)

Re: Ctest fails when quick installation

Hi Mikael:

After I installed the PETSc, I test the inside examples and it shows ok.

Running test examples to verify correct installation
Using PETSC_DIR=/home/hchen/petsc-3.4.4 and PETSC_ARCH=arch-linux2-c-debug
C/C++ example src/snes/examples/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/examples/tutorials/ex19 run successfully with 2 MPI processes
Fortran example src/snes/examples/tutorials/ex5f run successfully with 1 MPI process
Completed test examples

However when I installed the PETSc, I used the recommended command:

./configure --with-cc=gcc --with-fc=gfortran --download-f-blas-lapack --download-mpich

Probably it means PETSc uses mpich?

And when I compiled oofem in parallel, I use openmpi-1.8 because I did not find the library of mpich.
Is it the possible reason?

When I run

mpirun -np 1 ./oofem

It showed the same:

[hchen:04737] *** Process received signal ***
[hchen:04737] Signal: Segmentation fault (11)
[hchen:04737] Signal code: Address not mapped (1)
[hchen:04737] Failing at address: 0x44000098
[hchen:04737] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x36ff0)[0x7f829b915ff0]
[hchen:04737] [ 1] /usr/local/lib/libmpi.so.1(MPI_Comm_rank+0x46)[0x7f829c21a5e6]
[hchen:04737] [ 2] ./oofem(main+0x130)[0x403369]
[hchen:04737] [ 3] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f829b900de5]
[hchen:04737] [ 4] ./oofem[0x403139]
[hchen:04737] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 4737 on node hchen exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------

Hao

22

Re: Ctest fails when quick installation

Hi Hao,

this could be potential problem. Basically, you should link only with one mpi library. I would therefore recommend to install and compile mpich library independently first or you can reuse your open-mpi installation, and then configure PETSc to use it

./configure .....  --with-mpi-dir=/usr/local/mpich

and the same library should be used to setup oofem by adjusting MPI_DIR variable.

Re: Ctest fails when quick installation

I think this definitely is the problem. You should definitely use the exact same MPI-library for PETSc as you do for OOFEM.
I have never actually had the need to manually install MPI when compiling PETSc. I've always relied on it detecting whatever was installed on the system. What happens if you simply try to compile PETSc without "--download-mpich"

Re: Ctest fails when quick installation

Hi Mikael and Borek:

I tried to compile Petsc and oofem with same openmpi library, I think it is ok!

But when I do the parallel test, there is 3 tests failed. seems due to ParMETIS support not compiled...

Is this ParMETIS used to decompose the mesh domain? Other tests passed because the domain is already decomposed before parallel running?
I am not sure if it is introduced in the manual since I am still reading it...

Thanks again for your help!

Hao

Re: Ctest fails when quick installation

It is expected that these fail if one hasn't compiled support for parmetis. Those tests are for load balancing during simulations.
In the future, it might be possible to obtain automatic decomposition using this, but it's currently not quite possible to use it in that way.