Parallel Python Community Forums

Python Forums => Parallel Python Forum => Topic started by: pyrosch on March 21, 2017, 03:37:09 AM



Title: Exception in ppserver (thread client_socket) when starting
Post by: pyrosch on March 21, 2017, 03:37:09 AM
ppserver throws an exception after starting it:



The error message is:
Code:
C:\Python27\Scripts>ppserver.py -d
2017-03-21 13:59:35,118 - pp - INFO - Creating server instance (pp-1.6.5)
2017-03-21 13:59:35,118 - pp - INFO - Running on Python 2.7.13 win32
2017-03-21 13:59:35,276 - pp - INFO - pp local server started with 2 workers
2017-03-21 13:59:35,276 - pp - DEBUG - Strarting network server interface=0.0.0.0 port=60000
Exception in thread client_socket:
Traceback (most recent call last):
  File "c:\Python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "c:\Python27\lib\threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "ppserver.py", line 146, in crun
    mysocket = pptransport.CSocketTransport(csocket)
TypeError: __init__() takes exactly 3 arguments (2 given)

Running on Python 2.7.13


Title: Re: Exception in ppserver (thread client_socket) when starting
Post by: wmadden on July 09, 2017, 04:27:11 PM
I am getting the exact same error, using the exact same version of python (2.7.13) and pp (1.6.5).  Any help with this? 

Just prior to throwing the error, ppserver sometimes discovers my host.  The PC where I invoke ppserver has a local address of 192.168.1.12.  The host (where I am running the PrimeSum.py example program) is 192.168.1.8.  The two machines are able to ping one another.  PrimeSum.py runs but only appears to use the host's cores.  I'm running Win10 Home on the ppserver and Win10 Pro on the host machine.  I've run Task Manager on both machines and see CPU utilization jump to 100% on the host, but it never spikes at all on the ppserver.  In PrimeSum.py I've included one extra ".set_ncpus(NN)" command about halfway through the code to force particular numbers of cores to be used:

ppservers = ("*",)
job_server = pp.Server(ppservers=ppservers)
job_server.set_ncpus(NN)                                   #new command I've added
print "Starting pp with", job_server.get_ncpus(), "workers"

I tried values for NN from 0 - 13+.  No matter what values I use, when PrimeSum.py completes running, Task Manager shows all the 'lifting' being done by the host - nothing on the ppserver.



Title: Re: Exception in ppserver (thread client_socket) when starting
Post by: fr75 on August 07, 2017, 05:37:57 AM
@pyrosch,

No problem on Linux with Anaconda Python :

Python 2.7.13 |Anaconda 2.2.0 (64-bit)| (default, Dec 20 2016, 23:09:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org

Do you have a *simple* test file ?