MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: running notebook from command line...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59402] Re: running notebook from command line...
  • From: Daniel Reeves <dreeves at umich.edu>
  • Date: Mon, 8 Aug 2005 06:17:05 -0400 (EDT)
  • References: <200508060529.BAA01157@smc.vnet.net> <dd4fg4$hug$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

The answer below is likely all you need but in case you also want your
mathematica code to process stdin and stdout and access command line
arguments and the whole shebang (ha, unix pun) then MASH may be helpful:
  http://ai.eecs.umich.edu/people/dreeves/mash/


--- \/   FROM stephen layland AT 05.08.07 08:07 (Yesterday)   \/ ---

> and thus spake Lee Newman [2005.08.06 @ 01:12]:
> > Hello,
> >
> > I have a slow-running model that I want to run from a grid/parallel
> > computing center at my university which requires that my notebook be
> > "executable from the command line" (by staff not familiar with
> > mathematica) rather than the Mathematica front end.   I've read the help
> > files, but I just can't figure out how to make this happen.
> >
> > The structure of my notebook is as follows:
> >
> > [ Initialization cells that set values for parameters ]
> > [ Initialization cells that define various functions ]
> > [ main loop that runs the model and writes results out to files ]
> >
> > Can anyone suggest how I can modify the notebook to be command line
> > executable and how to run it from the command line?
>
> Select all cells in the notebook and set them to 'initialization' cells.
>
> Save the notebook.  When asked if you want to create a package, say yes.
>
> Give the resulting .m (not .nb) to the sysadmins to run with the
> command
>
>     /path/to/math < myfile.m
>
> --
> /*------------------------------*\
> |        stephen layland         |
> |    Documentation Programmer    |
> | http://members.wri.com/layland |
> \*------------------------------*/
>

-- 
http://ai.eecs.umich.edu/people/dreeves  - -  google://"Daniel Reeves"

It's not enough to be Hungarian; you must have talent too.
                -- Alexander Korda


  • Prev by Date: Re: gradient in ParametricPlot
  • Next by Date: Re: How to plot ....................
  • Previous by thread: Re: running notebook from command line...
  • Next by thread: Re: running notebook from command line...