[Pw_forum] newbie update
glaweh at physik.fu-berlin.de
Thu Mar 5 10:58:57 CET 2009
On Thu, Mar 05, 2009 at 10:51:43AM +0100, Lorenzo Paulatto wrote:
> You have to export the variable, for it to work.
> e.g. this works:
> OMP_NUM_THREAD=1 ./myprogram
> this works as well:
> export OMP_NUM_THREAD=1
> but this does NOT work:
> mysteries of bash shell...
general property of shell variables:
if you set a variable without exporting it, this variable is set only for
this shell, but not for its child processes (such as the pw.x).
a child process only "sees" environment variables, which you create with the
export command :)
More information about the users