[Trilinos-Users] Teuchos::ParameterList error

홍광우 yuriprime at kaist.ac.kr
Thu May 8 02:50:51 MDT 2014

Dear Trilinos developers and users,

Hello, I have a problem when I use Teuchos::ParameterList. I'm with Trilinos version 11.4.3.

The problem is like this. For example,

int main(){
    Teuchos::ParameterList* parameters = new Teuchos::ParametersList();

    Class* class = new Class(parameters);

Class::Class(Teuchos::ParameterList* parameters){

    parameters->sublist("sublist").set("p1", 1);

    cout << *parameters << endl; ------------ (1)
    cout << parameters->sublist("sublist").get<int>("p1") << endl; ------------ (2)

When I cout (1), the result is

sublist ->
 p1 = 1  [unused]

However, when I cout (2), the error occurs as the following.

terminate called after throwing an instance of 'Teuchos::StringIndexedOrderedValueObjectContainerBase::InvalidOrdinalIndexError'
  what():  /usr/local/include/Teuchos_StringIndexedOrderedValueObjectContainer.hpp:534:

Throw number = 1

Throw test that evaluated to true: !key_and_obj.isActive()

Error, the ordinal index 0 is invalid because the object has been deleted!

Does anyone know what the problem is? Please help me.


Kwangwoo Hong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20140508/8622a5d8/attachment.html>

More information about the Trilinos-Users mailing list