Changeset 5791


Ignore:
Timestamp:
Sep 26, 2008, 11:26:53 AM (15 years ago)
Author:
ole
Message:

Bypassed caching in interpolate for windows due to filename problem.
Tests worked on Linux but not on Windoze.
This only affects a small optimisation when running on Windows

Location:
anuga_core/source/anuga
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/caching/caching.py

    r5359 r5791  
    10291029# -----------------------------------------------------------------------------
    10301030
    1031 def save_args_to_cache(CD,FN,args,kwargs,compression):
     1031def save_args_to_cache(CD, FN, args, kwargs, compression):
    10321032  """Save arguments to cache
    10331033
     
    10401040  (argsfile, compressed) = myopen(CD+FN+'_'+file_types[1], 'wb', compression)
    10411041
    1042   if not argsfile:
    1043     if verbose:
    1044       print 'ERROR (caching): Could not open %s' %argsfile.name
    1045     raise IOError
     1042  if argsfile is None:
     1043    msg = 'ERROR (caching): Could not open argsfile for writing: %s' %FN
     1044    raise IOError, msg
    10461045
    10471046  mysave((args,kwargs),argsfile,compression)  # Save args and kwargs to cache
  • anuga_core/source/anuga/fit_interpolate/interpolate.py

    r5775 r5791  
    376376        point_coordinates = ensure_numeric(point_coordinates, Float)
    377377        f = ensure_numeric(f, Float)       
    378            
    379         if use_cache is True:
     378
     379        import sys
     380        if use_cache is True and sys.platform != 'win32':
     381            # FIXME (Ole): (Why doesn't this work on windoze?)
     382           
    380383            X = cache(self._build_interpolation_matrix_A,
    381                       (point_coordinates),
    382                       {'verbose': verbose},                       
     384                      args=(point_coordinates,),
     385                      kwargs={'verbose': verbose},                       
    383386                      verbose=verbose)       
    384387        else:
Note: See TracChangeset for help on using the changeset viewer.