|
Home > Archive > Unix Programming > October 2004 > Parallel job processing in PBS queuing system
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Parallel job processing in PBS queuing system
|
|
| zuheyr 2004-09-29, 8:09 pm |
| Hello,
In Linux or unix platform, is there any way to syncronize two jobs using PBS
or any other tool!?
I want to run 2 programs in 2 different jobs, stop
them at syncronized points get the results and rerun
them.
Could please somebody help me...
Many thanks,
Zuheyr Alsalihi
| |
| Kevin Rodgers 2004-09-29, 8:09 pm |
| zuheyr wrote:
> I want to run 2 programs in 2 different jobs, stop them at syncronized
> points get the results and rerun them.
How about :
#!/bin/sh
program_1 &
program_1_pid=$!
program_2 &
program_2_pid=$!
at now+10min << EOF
kill -STOP $program_1_pid
kill -STOP $program_2_pid
# get the results here
kill -CONT $program_1_pid
kill -CONT $program_2_pid
EOF
--
Kevin Rodgers
| |
| zuheyr alsalihi 2004-09-30, 10:46 am |
| Dear Kevin.
Thnk you! Such a scheme indeed works, but there are
two things that worry me:
1-When stopping a program, where does it continue when
I continue it...? How can I assure that it will continue from
a given fixed point!?
2-The arbitrary timing, but I guess I can manipulate the stopping by
examining an output file.
As an alternative I was checking the use of an mpi function to
run 2 executables in one job using
MPI_COMM_SPAWN_MULTIPLE
what do you think? Then I can control the processes and do communications!?
Well, many thanks it was very instructive...
Regards
Zuheyr
"Kevin Rodgers" <ihs_4664@yahoo.com> wrote in message
news:415AD3A2.1020800@yahoo.com...
> zuheyr wrote:
>
> How about :
>
> #!/bin/sh
>
> program_1 &
> program_1_pid=$!
>
> program_2 &
> program_2_pid=$!
>
> at now+10min << EOF
> kill -STOP $program_1_pid
> kill -STOP $program_2_pid
> # get the results here
> kill -CONT $program_1_pid
> kill -CONT $program_2_pid
> EOF
>
> --
> Kevin Rodgers
>
| |
| Robert Newson 2004-10-02, 9:13 pm |
| zuheyr alsalihi wrote:
> Dear Kevin.
>
> Thnk you! Such a scheme indeed works, but there are
> two things that worry me:
>
> 1-When stopping a program, where does it continue when
> I continue it...? How can I assure that it will continue from
> a given fixed point!?
Signals are like user controlled interrupts. When the SIGSTOP is received,
the program is interrupted doing whatever it was doing and executes the
SIGSTOP handler, which can only do one thing as it cannot be changed from
its default behaviour: stop the process running at that point. When the
SIGCONT is received, the default behaviour for that handler is for the
process to then resume from the point at which it was stopped.
|
|
|
|
|