Re: [AMBER] script to run background job?

From: Hannes Loeffler <Hannes.Loeffler.stfc.ac.uk>
Date: Tue, 31 Jan 2017 08:53:32 +0000

On Mon, 30 Jan 2017 16:35:26 +0000
"Elvis Martis" <elvis.martis.bcp.edu.in> wrote:

> Can you try submitting
> "./script &"

I guess what the OP really wants to do is something like (making use of
csh's "superb" file handling mechanism):

nohup ./script < /dev/null >& script.log &

Make sure script is executable or run directly through the shell, and
remove the nohup from the script. I can understand why the admin would
not want users to run background jobs in a loop...

Cheers,
Hannes.


>
> -----Original Message-----
> From: Michael Shokhen [mailto:michael.shokhen.biu.ac.il]
> Sent: Monday, January 30, 2017 10:02 PM
> To: AMBER.ambermd.org
> Subject: [AMBER] script to run background job?
>
> Dear Amber experts,
>
>
> The following script well works for running sequential jobs in
> foreground.
>
> & in the end of the command is not allowed in the script.
>
> What changes and corrections should be added to the script to run
> job in the background?
>
>
> Thank you,
>
> Michael
>
>
> set MDINPUT=0
>
> echo -n "Starting Script at: "
> date
> echo ""
>
> while ( $MDCURRENTJOB <= $MDENDJOB )
> echo -n "Job $MDCURRENTJOB started at: "
> date
> . MDINPUT = $MDCURRENTJOB - 1
> nohup mpirun -np 2 $AMBERHOME/bin/pmemd.cuda.MPI -O -i prod.in \
> -o test_md$MDCURRENTJOB.out \
> -p ../ras-raf_solvated.prmtop \
> -c test_md$MDINPUT.rst \
> -r test_md$MDCURRENTJOB.rst \
> -x test_md$MDCURRENTJOB.mdcrd
> #gzip -9 -v a-dna_md$MDCURRENTJOB.mdcrd
> echo -n "Job $MDCURRENTJOB finished at: "
> date
> . MDCURRENTJOB = $MDCURRENTJOB + 1
> end
> echo "ALL DONE"
>
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Jan 31 2017 - 01:00:02 PST
Custom Search