[Scipy-tickets] [SciPy] #502: Bug in scipy/weave/catalog.py

SciPy scipy-tickets@scipy....
Tue Sep 18 08:33:49 CDT 2007


#502: Bug in scipy/weave/catalog.py
---------------------------+------------------------------------------------
 Reporter:  Joel Schaerer  |       Owner:  somebody
     Type:  defect         |      Status:  new     
 Priority:  normal         |   Milestone:  0.7     
Component:  scipy.weave    |     Version:  0.5.2   
 Severity:  normal         |    Keywords:          
---------------------------+------------------------------------------------
 It seems that scipy.weave tests if the home directory of the user is
 writable by creating and deleting a dummy file. This fails on my setup
 which is a cluster with a shared home directory: when I launch several
 weave programs at the same time, they interfere and I get the following
 crash:

 Traceback (most recent call last):
   File "/home/schaerer/caviar/real_cousty_sequence.py", line 73, in
 <module>
     main()
   File "/home/schaerer/caviar/real_cousty_sequence.py", line 59, in main
 schema=dynamic_schemes.Schema_pseudo_instationnaire(meshes,force_providers,(elementary_linear_isotropic_stiffness,young,poisson,laplacian),disp,1000)
   File "/misc/raid/schaerer/caviar/dynfem/dynamic_schemes.py", line 25, in
 __init__
     self.init()
   File "/misc/raid/schaerer/caviar/dynfem/dynamic_schemes.py", line 160,
 in init
 self.K=StiffnessMatrix(self.meshes[0],self.element_type,(self.young,self.poisson),1
 +
 (self.laplacian+self.damping/float(self.frames))*self.time_step,kfactor=self.time_step)
   File "/misc/raid/schaerer/caviar/dynfem/stiffness.py", line 21, in
 __init__
     from scipy import weave
   File "/usr/lib/python2.5/site-packages/scipy/weave/__init__.py", line 9,
 in <module>
     from blitz_tools import blitz
   File "/usr/lib/python2.5/site-packages/scipy/weave/blitz_tools.py", line
 12, in <module>
     import inline_tools
   File "/usr/lib/python2.5/site-packages/scipy/weave/inline_tools.py",
 line 15, in <module>
     function_catalog = catalog.catalog()
   File "/usr/lib/python2.5/site-packages/scipy/weave/catalog.py", line
 330, in __init__
     sys.path.append(default_dir())
   File "/usr/lib/python2.5/site-packages/scipy/weave/catalog.py", line
 184, in default_dir
     if not is_writable(path):
   File "/usr/lib/python2.5/site-packages/scipy/weave/catalog.py", line
 135, in is_writable
     os.unlink(dummy)
 OSError: [Errno 2] No such file or directory:
 '/home/schaerer/.python25_compiled/dummy'

 There must be a better way to test if a directory is writable!
 Alternatively, it would be nice to be able to configure where weave writes
 its files.

 scipy version: scipy-0.5.2-2.2.fc7

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/502>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list