solving in batch mode

by Nate on June 2, 2008

Here’s a pretty hidden feature…  did you know you can have GeoStudio solve a whole bunch of analyses and even files automatically?

Solving an Analysis

GeoStudio can be run with command-line parameters that tell it to solve one or more analyses and then shut down.

For example:

geostudio “c:\my file.gsz” “an analysis” /solve

will solve the analysis named “an analysis” in the file “my file.gsz”.

Solving Several Analyses

A bit more interesting:

geostudio “c:\my file.gsz” /solve:all

will solve all analyses in “my file.gsz”.  It solves them in the right order, so that a steady-state analysis, for example, gets solved before the transient analysis that uses its results as initial conditions.

Logging

If there are errors during the solving process, however, you don’t normally want an error message to pop up, because then the whole thing stops and waits for you to hit OK, instead of moving on to the next analysis which may solve just fine.

Specifying a log file like this:

geostudio “c:\my file.gsz” /solve:all /log:”c:\log.txt”

will cause all errors to be written to “log.txt” instead of being displayed on the screen.  After it’s done solving everything you can open log.txt in Notepad and make sure everything ran properly.

Exiting

After GeoStudio is done solving the analyses you told it to, it just sits there with the file open.  If you want it to close when it’s done, use /autoexit:

geostudio “c:\my file.gsz” /solve:all /log:”c:\log.txt” /autoexit

Batch File

Put all those together and you can write a batch file to automatically solve several files in a row.  For example, use Notepad to create a new file named “solve.cmd” with this content:

geostudio “c:\my file.gsz” /solve:all /log:”c:\log.txt” /autoexit
geostudio “c:\my other file.gsz” /solve:all /log:”c:\log.txt” /autoexit

When you run it (double-click the file) GeoStudio will launch and solve all analyses in “my file.gsz” followed by all analyses in “my other file.gsz”, and log.txt will contain the combined logs of all analyses.

Real-Life Application

Is this a useful feature?  I’m not really sure.

It’s very useful for us, it’s a core part of our Quality Assurance process.  Every night we have two quad-core servers crunch away for half the night solving several hundred analyses and comparing the results to make sure we didn’t inadvertantly break something.

But is it useful to the average (or above-average) geotech engineer?  I can imagine a few situations it might be, but I don’t know if they’re realistic or just contrived.  If you have some VADOSE/W analyses that you know will take several hours to run, you could start them in batch mode before going home at the end of the day and have the results ready in the morning. 

Or if you have a large number of interdependant files, and you make a change to one analysis that all the others depend on, you could run a batch to re-solve all the others.

What do you think?  Could you see yourself using a batch file to solve a large number of analyses?  Do you already?  I’d love to hear about the processes you follow in your office to manage all the analyses you must encounter in a large project.

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>