D
Dune
I have a question about ow to write Perl script to run a remote program
on a remote server and automatically obtain the results. My situation
is as follows:
My program is a C++ one running on a local Linux box( Rednat 8.0). In
the middle of execution, I need to run an optimization package on a
remote IBM-AIX machine in Supercomputer Center. The optimization
package is generally run by a command line on that IBM-AIX machine
(maybe it also can be evoked by library call---I am not sure), and I
have an account on the IBM-AIX machine. My program can not be compiled
on the IBM-AIX machine as it needs to call another pre-compiled
library, which can only be used under Linux & gcc2.95.3.
So I would like to achieve this by call a Perl script in my C++
program, and the Perl script will do the following:
1. My main program generates the input file to optimization.
2. My main program call the Perl script and do the following:
2.1 sftp to the IBM-AIX machine, and put the optimization
input file to the server.
2.2 ssh to the IBM-AIX machine, and execute the optimization
package with the input using command line.
2.3 check when the optimization finishs, and
3.4 sftp to the IBM-AIX machine, and get the output result
file.
Duing the execution, my main program will wait for the result from
optimization package, and then make use of the results once it is
available.
I am not very familiar with Perl, and would like to have your guys'
kind suggestion about which Perl package/component can help me do this?
Is the above procedures feasible? Is there any example or template I
can learn from?
Thanks a lot for your help!
on a remote server and automatically obtain the results. My situation
is as follows:
My program is a C++ one running on a local Linux box( Rednat 8.0). In
the middle of execution, I need to run an optimization package on a
remote IBM-AIX machine in Supercomputer Center. The optimization
package is generally run by a command line on that IBM-AIX machine
(maybe it also can be evoked by library call---I am not sure), and I
have an account on the IBM-AIX machine. My program can not be compiled
on the IBM-AIX machine as it needs to call another pre-compiled
library, which can only be used under Linux & gcc2.95.3.
So I would like to achieve this by call a Perl script in my C++
program, and the Perl script will do the following:
1. My main program generates the input file to optimization.
2. My main program call the Perl script and do the following:
2.1 sftp to the IBM-AIX machine, and put the optimization
input file to the server.
2.2 ssh to the IBM-AIX machine, and execute the optimization
package with the input using command line.
2.3 check when the optimization finishs, and
3.4 sftp to the IBM-AIX machine, and get the output result
file.
Duing the execution, my main program will wait for the result from
optimization package, and then make use of the results once it is
available.
I am not very familiar with Perl, and would like to have your guys'
kind suggestion about which Perl package/component can help me do this?
Is the above procedures feasible? Is there any example or template I
can learn from?
Thanks a lot for your help!