How do I compile the output of Polaris (the _P.f) file?

Polaris by default places the output into a file call *_P.f where * is the source file name. Polaris is a source-to-source restructurer, meaning that it accepts Fortran as input and generates Fortran as output. The output Fortran then must be compiled with a backend compiler. We use the OpenMP parallel directives by default and programs using these directives must be compiled using guidef77. (This only applies to user at ECN, other users will have to find there own OpenMP compiler!) The guidef77 executable is also in /home/peak/a/paramnt/tools/bin so you probably do not need to change your path. The guidef77 manual can be found in /home/yara/re/mv/tools/guide38/docs/GuideF_Reference.pdf or also as a postscript file in the same directory. It takes almost the same options as f77 (man f77).

We only have a license for guidef77 on one server: peta.ecn.purdue.edu, so you must be logged into peta in order to compile the output. You do need to have some environment variables set (or add the following to them if you already have them set):

>> setenv GUIDE_HOME /home/yara/re/mv/tools/guide38
>> setenv LD_LIBRARY_PATH /home/yara/re/mv/tools/guide38/lib

To compile a program stored in a file called example_P.f you can type:

>> guidef77 -fast -stackvar -mt -o example example_P.f

I'll briefly explain the flags I used, although a better description can be found in the f77 man page. First, -fast is short for a collection of switches that should be used to generate a well optimized executable (it does machine specific things though, so if you compile using -fast you should not run it on a different machine). -stackvar forces all local variable to be allocated on the stack (this is recommended when running in parallel). And finally, -mt links in the thread-safe libraries. A typical compilation proceeds as shown below:

peta.ecn.purdue.edu 4: guidef77 -fast -stackvar -mt -o example example_P.f

WARNING: guidef77 does not support switch, passed through to
Fortran compiler:  -fast
Guide 3.6 k310744 19990126
19-Aug-1999 16:54:45
Guide 3.6 k310744 19990126: 0 errors
in file example_P.f
G_output.f:
MAIN example:
pkexample_:

peta.ecn.purdue.edu 5: