[Kwiver-users] MapTK issues on Windows

Michael Rosen michael.rosen at gmail.com
Tue Oct 6 17:47:25 EDT 2015


Thanks very much.  This looks really helpful.  I'll give it a spin and let
you know how it goes.

msr

On Tue, Oct 6, 2015 at 2:01 PM, Matthew Leotta <matt.leotta at kitware.com>
wrote:

>
> On Oct 6, 2015, at 3:38 PM, Michael Rosen <michael.rosen at gmail.com> wrote:
>
> Thanks for this.  It compiles and the assert is gone.
>
> To be clear, here's what I did:
>
> git clone https://github.com/Kitware/maptk.git
> cd .\maptk
> git fetch origin pull/88/head:dev/camera-pass-by-reference
> git checkout dev/camera-pass-by-reference
> cmake -G "NMake Makefiles" -DBOOST_ROOT=C:\dev\fletch\install
> -DEIGEN3_INCLUDE_DIR="C:\Program Files (x86)\Eigen\include\eigen3"
> nmake
> nmake install
>
>
>
> Interesting, so you didn’t need to do any of the defines to disable byte
> alignment for Eigen?  Were you building master or release before?
>
> By the way, I have now merged that dev/camera-pass-by-reference branch
> into both the release and master branches of MAP-Tk, so you should be able
> to use one of the primary branches again.
>
>
>
> Is there a simple workflow you can pass that will demonstrate use of some
> of the utilities.  For example, suppose I have a collection of overlapping
> images, what can I do with them?
>
>
> I’ve been meaning to write up a tutorial on this, but haven’t gotten to it
> yet.  Part of this is because there are big API changes coming soon as well
> as improvements in algorithms.  There is a bunch of stuff building up that
> I can’t release yet until I get approval from AFRL.  A preview of those
> changes is on the kwiver-integration branch.  We are pulling a lot of core
> guts of MAP-Tk out into a new repository named VITAL (
> https://github.com/kitware/vital) that is shared across KWIVER projects.
> I don’t recommend building that on Windows just yet.  But Keith Fieldhouse
> is working on a KWIVER “super build” that will use CMake to make the
> various projects build together easily.
>
> Anyway, the best I can do at this point is to point you to a tutorial I
> gave back in June at the CVPR conference:
>
> http://www.kitware.com/cvpr2015-tutorial.html
>
> This used a version of MAP-Tk similar to the current release branch.
> There are examples for applying MAP-Tk to a sample dataset.  A Linux VM
> image is provided with all the software and data pre-installed, but you can
> also get the config files here:
>
> https://github.com/mleotta/cvpr2015-opensfm/tree/master/Exercises/maptk
>
> and the sample data here:
>
> https://github.com/mleotta/cvpr2015-opensfm/tree/master/Data/CLIF_2007
>
> and slides explaining what to do here:
>
>
> http://midas3.kitware.com/midas/download/item/317119/Hands_on_with_MAP-Tk.pdf
>
> FYI, MAP-Tk is (for the moment) a bit specialized to aerial imagery, so it
> might not work well out of the box on arbitrary images.
>
> Good Luck,
> Matt
>
>
>
>
> msr
>
> On Tue, Oct 6, 2015 at 10:36 AM, Matthew Leotta <matt.leotta at kitware.com>
> wrote:
>
>> Michael,
>>
>> Thank you for reporting this issue.  I’ll be upfront and warn you that
>> I’m not a Windows developer and MAP-Tk is currently better tested on Linux
>> and Mac.  That said, we are working toward getting things better running on
>> Windows more reliably.
>>
>> In this case, the issues are related to Eigen byte-alignment issues as
>> explained on the Eigen website linked from your error message:
>>
>> http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html
>>
>> I have read this page before, and expected I would need to make changes
>> at some point to work around these issues, but until now I had not come
>> across a compiler that exhibited these symptoms.  We should probably try to
>> get a VisualStudio 2012 build up on our dashboard so I can work through
>> those issues properly.  I expect that will take some time.  A shorter term
>> solution is to try to disable alignment in your build.  Can you try the
>> solutions described at the bottom of the page at the above URL?  In the "I
>> don't care about vectorization, how do I get rid of that stuff?” section it
>> suggests defining some macros to disable alignment.  Let me know if that
>> works.
>>
>> In the meantime, I can at least work around that pass-by-value build
>> issue.  That function is pass-by-value because we intentionally want to
>> make a local copy of the camera object to modify.  However, I can
>> explicitly make that copy inside the function instead.  I’ve done this on
>> the release branch of MAP-Tk and made a pull request (
>> https://github.com/Kitware/maptk/pull/88).  Can you try to build this
>> branch and verify that it at least builds for you?
>>
>> git fetch origin pull/88/head:dev/camera-pass-by-reference
>> git checkout dev/camera-pass-by-reference
>>
>> If that works, I’ll merge this change into the release and master
>> branches.  Also let me know if the solution on the Eigen page helps.
>>
>> —Matt
>>
>>
>> On Oct 5, 2015, at 1:24 PM, Michael Rosen <michael.rosen at gmail.com>
>> wrote:
>>
>> Hello Kwiver-folk,
>>
>> I'm building MapTK on Windows 7/64 using VStudio 12 and having two
>> immediate difficulties:  a compilation problem and a runtime assert.
>>
>> MapTK is version 0.6.0, Eigen is 3.2.6
>>
>> I've worked through getting Boost and Eigen built.  When I compile maptk,
>> the first problem is this:
>>
>>    [ 98%] Building CXX object
>> tools/CMakeFiles/maptk_pos2krtd.dir/pos2krtd.cxx.obj
>>
>>   pos2krtd.cxx
>>
>>   C:\dev\maptk\tools\pos2krtd.cxx(220) : error C2719: 'base_camera':
>> formal parameter with __declspec(align('16')) won't
>>
>>   be aligned
>>
>>   C:\dev\maptk\tools\pos2krtd.cxx(238) : error C2719: 'base_camera':
>> formal parameter with __declspec(align('16')) won't
>>
>>>>
>>
>> I fixed these compilation errors by changing the signature of the
>> offending function from pass-by-value to pass-by-reference:
>>
>>
>>     /// Convert a POS file to a KRTD file
>>
>>     bool convert_pos2krtd(const maptk::path_t& pos_filename,
>>
>>                       const maptk::path_t& krtd_filename,
>>
>>                       maptk::local_geo_cs& cs,
>>
>>                       maptk::camera_d& base_camera, // msr.  was
>> pass-by-value
>>
>>                       maptk::rotation_d const& ins_rot_offset =
>> maptk::rotation_d())
>>
>>
>>
>> That allows everything to compile and link.  The next problem was that I
>> got an Eigen Assert when I run any of the executables:
>>
>>
>> C:\Program Files (x86)\MAPTK\bin>maptk_analyze_tracks.exe
>>
>> ...
>>
>> Assertion failed: (reinterpret_cast<size_t>(array) & 0xf) == 0 && "this
>> assertion is explained here: " "http://eigen.tuxfamily.org/d
>>
>> ox-devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE
>> !!! ****", file c:\program files (x86)\eigen\include\eigen
>>
>> 3\eigen\src/Core/DenseStorage.h, line 86
>>
>>
>> The web page says that classes which contain certain Eigen data
>> structures as members need to use the
>>
>>      EIGEN_MAKE_ALIGNED_OPERATOR_NEW macro to override the "new" operator
>> so that those members will be 16-byte aligned. I've done that but am still
>> seeing the assert.
>>
>>
>> Can anyone offer insight into any of this?
>>
>>
>> msr
>>
>>
>> _______________________________________________
>> Kwiver-users mailing list
>> Kwiver-users at public.kitware.com
>> http://public.kitware.com/mailman/listinfo/kwiver-users
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/kwiver-users/attachments/20151006/d89a56cd/attachment-0001.html>


More information about the Kwiver-users mailing list