CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens

script for running star

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 29, 2004, 15:49
Default script for running star
  #1
Celia
Guest
 
Posts: n/a
Hi all,

does anyone know if I can write a script file to run ./star so that I can run it with nohup. My broadband connection often closes down and this results in termination of the running job.

I have almost no idea about scripts, so if you can let me know how I can do this I would be very grateful.

Celia

  Reply With Quote

Old   November 30, 2004, 05:10
Default Re: script for running star
  #2
4xF
Guest
 
Posts: n/a
Something like that should do:

#!/bin/sh WORKDIR=`pwd` ${WORKDIR} star.exe <<EOD star y EOD exit 0

Have fun...
  Reply With Quote

Old   November 30, 2004, 09:23
Default Re: script for running star
  #3
Jamie
Guest
 
Posts: n/a
batch scripts can be automaticaly created.

With v3150A, starlink with options (to see options, "starlink -h"):

starlink -snfc casename -e star.exe

(s = single precision, n = no subroutines, f = overwrite existing executable of same name, c = casename, followed by actual casename, e = executable name)

This creates a file called star.batch. If using standard v3150A, you'll have to edit the file and change "timex" to "time" unless the timex command exists on your machine. To start the analysis

nohup ./star.batch &

standard output will automatically be sent to star.log.

If you're using v3.2, execute star with the -batch option, i.e.

star -batch (single precision. for double use star -dp -batch)

This creates a file called batch.sh. Simply starting this will *not* send standard output to a file. I start it like this:

nohup ./batch.sh >& star.log &

Then standard output goes to star.log.

Hope this helps.
  Reply With Quote

Old   November 30, 2004, 20:12
Default Re: script for running star
  #4
Celia
Guest
 
Posts: n/a
Thanks guyes, I will give this a go
  Reply With Quote

Old   December 1, 2004, 22:56
Default Re: script for running star
  #5
Celia
Guest
 
Posts: n/a
I tried both... does'nt work

4XF... I wrote a file with your commands, used touch +x filename to create an executable.. when try to run it complains..."bash ./filename: /bin/sh: bad interpreter: Premission denied

Jamie... it does'nt seem to creat any batch file using the command.. I am using v3150A...
  Reply With Quote

Old   December 2, 2004, 04:27
Default Re: script for running star
  #6
Jörn Beilke
Guest
 
Posts: n/a
if you type "starlink -help" you see the options. assume that your casename is "case" (case.mdl) type

starlink -c case

and the file star.batch is created. If you are on a linux box you have to edit the file and remove the timex command.
  Reply With Quote

Old   December 2, 2004, 04:29
Default Re: script for running star
  #7
Jörn Beilke
Guest
 
Posts: n/a
if you type "starlink -help" you see the options.
assume that your casename is "case" (case.mdl) type

starlink -c case

and the file star.batch is created. If you are on a linux box you have to edit the file and remove the timex command.

The script should look like:


#!/bin/sh
./star > star.log 2>&1 <<EOD
case
EOD
  Reply With Quote

Old   December 2, 2004, 10:16
Default Re: script for running star
  #8
Guillaume
Guest
 
Posts: n/a
If your aim is only to start a star run and close your connection you do not need any script. Simply type in the following order:

star > toto case ^Z bg

Usually a job is killed when the output window is destroyed by closing a connection. The first line flushes the output in a file and no more on the window (standard output).

The second line answer the star question ``case name" (but now this question is displayed in the file toto and not on the window).

The third line (ctrl Z) freezes the simulation in order to be able to switch to background (fourth line).

Wait few seconds and open the toto file, you should see the simulation continuing. You can log-off.

NB Do not try to directly type ``star > toto &" as you cannot enter the case.
  Reply With Quote

Old   December 2, 2004, 23:46
Default Re: script for running star
  #9
Celia
Guest
 
Posts: n/a
Thanks guyes... its working
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
script file for running fluent on linux cluster Worth FLUENT 2 February 9, 2012 12:31
the problem of running star-cd after pro-star liu-jinsong Siemens 0 November 20, 2008 21:58
the problem of running star-cd liu-jinsong Siemens 1 November 4, 2008 05:52
Running script files without opening grafic inter Jim CFX 0 March 21, 2006 07:57
Script Files for Star-CD? Cary Siemens 3 May 21, 2001 05:36


All times are GMT -4. The time now is 05:16.