Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #4094

Re: client-server parallellised number crunching

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <debatem1@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.013
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'avoiding': 0.05; 'python?': 0.07; 'python': 0.07; 'can.': 0.09; 'hosts': 0.09; 'libraries.': 0.09; 'tasks,': 0.09; 'pm,': 0.11; 'examples': 0.12; 'output': 0.12; 'wrote:': 0.14; '4-5': 0.16; 'chaos': 0.16; 'solver': 0.16; 'subject:server': 0.16; '\xa0what': 0.16; 'libraries': 0.16; 'protocol': 0.16; 'fine': 0.18; 'input': 0.18; 'tue,': 0.20; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.20; 'work,': 0.20; 'seems': 0.21; 'header:In-Reply-To:1': 0.22; 'cc:addr:python-list': 0.22; 'connections': 0.22; 'objects': 0.24; 'wonder': 0.24; 'somebody': 0.25; 'detect': 0.25; 'expect': 0.26; 'tasks': 0.26; 'tried': 0.27; 'message-id:@mail.gmail.com': 0.28; "doesn't": 0.28; 'remote': 0.28; 'server': 0.29; 'note,': 0.29; 'probably': 0.30; 'least': 0.30; 'comment': 0.30; 'cc:addr:python.org': 0.31; 'effectively.': 0.31; 'queue': 0.31; 'seemingly': 0.31; 'threads.': 0.31; 'trick': 0.31; 'does': 0.31; "can't": 0.31; 'anyone': 0.31; '...': 0.32; 'things': 0.33; 'using': 0.34; 'apply': 0.34; 'got': 0.34; 'there': 0.35; 'overhead': 0.35; 'received:209.85.216.46': 0.35; 'received:mail- qw0-f46.google.com': 0.35; 'doing': 0.36; 'running': 0.36; 'rather': 0.36; 'missing': 0.36; 'processing': 0.37; 'two': 0.37; 'some': 0.37; 'machine': 0.37; 'way.': 0.37; 'received:209.85': 0.37; 'apr': 0.38; 'helped': 0.38; 'lab': 0.38; 'subject:skip:p 10': 0.38; 'thread': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'reasonable': 0.38; 'set': 0.39; 'could': 0.39; 'received:209': 0.39; 'how': 0.39; 'basic': 0.40; 'similar': 0.40; 'solution': 0.40; 'student': 0.40; 'would': 0.40; "it's": 0.40; 'header:Received:5': 0.40; 'might': 0.40; 'factor': 0.60; 'simple': 0.60; 'best': 0.60; 'networking': 0.60; 'give': 0.61; '2011': 0.62; 'addition': 0.62; 'upon': 0.63; 'details.': 0.67; '26,': 0.68; 'roughly': 0.68; 'details,': 0.68; 'clients.': 0.69; '100': 0.70; 'lost': 0.71; 'serious': 0.78; 'lose': 0.84; 'average.': 0.84; 'disconnects': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2eGo2jEee76k246TU5K/+lxt+6VdxWJf1gMwLajGpCI=; b=Qowg6VHsLI1ibnRS8JluTcuL0wlgmEYM4MFXKO8if0FqiMijEzQYud5CmQNLl79bUc WyoQKAw7Z8SvmisU+m7SPcEpLlyAqVC5tO/4QPAXqd+Kk0FB2s0g2A/aCn6+CmyeXbzm o7ZUDCknh5qRytWDf2z7VVo8KEIUlwXwp61ts=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=jMKOhLkjLQ9i81Nwa5teRWjmmmMTy0ykN0bL+0V2hmi5UeRt9f61Nz851K3nFHADF2 6+HlT+XPYAEQwtN4SXrrN1E8dLqM2NJYhJnsK/XBetpagaq4Pre/a2mwwOT0P8G/77bD wNO5FPp8oFgildIiLn8xkGeRYQbwFYGojS/RY=
MIME-Version 1.0
In-Reply-To <8ikj88-bs1.ln1@svn.schaathun.net>
References <8ikj88-bs1.ln1@svn.schaathun.net>
Date Tue, 26 Apr 2011 14:31:59 -0700
Subject Re: client-server parallellised number crunching
From geremy condra <debatem1@gmail.com>
To Hans Georg Schaathun <georg@schaathun.net>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.879.1303853522.9059.python-list@python.org> (permalink)
Lines 49
NNTP-Posting-Host 82.94.164.166
X-Trace 1303853522 news.xs4all.nl 41114 [::ffff:82.94.164.166]:55293
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:4094

