Ronald D. Kriz*, Associate Professor
Randy T. Levensalor**, Assistant Research Assistant
* Engineering Science and Mechanics, and ** Computer Science
Virginia Polytechnic Institute and State University
Blacksburg, Virginia 24061
With NPIB version 1.6 all NPIB, JWave, and of course *.html files are now located and execute from within the public_html directory off of the user's home directory. In this section we have provided a template that will assist the user in setting up modules that use NPIB and JWave.
Notice that there are three directories: crcd/, jwave/, and npib/.
In the crcd/ directory there is a bin/ directory where the user must archive all compiled PV-Wave/JWave *.cpr files. This new directory must be added to the JWave manager path by the server system administrator. The crcd/ directory also contains the lectures/, assignments/, and modules/ set up by the user.
In the jwave/ directory there is a classes/ directory. In this directory there are three JWave *.jar files that were created by the JWave manager. To avoid copying these three *.jar files everytime JWave is reconfigured, the README file in this directory show how to make symbolic links to these files.
In the npib/ directory there are two directories, AA_PUT_contents_IN_home-bin/ and APP/ and two files: form.jar and npib.commands. The form.jar file is the same form.jar file located in the codebase file directory "server"/npib. The npib.commands file contains one line for each application ("APP" i.e. APP => polar) pointing to the location of the APP.npib file that contains the npib-commands used for that particular application. Here APP can be replaced with the application name, i.e. for module02 APP is replaced with "polar" and in module06 APP is replaced with "edge".
The AA_PUT_contents_IN_home-bin/ directory contains a script file named "form" which links the user to the form.jar file. Using this script file the user does not have to define the PATH and CLASSPATH to the form.jar file.
CONTENTS of form: --------------------------------------------- #!/bin/sh java -cp /usr/local/java2/lib:$HOME/public_html/npib/form.jar:. \ form.FormLoader $
The APP/ directory contains the APP_.d directory and two NPIB files: APP.npib and copyAPP.sh. The APP_.d directory contains all files for execution on remote computer. NOTE: executable files stored here must be compile on the remote computer and stored here, unless you want to include an extra compile command in the remoteAPP.sh script. Speaking of which, the two *.sh script files: remoteAPP.sh and localAPP.sh are shell script files that control the sequence of commands executed on the remote and local computers respectively:
#!/bin/csh #------------------ remoteAPP.sh -------------------- APP.x exit 0 #!/bin/csh #-------------------- localAPP.sh ------------------- source /usr/local/vni/wave/bin/wvsetup #echo env: > temp #/bin/env >> temp #echo ' ' >> temp #echo set: >> temp #set >> temp wave create_prop1 > & prop1_foobar rm prop1_foobar rm *.x rm *.byt rm *legend.jpg exit 0The other files in this directory are templates with helpful hints to avoid various pitfalls and other problems we encountered in creating PV-Wave modules.
The NPIB file, APP.npib, contains the sequence of commands to execute this application.
CONTENTS of APP.npib: ------------------------------------- lrun /export/home/USER_NAME/public_html/npib/APP/copyAPP.sh sput $APP_remote srun $APP_remote ./remoteAPP.sh sget $APP_remote lrun ./localAPP.shCommands in the APP.npib file need more explanation, where $APP_remote was defined in the NPIB Edit - Passwords "Working Window" and used here like an environmental variable with information about the remote computer.
CONTENTS of copyAPP.sh: ----------------------------------- #!/bin/sh cp /export/home/USER_NAME/public_html/npib/APP/APP_.d/* .