Compiling and Executing aCe programs on theHIVE
aCe programs can
be compiled and executed from the host, (i.e. usrhive or the drone).
-
Compiling aCe programs
The aCe command will produce an executable, however the aCe compiler
generates aCe intermediate code. The aCe linker converts this to some
form of native code, typically C. This is compiled and linked by the
native C compiler.
-
-
-
aCe C compile and link command.
-
-
aCe_cc -vclCK -o <exec> fn1.aCe fn2.aLk fn3.c fn4.o ...
-
-
where:
-
-v verbose mode
-
-
-c only produce .aLk file from .aCe file
-
-l only produce .c file from .aLk or .aCe file
-
-C only produce .o files from .c, .aLk, or .aCe files
-
-K Keep all intermediate files
-
<exec> the name of the executable
-
fn1.aCe a file that contains aCe source code
-
fn2.aLk a file that contains aCe intermediate code
-
fn1.c a file that contains c source code
-
fn2.aLk a file that contains object code
-
-
Once the program has been compiled, the executable has to be copied to
the directory $HOME/pvm3/bin/LINUX directory on bees.
-
-
To copy the executable, ``a.out'' to the bees:
-
% Pcp a.out $HOME/pvm3/bin/LINUX
-
To execute a aCe program a.out on N processes of the HIVE:
-
% pvm_exe a.out -pN
-
-
-
For example, if N=4:
-
% pvm_exe a.out -p4
-
-
-
aCe generates a C program augmented with message passing constructs
from PVM. Therefore, the usual rules for executing any pvm based
program on the HIVE apply.
-
-
For example, pvm_exe is simply a script that does the following for
you:
-
-
Check for pvm daemon
-
Start the pvm daemon on all bees if it is not active.
-
Execute a remote shell on node ``b0" using the arguments to
pvm_exe.
-
For example:
-
% rsh b0 a.out -p4
-
The pvm daemons can be started (this is really not necessary as pvm_exe
automatically does this for you) and manipulated from usrhive. The
following set of commands are available for this purpose:
-
% pvml
-
-
- starts the pvm daemon over the network.
-
-
% pvml i
-
- interactive mode
-
-
% pvml conf
-
- prints the virtual machine configuration
-
-
% pvml reset
-
- Use this command to kill all your pvm applications. However, if you
have multiple pvm applications running, and needs to kill only one of
them, you should go to the interactive mode (pvml i) and execute a kill
from there for the appropriate task id.
-
-
% pvml restart
-
- To kill all pvm processes and restart the pvm daemon.
-
-
Instead of using pvm_exe and pvml commands from usrhive, one could
always login to ``b0" and start the pvm daemons and execute the
pvm based aCe programs in the usual way.
-
Udaya A. Ranawake / NASA GSFC / udaya@neumann.gsfc.nasa.gov