'stxxl::resource_error' on exit

Dennis
2010-09-17
2013-04-25
  • Dennis
    Dennis
    2010-09-17

    Hi,

    I have a simple program that utilizes STXXLs vector. The output is as expected, but on exit of the main loop the following error comes up:

    terminate called after throwing an instance of 'stxxl::resource_error'
      what():  Error in function void stxxl::mutex::lock() pthread_mutex_lock(&_mutex) Invalid argument
    Aborted

    Since it seems to happen on exit of main loop, I am not sure of the reason for this problem.

    Best,
    Dennis

     
  • Do you use stxxl 1.3 (or SVN trunk rXXXX)? What OS/compiler/… do you use? What about a test program?

    Andreas

     
  • Dennis
    Dennis
    2011-01-14

    Sorry for the very late reply. I have nailed it down to declaring a stxxl::vector<unsigned> as a global object outside the main function:

    #include <iostream>
    #include <stxxl.h>
    stxxl::vector<unsigned> usedNodes;
    int main (int argc, char *argv[]) {
        std::cout << "nothing happens." << std::endl;
        return 0;
    }
    

    I am using stxxl 1.3, gcc version 4.4.5 on Ubuntu 10.10

     
  • this was fixed in 1.3.1