Show key headers only | View raw


On Tue, Apr 26, 2011 at 12:55 PM, Hans Georg Schaathun
<georg@schaathun.net> wrote:
> I wonder if anyone has any experience with this ...
>
> I try to set up a simple client-server system to do some number
> crunching, using a simple ad hoc protocol over TCP/IP.  I use
> two Queue objects on the server side to manage the input and the output
> of the client process.  A basic system running seemingly fine on a single
> quad-core box was surprisingly simple to set up, and it seems to give
> me a reasonable speed-up of a factor of around 3-3.5 using four client
> processes in addition to the master process.  (If anyone wants more
> details, please ask.)
>
> Now, I would like to use remote hosts as well, more precisely, student
> lab boxen which are rather unreliable.  By experience I'd expect to
> lose roughly 4-5 jobs in 100 CPU hours on average.  Thus I need some
> way of detecting lost connections and requeue unfinished tasks,
> avoiding any serious delays in this detection.  What is the best way to
> do this in python?
>
> It is, of course, possible for the master thread upon processing the
> results, to requeue the tasks for any missing results, but it seems
> to me to be a cleaner solution if I could detect disconnects and
> requeue the tasks from the networking threads.  Is that possible
> using python sockets?
>
> Somebody will probably ask why I am not using one of the multiprocessing
> libraries.  I have tried at least two, and got trapped by the overhead
> of passing complex pickled objects across.  Doing it myself has at least
> helped me clarify what can be parallelised effectively.  Now,
> understanding the parallelisable subproblems better, I could try again,
> if I can trust that these libraries can robustly handle lost clients.
> That I don't know if I can.

Without knowledge of what you're doing it's hard to comment
intelligently, but I'd try something like CHAOS or OpenSSI to see if
you can't get what you need for free, if that doesn't do it then try
dropping a liveCD with Hadoop on it in each machine and running it
that way. If that can't work, try MPI. If you've gotten that far and
nothing does the trick then you're probably going to have to give more
details.

On a side note, there are a reasonable number of examples of how to do
similar things on a GPU in "GPU Gems"- depending on your needs you
might be able to just apply a copypasta solver ;)

Geremy Condra

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

client-server parallellised number crunching Hans Georg Schaathun <georg@schaathun.net> - 2011-04-26 20:55 +0100
  Re: client-server parallellised number crunching Chris Angelico <rosuav@gmail.com> - 2011-04-27 06:20 +1000
  Re: client-server parallellised number crunching Dan Stromberg <drsalists@gmail.com> - 2011-04-26 13:31 -0700
  Re: client-server parallellised number crunching Dan Stromberg <drsalists@gmail.com> - 2011-04-26 13:33 -0700
    Re: client-server parallellised number crunching Hans Georg Schaathun <hg@schaathun.net> - 2011-04-26 21:47 +0100
      Re: client-server parallellised number crunching Chris Angelico <rosuav@gmail.com> - 2011-04-27 07:07 +1000
  Re: client-server parallellised number crunching Chris Angelico <rosuav@gmail.com> - 2011-04-27 06:35 +1000
  Re: client-server parallellised number crunching geremy condra <debatem1@gmail.com> - 2011-04-26 14:31 -0700
    Re: client-server parallellised number crunching Hans Georg Schaathun <georg@schaathun.net> - 2011-04-27 06:58 +0100
      Re: client-server parallellised number crunching geremy condra <debatem1@gmail.com> - 2011-04-26 23:54 -0700
        Re: client-server parallellised number crunching Hans Georg Schaathun <georg@schaathun.net> - 2011-04-27 10:57 +0100
  Re: client-server parallellised number crunching Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-27 11:35 +0200
    Re: client-server parallellised number crunching Hans Georg Schaathun <hg@schaathun.net> - 2011-04-27 13:21 +0100
      Re: client-server parallellised number crunching Chris Angelico <rosuav@gmail.com> - 2011-04-27 23:35 +1000
        Re: client-server parallellised number crunching Hans Georg Schaathun <hg@schaathun.net> - 2011-04-27 15:15 +0100
          Re: client-server parallellised number crunching Chris Angelico <rosuav@gmail.com> - 2011-04-28 00:58 +1000
            Re: client-server parallellised number crunching Hans Georg Schaathun <hg@schaathun.net> - 2011-04-27 19:28 +0100

csiph-web