Opensim 3.0 from source - segfaults on some tests

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Sebastian Krapf
Posts: 8
Joined: Thu Oct 25, 2012 6:09 am

Opensim 3.0 from source - segfaults on some tests

Post by Sebastian Krapf » Thu Jan 10, 2013 3:23 pm

Dear all,

first of all thank you for making your software project freely available. I really appreciate this! I am new to opensim an so far I “use” the Windows GUI in a virtual machine on Linux. I have tried to utilize the precompiled Linux binaries, but experienced some undefined reference errors trying to compile the Tug_of_War code (ExampleMain). So I compiled SimTK and OpenSim from source. The SimTK installation worked fine, but after compiling Opensim some tests segfaulted

--------------------------------------------------------------------------------------------
89% tests passed, 5 tests failed out of 45

Total Test time (real) = 288.43 sec

The following tests FAILED:
12 - testMomentArms (SEGFAULT)
13 - testAssemblySolver (SEGFAULT)
25 - testModelCopy (SEGFAULT)
35 - testWrapping (SEGFAULT)
36 - testAnalyzeTutorialOne (SEGFAULT)
Errors while running CTest
------------------------------------------------------------------------------------------


Manually executing the failing executables resulted in

------------------------------------------------------------------------------------------
Exception:
Object: ERR- Could not open file arm26.osim. It may not exist or you don't
have permission to read it.
file= /home/sebastian/Desk/opensim/OpenSim-3.0.0-source/OpenSim/Common/Object.cpp
line= 114
--------------------------------------------------------------------------------------------

As far as I can see the files that could not be opened are available and I have permission to read them. I have some troubles, when I look into the cpp source to find what might be the problem, because I just started to learn cpp.

Could You please give me a hint where to look? How can I check whether this is a problem of the tests or of the installation?

Thank’s for your help and Best Regards

Sebastian

debian 6.0.6 stable
gcc version 4.4.5 (Debian 4.4.5-8)
liblapack-dev (Debian)
debian 7.0 wheezy
gcc version 4.7.2 (Debian 4.7.2-5)
liblapack-dev 3.4.1-6

User avatar
Kevin Xu
Posts: 9
Joined: Mon Jul 09, 2012 11:33 am

Re: Opensim 3.0 from source - segfaults on some tests

Post by Kevin Xu » Thu Jan 10, 2013 4:44 pm

Hi Sebastian,

When you run individual tests you would have to run them in the directory where files are. For example you would need to copy testWrapping executable into OpenSim/Tests/Wrapping in your build directory. If you can try that and let me know where the segfault occurs it'll be great.

Just for reference, our linux binaries were built on Ubuntu 12.04 with gcc version 4.6.3, and liblapack-dev 3.3.1-1.


Cheers,
Kevin

User avatar
Sebastian Krapf
Posts: 8
Joined: Thu Oct 25, 2012 6:09 am

Re: Opensim 3.0 from source - segfaults on some tests

Post by Sebastian Krapf » Tue Jan 15, 2013 1:06 pm

Hi Kevin,

thank's for Your fast reply and please excuse me taking such a long time. I have run all the executables in the according directories and I always get a cryptic:

USH��H��
USH��H��

Unforunately the err.log file in the directories where the files are is empty. Please find attached everything I have run.

Regards Sebastian

----------------------------------------------------------------

sebastian@kserv:~/Desk/opensim/build/OpenSim/Simulation/Test$ ../../../testMomentArms
Loaded model Both Legs with Muscles from file BothLegs22.osim
USH��H��
USH��H��
Speicherzugriffsfehler

----------------------------------------------------------------

sebastian@kserv:~/Desk/opensim/build/OpenSim/Simulation/Test$ ../../../testAssemblySolver
Loaded model PushUpToesOnGround from file PushUpToesOnGroundExactConstraints.osim
*********** Coordinates before initSystem ********************
Coordinate pelvis_rotation default value = -1.32442
Coordinate pelvis_tx default value = 0.75
Coordinate pelvis_ty default value = 0.355017
Coordinate back_rotation default value = 0
Coordinate hip_flexion_r default value = 0
Coordinate hip_flexion_l default value = 0
Coordinate knee_flexion_r default value = 0
Coordinate knee_flexion_l default value = 0
Coordinate ankle_plantarflexion_r default value = 0.246377
Coordinate ankle_plantarflexion_l default value = 0.246377
Coordinate shoulder_flexion_r default value = 1.32442
Coordinate shoulder_rotation_r default value = 0
Coordinate shoulder_flexion_l default value = 1.32442
Coordinate shoulder_rotation_l default value = 0
Coordinate elbow_flexion_r default value = 0
Coordinate elbow_flexion_l default value = 0
Coordinate pro_sup_r default value = 1.5708
Coordinate pro_sup_l default value = 1.5708
Coordinate wrist_flexion_r default value = -1.5708
Coordinate wrist_flexion_l default value = -1.5708
USH��H��
USH��H��
Speicherzugriffsfehler

