[Insight-developers] SimpleITK dashboard

Bradley Lowekamp blowekamp at mail.nih.gov
Tue Jul 26 11:11:46 EDT 2011


Dan,

Thanks for your work in getting C# to automatically build and test with SimpleITK. We have accomplished a lot getting as far as we have.

To address the difficulties of getting a stable version of ITK with simpleITK we have begun migrating to a SuperBuild system. One benefit of this is that it enables us to specify a specific version of ITK to build, and then build SimpleITK against. That version is specified in ITK_TAG_COMMAND variable in the file here:

https://github.com/SimpleITK/SimpleITK/blob/master/SuperBuild/External_ITKv4.cmake

to use the superbuild cmake just point cmake to "SimpleITK/SuperBuild" and configure. That being said, there are still some major changes that are pending with the super build system, that should make it more configurable from the top level. Currently, you need to run the super build cmake, build, then rerun cmake on the SimpleITK-build sub-directory, to configure SimpleITK as one wishes. This does currently simplify, the problem of which version of ITK should I use.

The min5.nlm system, ( non-super ) is build against the nightly ITK, which needs a pending patch to get it to compile again.

Dan Blezek is in change of the mayo machines.

There are a few failing tests for the C#, they all appear to have a similar problem:

http://www.cdash.org/CDash/testDetails.php?test=105562409&build=1367178

My guess is there is some type issue with the code generated for certain array types for the tests. Have you been able to reproduce these? I very much would like to merge this topic into master tomorrow, and it would just be awesome if there were no related failing tests.

Thanks,
Brad

On Jul 26, 2011, at 10:42 AM, Dan Mueller wrote:

