[petsc-dev] --download-ptscotch

Barry Smith bsmith at mcs.anl.gov
Thu Jun 25 13:00:32 CDT 2015


   Looks reasonable to me.

  30 seconds seems a bit long; if it has not made a successful connection in say 10 seconds it seems unlikely 20 more will help?



  Barry

> On Jun 25, 2015, at 12:56 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> 
> Or perhaps the following [set timeout before urlretrieve - and reset after]
> 
> Satish
> 
> -----
> $ git diff |cat
> diff --git a/config/BuildSystem/retrieval.py b/config/BuildSystem/retrieval.py
> index 1875a07..0b1545e 100644
> --- a/config/BuildSystem/retrieval.py
> +++ b/config/BuildSystem/retrieval.py
> @@ -4,6 +4,8 @@ import os
> import urllib
> import urlparse
> import config.base
> +import socket
> +
> # Fix parsing for nonstandard schemes
> urlparse.uses_netloc.extend(['bk', 'ssh', 'svn'])
> 
> @@ -56,8 +58,12 @@ class Retriever(logger.Logger):
>       os.unlink(localFile)
> 
>     try:
> +      sav_timeout = socket.getdefaulttimeout()
> +      socket.setdefaulttimeout(30)
>       urllib.urlretrieve(url, localFile)
> +      socket.setdefaulttimeout(sav_timeout)
>     except Exception, e:
> +      socket.setdefaulttimeout(sav_timeout)
>       failureMessage = '''\
> Unable to download package %s from: %s
> * If URL specified manually - perhaps there is a typo?
> 
> 
> On Thu, 25 Jun 2015, Satish Balay wrote:
> 
>> Looks like the following is a way to timeout urllib.urlretrieve()
>> 
>> diff --git a/config/BuildSystem/retrieval.py b/config/BuildSystem/retrieval.py
>> index 1875a07..fb5059d 100644
>> --- a/config/BuildSystem/retrieval.py
>> +++ b/config/BuildSystem/retrieval.py
>> @@ -4,6 +4,9 @@ import os
>> import urllib
>> import urlparse
>> import config.base
>> +import socket
>> +socket.setdefaulttimeout(30)
>> +
>> # Fix parsing for nonstandard schemes
>> urlparse.uses_netloc.extend(['bk', 'ssh', 'svn'])
>> 
>> 
>> However - it appears to be a global timeout [for all sockets created from python?] Should we use this?
>> 
>> Satish
>> 
>> 
>> On Thu, 25 Jun 2015, Satish Balay wrote:
>> 
>>> We use:
>>> 
>>>    self.download     = ['http://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz',
>>>                         'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/scotch_6.0.3.tar.gz']
>>> 
>>> 
>>> So - if the first url fails - configure should use the second one.
>>> 
>>> However sometimes configure hangs. I see configure is hanging here -
>>> but weget is not. So perhaps a bug in python urllib?
>>> 
>>> [have to check more..]
>>> 
>>> Satish
>>> 
>>> 
>>> On Thu, 25 Jun 2015, Barry Smith wrote:
>>> 
>>>> 
>>>>   Bug report should be sent to the Inria folks.
>>>> 
>>>>   Barry
>>>> 
>>>> I wonder how many French Francs they waste maintaining their own source forge instead of using github for free.
>>>> 
>>>> 
>>>>> On Jun 25, 2015, at 9:55 AM, Stefano Zampini <stefano.zampini at gmail.com> wrote:
>>>>> 
>>>>> It seems that —download-ptscotch is broken right now, since the code repository on gforge.inria.fr is not accessible anymore as an anonymous user.
>>>>> 
>>>>> Stefano
>>>> 
>>>> 
>>> 
>> 




More information about the petsc-dev mailing list