trying to do
setenv OMP_NUM_THREADS 8
if at the prompt in a shell I do
setenv OMP_NUM_THREADS 4 that is successful. And my program runs on 4 cores if i launch it.
But I have a file called
runme where it is only this
setenv OMP_NUM_THREADS 8 cd /scratch/run1 ./crunch_numbers.x
crunch_numbers.x program is parallelized with openMP and uses the
OMP_NUM_THREADS environment variable.
Problem is crunch_numbers when run by the runme script runs on 4 cores and not 8. the setting of OMP_NUM_THREADS within my script has no effect. How can i make the setenv in the script effective ?
Also, my shell is /bin/tcsh. I don't plan on using this in a bash shell. thanks.