[Insight-developers] valgrind & ITK

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Feb 2 15:04:01 EST 2012


I think the problem comes from this small change

commit fedc93dc2602f19da9decdc8e614b30f61efb9e4
Author: David Cole <david.cole at kitware.com>
Date:   Tue Sep 13 17:24:36 2011 -0400

     BUG: Use @ONLY when configuring CTestCustom.cmake

     Without it, the if(APPLE) chunk at the bottom of the file
     effectively replaces all the unconditional warning suppressions
     above it, because ${CTEST_CUSTOM_WARNING_EXCEPTION} disappears
     when configured without @ONLY...

     Change-Id: Ib1109e52947037c97fee5dfb82aa57ba71441618

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72e4a77..8293c4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -545,7 +545,7 @@ foreach(itk-module ${ITK_MODULES_ENABLED})
  endforeach()

   
#----------------------------------------------------------------------------
-configure_file(CMake/CTestCustom.cmake.in CTestCustom.cmake)
+configure_file(CMake/CTestCustom.cmake.in CTestCustom.cmake @ONLY)

   
#-----------------------------------------------------------------------------

and should be fixed simply with

http://review.source.kitware.com/#/c/4022/

Sean, could you test that change in your valgrind build?

Thanks,

Gaëtan


Le 2 févr. 12 à 20:12, Bill Lorensen a écrit :

> Gaëtan,
>
> Just to be clear. Your valgrind build machine is fine. Sean is setting
> up a new machine.
>
> Bill
>
> 2012/2/2 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>>
>> Le 2 févr. 12 à 18:53, Sean McBride a écrit :
>>
>>
>>> On Fri, 27 Jan 2012 13:08:55 -0500, Sean McBride said:
>>>
>>>> We've been setting up a valgrind dashboard, but the execution  
>>>> times of
>>>> ITK tests range across several orders of magnitude.
>>>>
>>>> This makes choosing a timeout difficult, and especially so with
>>>> valgrind, where execution takes so much longer.
>>>>
>>>> Could maybe the slowest ITK tests be broken up into several  
>>>> tests? Or is
>>>> there a way to specify different timeouts for with and without  
>>>> valgrind?
>>>
>>>
>>> No one has any thoughts on this?...
>>>
>>>
>>> Our next problem is that there are many thousands of valgrind  
>>> warnings
>>> from python.  From the logs:
>>>
>>> 100: MemCheck command: /usr/local/bin/valgrind "--trace- 
>>> children=yes"
>>> "--quiet" "--tool=memcheck" "--leak-check=yes" "--show- 
>>> reachable=yes"
>>> "--num-callers=50" "--verbose" "--demangle=yes" "--gen- 
>>> suppressions=all"
>>> "--suppressions=/home/builder/external/ITK/CMake/ 
>>> InsightValgrind.supp"
>>> "/usr/bin/python" "/home/builder/external/ITK/Utilities/Doxygen/ 
>>> mcdoc.py"
>>> "check" "ITKCommon" "/home/builder/external/ITK/Modules/Core/ 
>>> Common/include"
>>>
>>> As you can see valgrind is invoked on python itself, therefore  
>>> flagging
>>> issues within python itself.
>>>
>>> The valgrind docs discuss this:
>>>
>>> <http://valgrind.org/docs/manual/manual-core.html>
>>>
>>> "Note that you should run the real (machine-code) executable here.  
>>> If your
>>> application is started by, for example, a shell or Perl script,  
>>> you'll need
>>> to modify it to invoke Valgrind on the real executables. Running  
>>> such
>>> scripts directly under Valgrind will result in you getting error  
>>> reports
>>> pertaining to /bin/sh, /usr/bin/perl, or whatever interpreter  
>>> you're using.
>>> This may not be what you want and can be confusing. You can force  
>>> the issue
>>> by giving the option --trace-children=yes, but confusion is still  
>>> likely."
>>>
>>> Should this be fixed with suppressions?  I see some python 2.6
>>> suppressions in InsightValgrind.supp already....
>>
>>
>>
>> This tests should not be run with valgrind.
>> I thought I've done that a few months ago... I'll try to look at  
>> that in the
>> next days.
>>
>> Gaëtan
>>
>> --
>> Gaëtan Lehmann
>> Biologie du Développement et de la Reproduction
>> INRA de Jouy-en-Josas (France)
>> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
>> http://mima2.jouy.inra.fr  http://www.itk.org
>> http://www.bepo.fr
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>
>
>
> -- 
> Unpaid intern in BillsBasement at noware dot com

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://mima2.jouy.inra.fr  http://www.itk.org
http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20120202/96f917ad/attachment.pgp>


More information about the Insight-developers mailing list