5 Apr
2017
5 Apr
'17
7:32 p.m.
So let's check that we can actually do that:
Can you do:
$ export PETSC_DIR=/path/to/petsc/dir $ expect PETSC_ARCH=your-petsc-arch
$ mpiexec -n 16 python -c "import os; print os.environ['PETSC_DIR'],os.environ.get('PETSC_ARCH', 'not found')"
Yes, I am getting:
Traceback (most recent call last): File "<string>", line 1, in <module> File "/rwthfs/rz/cluster/work/hb111949/Firedrake/firedrake-own- petsc/firedrake/lib64/python2.7/UserDict.py", line 23, in __getitem__ raise KeyError(key) KeyError: 'PETSC_DIR'
Ok. I defined PETSC_DIR and PETSC_ARCH only as shell variables and not as environment variables, i.e. I did not export them. When exporting the variables everything works as it should. Henrik