[Yt-svn] yt-commit r1025 - trunk/yt/extensions/lightcone
britton at wrangler.dreamhost.com
britton at wrangler.dreamhost.com
Thu Dec 18 15:59:18 PST 2008
Author: britton
Date: Thu Dec 18 15:59:18 2008
New Revision: 1025
URL: http://yt.spacepope.org/changeset/1025
Log:
Fixed it so the mkdir process is only performed by the root grid to avoid
nerds-stuck-in-the-doorway syndrome.
Modified:
trunk/yt/extensions/lightcone/LightCone.py
Modified: trunk/yt/extensions/lightcone/LightCone.py
==============================================================================
--- trunk/yt/extensions/lightcone/LightCone.py (original)
+++ trunk/yt/extensions/lightcone/LightCone.py Thu Dec 18 15:59:18 2008
@@ -64,13 +64,14 @@
self.pixels = int(self.lightConeParameters['FieldOfViewInArcMinutes'] * 60.0 / \
self.lightConeParameters['ImageResolutionInArcSeconds'])
- # Create output directory.
- if (os.path.exists(self.lightConeParameters['OutputDir'])):
- if not(os.path.isdir(self.lightConeParameters['OutputDir'])):
- mylog.error("Output directory exists, but is not a directory: %s." % self.lightConeParameters['OutputDir'])
- self.lightConeParameters['OutputDir'] = './'
- else:
- os.mkdir(self.lightConeParameters['OutputDir'])
+ if ytcfg.getint("yt","__parallel_rank") == 0:
+ # Create output directory.
+ if (os.path.exists(self.lightConeParameters['OutputDir'])):
+ if not(os.path.isdir(self.lightConeParameters['OutputDir'])):
+ mylog.error("Output directory exists, but is not a directory: %s." % self.lightConeParameters['OutputDir'])
+ self.lightConeParameters['OutputDir'] = './'
+ else:
+ os.mkdir(self.lightConeParameters['OutputDir'])
# Calculate redshifts for dt data dumps.
if (self.enzoParameters.has_key('dtDataDump')):
More information about the yt-svn
mailing list