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 > ./myprogram > > but this does NOT work: > OMP_NUM_THREAD=1 > ./myprogram > > 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 :) -- c u henning
