StateTest fails after compiling simtkcommon

SimTKcore exists as a separate project to provide 'one stop shopping' for SimTK Core software and support, although the software is actually developed as a set of interdependent projects. SimTK 1.0 was released in March 2008, SimTK 2.0 in December, 2009.
POST REPLY
User avatar
rob rein
Posts: 11
Joined: Thu May 29, 2008 6:13 am

StateTest fails after compiling simtkcommon

Post by rob rein » Thu Sep 25, 2008 12:50 am

Hello Guys,

After a while, I tried again to compile SimTK without using Cygwin with straight MinGW. Simtkcommon compiles fine only the test for StateTest fails but only with the shared library. All other tests pass.

I get the following message:

$ StateTest
==> SimTKcommon library version: 0.6.3
SimTK_about_SimTKcommon():
about(version)='0.6.3'
about(library)='SimTKcommon'
about(type)='shared'
about(debug)='debug'
about(authors)='Michael.Sherman'
about(copyright)='Copyright (c) 2005-7 Stanford University, Michael.Sherman'
about(svn_revision)=''
*** STATE TEST EXCEPTION
SimTK Exception thrown at Enumeration.h:246:
Internal SimTK bug detected: Indices must be consecutive ints starting from 0. (Assertion 'index == updAllValues().size()' failed). Please report this to the appropriate authorities at SimTK.org.
***

Afterwards I tried to compile Cpodes anyway, which compiles fine with passing all test. However compiling simmath does not compile with the following error:

simmath/Ipopt/IpLapackSolverInterface.cpp: In member function `virtual Ipopt::ESymSolverStatus Ipopt::LapackSolverInterface::MultiSol ve(bool, const Ipopt::Index*, const Ipopt::Index*, Ipopt::Index, double*, bool, Ipopt::Index)':
simmath/Ipopt/IpLapackSolverInterface.cpp:105: error: cannot convert `double' to `double*' for argument `9' to `void dgelsd_(const in t&, const int&, const int&, double*, const int&, double*, const int&, double*, double*, int*, double*, const int&, int*, int&)'
simmath/Ipopt/IpLapackSolverInterface.cpp:109: error: cannot convert `double' to `double*' for argument `9' to `void dgelsd_(const in t&, const int&, const int&, double*, const int&, double*, const int&, double*, double*, int*, double*, const int&, int*, int&)'
make[2]: *** [staticTarget/CMakeFiles/SimTKmath_static_d.dir/__/Ipopt/IpLapackSolverInterface.obj] Error 1
make[1]: *** [staticTarget/CMakeFiles/SimTKmath_static_d.dir/all] Error 2

The according parts in the source files are:

IpLapackSolverInterface.cpp: line 105:

dgelsd_( n, n, nrhs, atmp, n, rhs_vals, n, s, rcond, rank, workSize,
-1, iwork, info );
lwork = (int)workSize[0];
work = new double[lwork];
dgelsd_( n, n, nrhs, atmp, n, rhs_vals, n, s, rcond, rank, work,
lwork, iwork, info );

With the according function declaration in SimTKlapack.h: line 1094:

extern void dgelsd_(SimTK_FDIM_(m), SimTK_FDIM_(n), SimTK_FDIM_(nrhs), double *a, SimTK_FDIM_(lda), double *b, SimTK_FDIM_(ldb), double *s, double *rcond, int *rank, double *work, SimTK_FDIM_(lwork), int *iwork, SimTK_INFO_);

The function declaration and the call seem not to match as rcond is defined as:
double rcond = -1.0;

All sources were downloaded via svn from the trunk just a couple of days ago.
Any advice would be appreciated.

Cheers
Robert

User avatar
Jack Middleton
Posts: 11
Joined: Thu Mar 31, 2005 11:55 am

RE: StateTest fails after compiling simtkcomm

Post by Jack Middleton » Mon Sep 29, 2008 2:34 pm

Hi Robert,

It looks like the SimTKlapack.h you are using is out of date. This is explained in the Cygwin section of the Wiki:

"2) Install the SimTKlapack.h from the SimTKlapack project download page and place it in the core/include directory. (The SimTKlapack.h in the cpu specific self extracting zip files are out of date)"


Jack

User avatar
Jack Middleton
Posts: 11
Joined: Thu Mar 31, 2005 11:55 am

RE: StateTest fails after compiling simtkcomm

Post by Jack Middleton » Mon Sep 29, 2008 2:40 pm

Hi Rob,

I forgot to mention that updating the SimTKlapack.h should fix the compile error in simmath. However, it may not fix the failures in StateTest. We have not tried to compile SimTK on Cygwin yet.

Jack

User avatar
rob rein
Posts: 11
Joined: Thu May 29, 2008 6:13 am

RE: StateTest fails after compiling simtkcomm

Post by rob rein » Tue Sep 30, 2008 8:06 am

Hi Jack,

Thanks for the reply.
Yeah, you were right. I though that I already updated SimTKLapack.h but obviously I didn't.
Simmath compiles now fine passing all tests except for those which depend on the State routines yielding the same exception being thrown like during simtkcommon tests.

I'll try to get the whole SimTKcore package compiled anyway.

By the way, I asked this question before, but is there any interest to add full support for MinGW to SimTK. MinGW has the great advantage that one can use Eclipse/CDT, which is far superior to Visual Studio, to build Win apps. Further, with a little luck GCC 4.3.2 for MinGW with full OpenMP-support is going to be released soon. On top of that with MinGW, the GPL version of Trolltech-QT is available on Windows. Thus, enabling easy cross-compiling capabilities for all three major platform. I would be happy to contribute what little knowledge I have. It looks like only some minor modifications to the CMakeFiles are necessary anyway.

Cheers
Robert

User avatar
Jack Middleton
Posts: 11
Joined: Thu Mar 31, 2005 11:55 am

RE: StateTest fails after compiling simtkcomm

Post by Jack Middleton » Tue Sep 30, 2008 8:49 am

Hi Rob,

Currently we do not have any plans to do a MinGW release for SimTK. It would depend on how many users we thought would use it. The GCC 4.3.2 on MinGW is encouraging.

Jack

User avatar
rob rein
Posts: 11
Joined: Thu May 29, 2008 6:13 am

RE: StateTest fails after compiling simtkcomm

Post by rob rein » Thu Oct 02, 2008 10:30 am

Hi Jack,

Just to finish up on the thread.
After more trouble than I was hoping for I've managed to compile the core libs under MinGW. However, still only the static versions which is quite annoying in terms of compile times.
I updated to GCC 4.2.1 which didn't yield any improvements in terms of the StateTest exception.

Cheers
Rob

POST REPLY