HyperStudy

Sample Script: Running Solvers on Unix, While Study is on a Unix Mapped Drive

Sample Script: Running Solvers on Unix, While Study is on a Unix Mapped Drive

Previous topic Next topic No expanding text in this topic  

Sample Script: Running Solvers on Unix, While Study is on a Unix Mapped Drive

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Files on Unix can be accessed from the PC by mapping a network drive to the Unix side of the network.

In order to facilitate running HyperStudy on PC while running a solver on Unix, HyperStudy sets a process environment variable called STUDY_UNIX_PATH. The value of this process environment variable is set to the full path of the current run directory, excluding the drive letter of the mapped drive. This environment variable keeps changing with each run.

A batch file must be created to facilitate the execution of the solver on Unix from HyperStudy running on PC. This batch file should be entered as the "Solver Execution Script" on the "Do nominal run" page of HyperStudy. Below is a simple example of such a batch file:

rsh unix_mc –l user_name solver_script $HOME%STUDY_UNIX_PATH%/%1

The batch file uses the rsh command to log into the Unix machine and execute the solver on the iterative designs created by HyperStudy.
The variable solver_script is the script to run the solver on Unix.
The batch file assumes that the mapped drive is the user’s home directory on the Unix machine, therefore, the $HOME UNIX environment variable is used in the path to the input file.
%1 reads the first argument from the "Solver Input Arguments" field on the "Do nominal run" page of HyperStudy.  The default value, "$file", which is present in this field is not recognized in this case, and therefore needs to be replaced with the actual input file name.  Should further arguments need to be used; %2, %3, etc. can be used to reference space separated entries in this field.
The variable unix_mc is the host name of the Unix computer where the solver is executed.
The variable user_name is a Unix login name.
In order to be able to execute the rsh into the Unix side, the file .rhosts needs to be modified by adding the host name of the PC and your login.  You can do that using vi or any other editor on Unix.  The .rhosts file must have read and write permissions for the user that is specified.  If a secure shell (ssh) is installed on a user’s system, the ssh can be configured with host and user keys in order to avoid password requirements.  A user authentication key needs to be created on the machine running HyperStudy.  This gets passed on to the Unix machine (where the solver resides) when the ssh is invoked.  The solver machine needs to have a copy of the authentication key so that it can verify the user.

 

 

See Also:

Process Environment Variables