Syntax for .mypgirc file

Hi,

I want to add to all compilations “-tp k8-64”. So instead of setting all the flag variables all the time I would like to put it in one of the available .my*rc files. But what is the correct syntax to do so? There are some examples in the User’s Guide on page 14. But is there anywhere a complete listing of all possible settings (i.e. known keywords) and how to do it? Just adding the necessary flag therein results in:

RC file /opt/pgi/linux86-64/10.9/bin/.pgf77rc line 47: Bad RC file:
k8 - 64

and line 47 point to my private .mypgirc with the line “-tp k8-64”.

– Reuti

Hi Reti,

Try adding the following to your personal rc files.

set POSTOPTIONS=$ifn(-tp,-tp=k8-64);

One thing to note is that by default the compiler will use the build system’s processor as the target. Hence, if you are build and running your executable on the same system, you should not need to use the -tp flag.

Hope this helps,
Mat

Thx, this is working fine for me and exactly what I need. We have the PGI Workstation running on a machine with Shanghai-64, and I have to compile some stuff for older Opterons (and not surprisingly the latest default settings will generate a binary which crashes instantly because of “illegal instruction”).

– Reuti