HELLO
The Hello World Program, OpenMP version


HELLO is a simple program that says "Hello", but also demonstrates a few simple things about OpenMP programs, including

To use the program, you will also need to figure out the appropriate compiler switches to use, and how to set the enviroment variable OMP_NUM_THREADS to the number of threads you want.

Source Code:

To run the HELLO program, you first need to copy one of these source code files, compile it using the appropriate compiler switches, and be sure to name the executable hello.

Script for Batch Execution:

Once you have made an OpenMP executable from the hello source code, copy the following script file to the same directory, and issue the command msub hello.sh. That submits a request to have the executable program run on 4 processors. You can type showq to see if the request has started yet. When the program has completed, the output should show up in a file whose name will be something like "hello.o12345".


You can go up one level to the FSU OpenMP 2008 page.

Last revised on 04 September 2008.