Trial license (OSX). need help

Hello

I realize that, most probably, I’m asking a dumb question. but after several hours of tries I could not resolve it.

I’m interested in PGI for profiling my OpenMP app, so I’ve d/loaded it and followed by install instructions. I set up LM_LICENSE_FILE in Terminal via

export LM_LICENSE_FILE=/opt/pgi/license.dat

and when I type

$LM_LICENSE_FILE

it shows the entered path. However, pgiprof and other tools don’t see this path (same as any other) and always report “no such file” ./license.dat
Also when I re-open Terminal, the $LM_LICENSE_FILE is empty

Thx in advance

Hello,

I assume you run bash, rather than cshell, which would use

setenv LM_LICENSE_FILE “/opt/pgi/license.dat”

The second thing is to make sure $PGI is defined

export PGI=/opt/pgi
or
setenv PGI /opt/pgi

so that the compiler will look in the default location
$PGI/license.dat (which is why you saw ‘cant find ./license.dat’)

Finally, I assume there is a license file there and it has world
read permissions.

regards,
dave

Hello Dave

Thx for your help. Yes, I tried many times. I can use “export” in bash same as “setenv” in tcsh. However, the set variables are not saved and disappear when I close Terminal. It looks like they are “local” for this Terminal session only :-(

You now need to add those commands to the rc files for your shell. If you use bash (which I believe is the shell for OS X), add your exports to ~/.bashrc. So within ~/.bashrc you need to add the lines:

export LM_LICENSE_FILE=/opt/pgi/license.dat 
export PGI=/opt/pgi

With that, every time you open Terminal, bash will read ~/.bashrc and execute those exports.