next up previous

4.9 Compiling and Linking

A CMMD program can be compiled with the usual compilers cc and f77. The linking should, however, be done using cmmd-ld. cmmd-ld requires that you specify the compiler environment using the -comp switch, the node object using the -node switch, and the host object (if any) using the -host switch.

Example
Suppose myprog.f is a hostless FORTRAN77 program. It can be compiled and linked for execution on the nodes as follows:

f77 -c myprog.f
cmmd-ld -comp f77 -node myprog.o -o myprog

If mynode.c is the node program and myhost.c is the host program written in C, then they can be compiled and linked as follows:

cc -c myhost.c
cc -c mynode.c
cmmd-ld -comp cc -host myhost.o -node mynode.o -o myprog