Changeset 6106
- Timestamp:
- Dec 24, 2008, 2:21:03 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/config.py
r6105 r6106 192 192 # Code to set the write mode depending on 193 193 # whether Scientific.IO supports large NetCDF files 194 s = """ 195 import tempfile 196 from Scientific.IO.NetCDF import NetCDFFile 197 198 fname = tempfile.mktemp() 199 fid = NetCDFFile(fname, 'wl') 200 fid.close() 201 netcdf_mode_w = 'wl' 202 log('Using NetCDF large file mode') 203 """ 194 s = """from Scientific.IO.NetCDF import NetCDFFile; fid = NetCDFFile('tmpfilenamexx', 'wl')""" 204 195 205 196 # Need to run in a separate process due an … … 209 200 else: 210 201 null = '/dev/null' 211 err = os.system('python -c "%s" 2> %s' % (s, null)) 212 213 if err > 0: 202 cmd = 'python -c "%s" 2> %s' % (s, null) 203 err = os.system(cmd) 204 #print 'OK, err =', err 205 206 if err != 0: 214 207 # The Python script s failed e.g. with a segfault 215 208 # which means that large file support is … … 223 216 # Large file support is not supported 224 217 pass 225 218 else: 219 # Set the default mode to large file support 220 netcdf_mode_w = 'wl'
Note: See TracChangeset
for help on using the changeset viewer.