[petsc-users] valgrind

Matthew Knepley knepley at gmail.com
Mon Dec 1 12:34:13 CST 2014


On Mon, Dec 1, 2014 at 12:33 PM, paul zhang <paulhuaizhang at gmail.com> wrote:

> That is my new configuration. Is that OK?
>
> export PETSC_DIR=`pwd`
> export PETSC_ARCH=linux-gnu-intel
> ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran
> --download-fblaslapack --download-mpich
>  --with-valgrind-dir=/share/cluster/RHEL6.2/x86_64/apps/valgrind/3.9.0
> --with-mpi=1 --with-mpi-dir=/home/hzh225/LIB_CFD/openmpi-1.8.3/
>

That looks correct.

When I say "using PETSc makefiles", I mean for your own project. You appear
to be using CMake.

  Matt


>
> Huaibao (Paul) Zhang
> *Gas Surface Interactions Lab*
> Department of Mechanical Engineering
> University of Kentucky,
> Lexington,
> KY, 40506-0503
> *Office*: 216 Ralph G. Anderson Building
> *Web*:gsil.engineering.uky.edu
>
> On Mon, Dec 1, 2014 at 1:28 PM, paul zhang <paulhuaizhang at gmail.com>
> wrote:
>
>> I did use the PETSc makefiles. Should I include the valgrind path in my
>> own make file again?
>>
>> [hzh225 at dlxlogin2-2 petsc-3.5.2]$ pwd
>> /home/hzh225/LIB_CFD/nP/petsc-3.5.2
>> [hzh225 at dlxlogin2-2 petsc-3.5.2]$ make getincludedirs
>> -I/home/hzh225/LIB_CFD/nP/petsc-3.5.2/include
>> -I/home/hzh225/LIB_CFD/nP/petsc-3.5.2/linux-gnu-intel/include
>> -I/share/cluster/RHEL6.2/x86_64/apps/valgrind/3.9.0/include
>>
>> Huaibao (Paul) Zhang
>> *Gas Surface Interactions Lab*
>> Department of Mechanical Engineering
>> University of Kentucky,
>> Lexington,
>> KY, 40506-0503
>> *Office*: 216 Ralph G. Anderson Building
>> *Web*:gsil.engineering.uky.edu
>>
>> On Mon, Dec 1, 2014 at 11:55 AM, Matthew Knepley <knepley at gmail.com>
>> wrote:
>>
>>> On Mon, Dec 1, 2014 at 10:43 AM, paul zhang <paulhuaizhang at gmail.com>
>>> wrote:
>>>
>>>> Matt,
>>>>
>>>> Thanks for your reply. I am able to compile PETSc. And I went through
>>>> the default tests. Now when I go to my code, I got problems.
>>>>
>>>
>>> I am assuming that you put flags in your makefiles rather than using the
>>> PETSc makefiles. You need all the includes you get from
>>>
>>>    make getincludedirs
>>>
>>>     Matt
>>>
>>>
>>>> [hzh225 at dlxlogin2-1 petsc-3.5]$ make all
>>>> [100%] Building CXX object CMakeFiles/kats.dir/main.cc.o
>>>> /home/hzh225/LIB_CFD/nP/petsc-3.5.2/include/petscsys.h(1760):
>>>> catastrophic error: cannot open source file "valgrind/valgrind.h"
>>>>   #  include <valgrind/valgrind.h>
>>>>                                   ^
>>>>
>>>> compilation aborted for /home/hzh225/CMake/petsc/petsc-3.5/main.cc
>>>> (code 4)
>>>> make[2]: *** [CMakeFiles/kats.dir/main.cc.o] Error 4
>>>> make[1]: *** [CMakeFiles/kats.dir/all] Error 2
>>>> make: *** [all] Error 2
>>>>
>>>>
>>>> Huaibao (Paul) Zhang
>>>> *Gas Surface Interactions Lab*
>>>> Department of Mechanical Engineering
>>>> University of Kentucky,
>>>> Lexington,
>>>> KY, 40506-0503
>>>> *Office*: 216 Ralph G. Anderson Building
>>>> *Web*:gsil.engineering.uky.edu
>>>>
>>>> On Mon, Dec 1, 2014 at 11:28 AM, Matthew Knepley <knepley at gmail.com>
>>>> wrote:
>>>>
>>>>> On Mon, Dec 1, 2014 at 10:21 AM, paul zhang <paulhuaizhang at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> How to enable the valgrind flag? I installed that by myself locally.
>>>>>>
>>>>>>       It appears you do not have valgrind installed on your system.
>>>>>>
>>>>>>
>>>>>>                      We HIGHLY recommend you install it from
>>>>>> www.valgrind.org
>>>>>>
>>>>>>                                                     Or install
>>>>>> valgrind-devel or equivalent using your package manager.
>>>>>>
>>>>>>
>>>>>>  Then rerun ./configure
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> We could not find the valgrind header (valgrind.h). You can use
>>>>>
>>>>>   --with-valgrind-dir=<path>
>>>>>
>>>>> so that it can find the path/include/valgrind/valgrind.h
>>>>>
>>>>>   Thanks,
>>>>>
>>>>>     Matt
>>>>>
>>>>>
>>>>>> Thanks,
>>>>>> Paul
>>>>>>
>>>>>>
>>>>>> Huaibao (Paul) Zhang
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> What most experimenters take for granted before they begin their
>>>>> experiments is infinitely more interesting than any results to which their
>>>>> experiments lead.
>>>>> -- Norbert Wiener
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> What most experimenters take for granted before they begin their
>>> experiments is infinitely more interesting than any results to which their
>>> experiments lead.
>>> -- Norbert Wiener
>>>
>>
>>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141201/e93607f0/attachment-0001.html>


More information about the petsc-users mailing list