[petsc-users] minor error message compiling

Nachiket Gokhale gokhalen at gmail.com
Wed Aug 8 12:16:31 CDT 2012


On Wed, Aug 8, 2012 at 1:03 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> On Wed, 8 Aug 2012, Nachiket Gokhale wrote:
>
>> I just upgraded to 3.3 and while compiling I get the following error:
>>
>> Traceback (most recent call last):
>>   File "/opt/petsc/petsc-3.3-p2/bin/petscnagupgrade.py", line 54, in <module>
>>     petscdir = os.environ['PETSC_DIR']
>>   File "/usr/local/lib/python2.7/UserDict.py", line 23, in __getitem__
>>     raise KeyError(key)
>> KeyError: 'PETSC_DIR'
>> make: [petscnagupgrade] Error 1 (ignored)
>>
>> Seems to occur only when the env variable PETSC_DIR is not defined;
>> the program seems to compile properly inspite of this error.
>
> Hm petscnagupgrade.py is primarily invoked by make - and when using
> PETSc makefiles - PETSC_DIR is always set - so I'm not sure why you
> get this error.
>
> Are you using PETSc makefiles? What make are you using? [gnu/ bsd/solaris?]
>
> Does the attached patch fix it?
>
> patch -Np1 < petscnag.patch
>
> Satish

Yes your attached patch fixes it. Thanks!

I should have been more clear. The problem occured not while compiling
PETSc but a small SlepC application. I am including

include    ${SLEPC_DIR}/conf/slepc_common

in my Makefile and relying on it to include PETSC variables.

I have a standard Redhat Enterprise Linux system.

Thanks!

-Nachiket


More information about the petsc-users mailing list