[petsc-users] minor error message compiling
Nachiket Gokhale
gokhalen at gmail.com
Wed Aug 8 13:46:07 CDT 2012
On Wed, Aug 8, 2012 at 2:24 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> On Wed, 8 Aug 2012, Nachiket Gokhale wrote:
>
>> 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.
>
> Ok. Its still not clear to me whats causing this error. Without
> PETSC_DIR set - how was your make able to get all the way to running
> '/opt/petsc/petsc-3.3-p2/bin/petscnagupgrade.py' [because PETSC_DIR
> was used to locate petscnagupgrade.py at the above path].
>
> Satish
Well, PETSC_DIR was always set in the Makefile (attached), but not in
the environment variables in the shell. Setting or unsetting in the
bash shell seemed to trigger that error.
-Nachiket
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 1833 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120808/1d3ea210/attachment.obj>
More information about the petsc-users
mailing list