<h3>lac</h3>
<ol>
+ <li> <p>Fixed: The <code class="member">SparseDirectMA27</code> class allows
+ to run the sparse direct solver as a separate program (the
+ <code>detached_ma27</code> program) rather than as part of the current
+ program in order to be able to run several instances of it in parallel
+ during multithreaded computations. However, the destructor of the <code
+ class="member">SparseDirectMA27</code> class had a bug that when using
+ this detached mode led to a segmentation fault. This is now fixed.
+ <br>
+ (WB 2007/02/09)
+ </p>
+
<li> <p>Improved: A simple <code class="member">print_formatted</code>
function has been added to <code class="class">SparseMatrixEZ</code>.
<br>
// $Id$
// Version: $Name$
//
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
void remove_history (const pid_t &child_pid)
{
Threads::ThreadMutex::ScopedLock lock (list_access_lock);
- for (std::list<Record>::iterator i=communication_log.begin();
- i!=communication_log.end(); ++i)
- if (i->child_pid == child_pid)
- communication_log.erase (i);
+
+ // go through the list of records and
+ // delete those that correspond to the
+ // current pid. note that list::erase
+ // invalidates iterators, so we have to
+ // re-initialize them each time we move
+ // from one to the next
+ unsigned int index=0;
+ while (index < communication_log.size())
+ {
+ std::list<Record>::iterator i = communication_log.begin();
+ std::advance (i, index);
+
+ if (i->child_pid == child_pid)
+ communication_log.erase (i);
+ else
+ ++index;
+ }
}
}
// next close down client
Threads::ThreadMutex::ScopedLock lock (detached_mode_data->mutex);
write (detached_mode_data->server_client_pipe[1], "7", 1);
-
+
// then also delete data
delete detached_mode_data;
detached_mode_data = 0;
- };
+ }
}