[Scons-users] variant_dir and Madagascar

Sven Lars Tobias Stål smp428 at alumni.ku.dk
Thu Mar 19 12:58:41 EDT 2015


Dear all, 

I’m using SCons to create workflows for geophysics processing. A typical SConstruct looks like this:

from rsf.proj import *
Flow("spike1","spike","sfadd scale=4.0")
Flow("noise","spike1","sfnoise")
Plot("spike",'sfgraph title="spike" ' )
Plot("spike1",'sfgraph title="spike1" ')
Plot("noise",'sfgraph title="noisy" ')
Result("noise",'sfgraph title="noisy" pclip=75 ')
End()


Using Flow to call a Madagascar program and plot and result to generate figures. Flow(‘output’,’input’,’program parameters')

However, I’m generating large amounts of files (10-100 000 up to 100Gb) everything works fine, but my pwd becomes completely clogged…
Is there a way (using variant_dir? stdout? Or anything better?) so that I can put my intermediate files in subdirectories. In quasi code it could look like:

from rsf.proj import *
Flow(“\spikes\spike1","spike","sfadd scale=4.0")
Flow(“\noise\noise”,”\spikes\spike1","sfnoise")
Plot(“\spikes\spike",'sfgraph title="spike" ' )
Plot(“\spikes\spike1",'sfgraph title="spike1" ')
Plot(“\noise\noise",'sfgraph title="noisy" ')
Result(“noise",'sfgraph title="noisy" pclip=75 ')
End()

I still want’t to use only one SConstruct file for better overview. Is this possible? 

I’m grateful for any advice!

Tobbe


More information about the Scons-users mailing list