> Hi Brad,
> 
> The SimpleITK dashboard is looking good this morning :D (At least for
> Linux and Win32 builds.) Out of interest, what branch are these
> machines using? I am using remote stage/next, but still get the
> DIRECTIONCOLLAPSETOIDENTITY errors...
> 
> Also, are you in charge of the Linux box mi3c-qbert.mayo.edu? I'm just
> wondering if it would be possible to install Mono so that C# wrapping
> on Linux is covered (unfortunately I don't have access to a Linux
> machine for submitting builds at the moment). If you tell me the Linux
> flavour, I can provide the few commands needed to install the 2 or 3
> Mono-related packages.
> 
> Cheers, Dan Mueller
> 
> On 25 July 2011 15:49, Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:
>> I agree that is starting to be concerning with the size of the library. I am
>> still amazed with how much it shrinks when the wrapped language library is
>> made. There should be something we can do about this.
>> That is great you found a solution. The attached diff is fine. I will place
>> it onto the end of the current topic. And hopefully, it'll be ready for
>> merging into master!
>> Brad
>> 
>> On Jul 25, 2011, at 1:13 AM, Dan Mueller wrote:
>> 
>> Hi Brad,
>> 
>> Debug builds on windows 32-bit systems may not be supported. The library
>> just gets too big. You should try to build a release.
>> 
>> Thanks for the info regarding the release build -- I do not encounter
>> the "can not seek" error in release mode. However, I notice that
>> SimpleITKBasicFilters.lib comes to 700MB, which is getting close to
>> 1GB; perhaps something to watch for in the future as SimpleITK grows.
>> 
>> This morning I located the issue with the SimpleITK C# Visual Studio
>> 2008 build: it seems VS9 can not handle source dependencies specified
>> using a wildcard. I have changed
>> Wrapping/CSharpModules/UseCSharp.cmake to glob any wildcard
>> expressions (as well as a minor bug fix for FindCSharp when using
>> outside of SimpleITK). I have tested the changes using VS9, VS10, and
>> make on Unbuntu. Please find the corrected files attached and diff
>> below. What is your preferred way of working? Do I push the patch to
>> Gerrit?
>> 
>> Cheers, Dan Mueller
>> 
>> ===================================
>> diff --git a/Wrapping/CSharpModules/FindCSharp.cmake
>> b/Wrapping/CSharpModules/FindCSharp.cmake
>> index 690c86e..97551ac 100644
>> --- a/Wrapping/CSharpModules/FindCSharp.cmake
>> +++ b/Wrapping/CSharpModules/FindCSharp.cmake
>> @@ -15,6 +15,9 @@
>> 
>> # TODO: ADD ABILITY TO SELECT WHICH C# COMPILER eg. .NET or Mono (if
>> both exist). For the moment, .NET is selected above Mono.
>> 
>> +# Make sure find package macros are included
>> +include( FindPackageHandleStandardArgs )
>> +
>> unset( CSHARP_COMPILER CACHE )
>> unset( CSHARP_INTERPRETER CACHE )
>> unset( CSHARP_TYPE CACHE )
>> ===================================
>> diff --git a/Wrapping/CSharpModules/UseCSharp.cmake
>> b/Wrapping/CSharpModules/UseCSharp.cmake
>> index 9bb8e29..90fefdd 100644
>> --- a/Wrapping/CSharpModules/UseCSharp.cmake
>> +++ b/Wrapping/CSharpModules/UseCSharp.cmake
>> @@ -64,29 +64,43 @@ macro( CSHARP_ADD_PROJECT type name )
>>   set( refs /reference:System.dll )
>>   set( sources )
>>   set( sources_dep )
>> +
>>   if( ${type} MATCHES "library" )
>>     set( output "dll" )
>>   elseif( ${type} MATCHES "exe" )
>>     set( output "exe" )
>>   endif( ${type} MATCHES "library" )
>> +
>> +  # Step through each argument
>>   foreach( it ${ARGN} )
>>     if( ${it} MATCHES "(.*)(dll)" )
>> +       # Argument is a dll, add reference
>>        set( refs ${refs} /reference:${it} )
>> -    else( ${it} MATCHES "(.*)(dll)" )
>> +    else( )
>> +      # Argument is a source file
>>       if( EXISTS ${it} )
>>         set( sources ${it} ${sources} )
>>         set( sources_dep ${it} ${sources_dep} )
>> -      else( EXISTS ${it} )
>> -        if( EXISTS ${CSHARP_SOURCE_DIRECTORY}/${it} )
>> -          set( sources ${CSHARP_SOURCE_DIRECTORY}/${it} ${sources} )
>> -          set( sources_dep ${CSHARP_SOURCE_DIRECTORY}/${it} ${sources_dep}
>> )
>> -        else( EXISTS ${CSHARP_SOURCE_DIRECTORY}/${it} )
>> -          set( sources ${it} ${sources} )
>> -        endif( EXISTS ${CSHARP_SOURCE_DIRECTORY}/${it} )
>> -      endif( EXISTS ${it} )
>> -    endif ( ${it} MATCHES "(.*)(dll)" )
>> -  endforeach( it )
>> +      elseif( EXISTS ${CSHARP_SOURCE_DIRECTORY}/${it} )
>> +        set( sources ${CSHARP_SOURCE_DIRECTORY}/${it} ${sources} )
>> +        set( sources_dep ${CSHARP_SOURCE_DIRECTORY}/${it} ${sources_dep} )
>> +      elseif( ${it} MATCHES "[*]" )
>> +        # For dependencies, we need to expand wildcards
>> +        FILE( GLOB it_glob ${it} )
>> +        set( sources ${it} ${sources} )
>> +        set( sources_dep ${it_glob} ${sources_dep} )
>> +      endif( )
>> +    endif ( )
>> +  endforeach( )
>> +
>> +  # Check we have at least one source
>> +  list( LENGTH sources_dep sources_length )
>> +  if ( ${sources_length} LESS 1 )
>> +    MESSAGE( SEND_ERROR "No C# sources were specified for ${type} ${name}"
>> )
>> +  endif ()
>> +  list( SORT sources_dep ${sources_dep} )
>> 
>> +  # Perform platform specific actions
>>   set( csharp_compiler_safe ${CSHARP_COMPILER} )
>>   if (WIN32)
>>     string( REPLACE "/" "\\" sources ${sources} )
>> @@ -97,15 +111,18 @@ macro( CSHARP_ADD_PROJECT type name )
>>     string( REPLACE "\\" "/" sources ${sources} )
>>   endif (WIN32)
>> 
>> +  # Add custom target and command
>>   add_custom_command(
>>     COMMENT "Compiling C# ${type} ${name}"
>>     OUTPUT ${name}.${output}
>>     COMMAND ${csharp_compiler_safe}
>>     ARGS /t:${type} /out:${name}.${output}
>> /platform:${CSHARP_PLATFORM} ${refs} ${sources}
>>     WORKING_DIRECTORY ${CSHARP_BINARY_DIRECTORY}
>> -    DEPENDS "${sources_dep}"
>> +    DEPENDS ${sources_dep}
>>   )
>> -  add_custom_target( ${name} ALL
>> -    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${name}.${output}
>> +  add_custom_target(
>> +    ${name} ALL
>> +    DEPENDS ${name}.${output}
>> +    SOURCES ${sources_dep}
>>   )
>> endmacro( CSHARP_ADD_PROJECT )
>> ===================================



More information about the Insight-developers mailing list