----------------------------------------------------------------

sebastian@kserv:~/Desk/opensim/build/OpenSim/Tools/Test$ ../../../testModelCopy
Loaded model arm26 from file arm26.osim
defaultState:Y
Matrix 16 X 1 1-scalar entries:
0
0
0
0
0.050000000000000002776
0.10000000000000000555
0.050000000000000002776
0.10000000000000000555
0.050000000000000002776
0.10000000000000000555
0.050000000000000002776
0.10000000000000000555
0.050000000000000002776
0.10000000000000000555
0.050000000000000002776
0.10000000000000000555
defaultState:Z
Matrix 12 X 1 1-scalar entries:
0.050000000000000002776
0.10000000000000000555
0.050000000000000002776
0.10000000000000000555
0.050000000000000002776
0.10000000000000000555
0.050000000000000002776
0.10000000000000000555
0.050000000000000002776
0.10000000000000000555
0.050000000000000002776
0.10000000000000000555
Loaded model neck point constraint from file Neck3dof_point_constraint.osim
USH��H��
USH��H��
Speicherzugriffsfehler

----------------------------------------------------------------

sebastian@kserv:~/Desk/opensim/build/OpenSim/Tests/Wrapping$ ../../../testWrapping
Loaded model test_nowrap_vasint from file test_nowrap_vasint.osim
USH��H��
USH��H��
Speicherzugriffsfehler

----------------------------------------------------------------

sebastian@kserv:~/Desk/opensim/build/Applications/Analyze/test$ ../../../testAnalyzeTutorialOne
AbstractTool loading model 'BothLegs.osim'
Loaded model Both Legs with Muscles from file BothLegs.osim
No external loads will be applied (external loads file not specified).

Loading states from file plotterGeneratedStates.sto.
Storage: file=plotterGeneratedStates.sto (nr=100 nc=237)
Found 100 state vectors with time stamps ranging from 0 to 99.
Executing the analyses from 0 to 99...
USH��H��
USH��H��
Speicherzugriffsfehler
debian 7.0 wheezy
gcc version 4.7.2 (Debian 4.7.2-5)
liblapack-dev 3.4.1-6

User avatar
Kevin Xu
Posts: 9
Joined: Mon Jul 09, 2012 11:33 am

Re: Opensim 3.0 from source - segfaults on some tests

Post by Kevin Xu » Tue Jan 15, 2013 3:26 pm

Thanks for the info Sabastian. Did you build OpenSim source using the own lapack/blas libraries on your machine? In CMake when you build Simbody/OpenSim you would need to specify "lapack;blas" in the BUILD_USING_OTHER_LAPACK field. Let me know if that works for you.


Cheers,
Kevin

User avatar
Sebastian Krapf
Posts: 8
Joined: Thu Oct 25, 2012 6:09 am

Re: Opensim 3.0 from source - segfaults on some tests

Post by Sebastian Krapf » Wed Jan 16, 2013 5:03 am

" 100% tests passed, 0 tests failed out of 45"

Thank You Kevin!

I thought I did specify "lapack;blas" in all the installations, but it seems that I did not specify it in the BUILD_USING_OTHER_LAPACK field when I compiled SimBody. Recompileing both SimBody and OpenSim helped. Again thank's for your help!

Best Regards Sebastian
debian 7.0 wheezy
gcc version 4.7.2 (Debian 4.7.2-5)
liblapack-dev 3.4.1-6

User avatar
Sebastian Krapf
Posts: 8
Joined: Thu Oct 25, 2012 6:09 am

Re: Opensim 3.0 from source - segfaults on some tests

Post by Sebastian Krapf » Wed Jan 16, 2013 5:08 am

p.s. is there a way to mark this topic as solved?
debian 7.0 wheezy
gcc version 4.7.2 (Debian 4.7.2-5)
liblapack-dev 3.4.1-6

POST REPLY