|
[Sponsors] |
November 29, 2004, 15:49 |
script for running star
|
#1 |
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 |
|
November 30, 2004, 05:10 |
Re: script for running star
|
#2 |
Guest
Posts: n/a
|
Something like that should do:
#!/bin/sh WORKDIR=`pwd` ${WORKDIR} star.exe <<EOD star y EOD exit 0 Have fun... |
|
November 30, 2004, 09:23 |
Re: script for running star
|
#3 |
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. |
|
November 30, 2004, 20:12 |
Re: script for running star
|
#4 |
Guest
Posts: n/a
|
Thanks guyes, I will give this a go
|
|
December 1, 2004, 22:56 |
Re: script for running star
|
#5 |
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... |
|
December 2, 2004, 04:27 |
Re: script for running star
|
#6 |
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. |
|
December 2, 2004, 04:29 |
Re: script for running star
|
#7 |
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 |
|
December 2, 2004, 10:16 |
Re: script for running star
|
#8 |
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. |
|
December 2, 2004, 23:46 |
Re: script for running star
|
#9 |
Guest
Posts: n/a
|
Thanks guyes... its working
|
|
|
|
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 |