From: wolf Date: Thu, 3 Oct 2002 16:21:17 +0000 (+0000) Subject: Fix obvious bugs. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1898dbe3a99301f9ee5b0f34a695348bbf06b701;p=dealii-svn.git Fix obvious bugs. git-svn-id: https://svn.dealii.org/trunk@6599 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/contrib/hsl/source/detached_ma27.cc b/deal.II/contrib/hsl/source/detached_ma27.cc index 96d79d5ef3..17e13e2b78 100644 --- a/deal.II/contrib/hsl/source/detached_ma27.cc +++ b/deal.II/contrib/hsl/source/detached_ma27.cc @@ -162,8 +162,8 @@ void put (const T *t, const size_t N, const char *debug_info) // is not interrupted int ret; do - ret = write (1, reinterpret_cast (t), - sizeof(T) * N); + ret = write (1, reinterpret_cast (t) + count, + sizeof(T) * N - count); while ((ret<0) && (errno==EINTR)); if (ret < 0) die ("error on client side in 'put'", ret, errno); diff --git a/deal.II/lac/source/sparse_direct.cc b/deal.II/lac/source/sparse_direct.cc index e789a5b3ee..90208928da 100644 --- a/deal.II/lac/source/sparse_direct.cc +++ b/deal.II/lac/source/sparse_direct.cc @@ -239,6 +239,7 @@ namespace CommunicationsLog void list_communication () { + sleep (random()%4); // make sure only one thread is // writing out at a time static Threads::ThreadMutex write_lock; @@ -308,8 +309,6 @@ void monitor_child_liveness (const pid_t child_pid) { while (true) { - std::cerr << "+++ monitoring child " << child_pid << std::endl; - int ret = kill (child_pid, 0); if (ret != 0) if ((ret == -1) && (errno == ESRCH)) @@ -370,8 +369,8 @@ struct SparseDirectMA27::DetachedModeData int ret; do ret = write (server_client_pipe[1], - reinterpret_cast (t), - sizeof(T) * N); + reinterpret_cast (t) + count, + sizeof(T) * N - count); while ((ret<0) && (errno==EINTR)); if (ret < 0) die ("error on client side in 'put'", ret, errno);