octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: qhull6 and octave


From: Tatsuro MATSUOKA
Subject: Re: qhull6 and octave
Date: Sat, 3 Dec 2011 05:01:46 +0900 (JST)

Hello

I cannot test at present for PC in my home because the CPU power insufficient 
for octave building on the current octave source. I will make a try on the PC 
in the university (Windows 7 64 bit Home Premium: CPU core-i5 Sandy Bridge with 
4GB memory).

I do not know the Petr's change. Please show me the pointer to know the detail.

BTW, qhull2010 can be linked without error. Is the api of the qhull libraries 
of the qhull 2011 change from that of 2010?

Regards

Tatsuro

--- On Fri, 2011/12/2, Brad Barber wrote:

> Hi Tatsuro,
> 
> Did you make Petr's change (compiling the test program with -Dqh_QHpointer)?  
> If not that's may be the source of your problem.  If it isn't, you'll need to 
> provide more information since I don't have octave running here and can't use 
> debian builds (its a Windows system).  
> 
> A good approach is to compare a trace of your test program, with the 
> corresponding trace from Qhull.  Option 'T1' gives a high level view, option 
> 'T4' gives most of the details.  Option 'T5' includes memory management.  
> There's various commands to turn on tracing according to a trigger event.
> 
>                                         --Brad
> P.S: email to octave-help bounces.  What should the address be?
> 
>                                                 
> At 03:01 AM 12/1/2011, Tatsuro MATSUOKA wrote:
> >Hello
> >
> >On MinGW,qhull2011 gives errors.
> >(The qhull library was created using GCC-4.6.1)
> >
> >For example,   
> >src\DLD-FUNCTIONS\convhulln.cc ......................... PASS    0/3    FAIL 
> >3
> >
> >  ***** testif HAVE_QHULL cube = [0 0 0;1 0 0;1 1 0;0 1 0;0 0 1;1 0 1;1 1 
> >1;0 1 1];Â [h, v] = convhulln (cube);Â
> > assert (size (h), [6 4]);Â Â h = sortrows (sort (h, 2), [1:4]);Â assert (h, 
> > [1 2 3 4; 1 2 5 6; 1 4 5 8; 2 3 6 7; 3 4 7 8; 5 6 7 8]);Â assert (v, 1, 
> > 10*eps);!!!!! test failedassert (size (h),[6, 4]) expected   6   4but 
> > got   0   3values do not match  ***** testif HAVE_QHULL cube = [0 0 
> > 0;1 0 0;1 1 0;0 1 0;0 0 1;1 0 1;1 1 1;0 1 1];Â [h, v] = convhulln (cube, 
> > "QJ");Â assert (size (h), [12 3]);Â Â assert (sortrows (sort (h, 2), 
> > [1:3]), [1 2 4; 1 2 5; 1 4 5; 2 3 4; 2 3 6; 2 5 6; 3 4 8; 3 6 7; 3 7 8; 4 5 
> > 8; 5 6 8; 6 7 8]);Â assert (v, 1.0, 1e6*eps);!!!!! test failedassert (size 
> > (h),[12, 3]) expected   12    3but got   0   3values do not match  
> > ***** testif HAVE_QHULLÂ tetrahedron = [1 1 1;-1 -1 1;-1 1 -1;1 -1 -1];Â 
> > [h, v] = convhulln (tetrahedron);Â h = sortrows (sort (h, 2), [1 2 3]);Â 
> > assert (h, [1 2 3;1 2 4; 1 3 4; 2 3
> > 4]);Â assert (v, 8/3, 10*eps);!!!!! test failedassert (h,[1, 2, 3; 1, 2, 4; 
> > 1, 3, 4; 2, 3, 4]) expected   1   2   3   1   2   4   1   3   
> > 4   2   3   4but got[](0x3)Dimensions don't match
> >This error did not occur on qull2010.
> >
> >Regards
> >
> >Tatsuro--- On Thu, 2011/12/1, Brad Barber wrote:
> >
> >> Hi Petr,
> >> 
> >> Glad it worked.   Without seeing the whole build system that was used, 
> >> here's my guess from what you showed me.
> >> 
> >> Some news first.  I've released qhull 2011.2 with several changes, mostly 
> >> minor.   Octave may be interested in the fix to qh_new_qhull (call 
> >> qh_prepare_output if !outfile).  qh_prepare_output handles options that 
> >> are processed after building the convex hull (e.g., compute area and 
> >> volume).  There's a new, simple Makefile for static builds (in 
> >> src/libqhull).   
> >> 
> >> Please let me know when the Debian builds are available.  The qhull 
> >> download page is rather out-of-date.  Can someone produce a rpm build?  
> >> I've also lost my archive/mirror site for old Qhull downloads.  Let me 
> >> know if someone would like to host it.
> >>     http://www.qhull.org/download/
> >> 
> >> qhull5 was apparently built with qh_QHpointer=0  [user.h].  The global 
> >> data structure for qhull is defined as a static array qh_qh [libqhull.h]. 
> >>  qhull6 was built with qh_QHpointer=1.  The global data structure for 
> >> qhull is allocated on the heap with a pointer from the global variable 
> >> qh_qh.   This allows for multiple global data structures that can be 
> >> swapped by updating qh_qh.   Two other pointers/static structures are 
> >> similarly defined (qh_qhmem for the memory allocator and qh_qhstat for 
> >> statistics).  
> >> 
> >> The extra flexibility comes at some cost.  The last time I measured it, 
> >> the cost was 4% overhead in space and 4% in time.  The C++ interface for 
> >> qhull uses qh_QHpointer=1.    The same effect could be achieved by 
> >> copying data from  statically defined structures to/from the heap.
> >> 
> >> The code references these representations with the 'qh', 'qhmem', and 
> >> 'qhstat' macros.  That's why the code has an odd appearance.  These 
> >> macros allow the data structures to be allocated elsewhere (e.g., 
> >> thread-local storage or an extra function parameter).
> >> 
> >> Many thanks for keeping Qhull part of Octave.
> >> 
> >>                                 --Brad
> >> 
> >> At 06:09 AM 11/30/2011, Petr Gajdos wrote:
> >> >Hi Brad,
> >> >
> >> >very well, defining qh_QHpointer to 1, i. e.
> >> >
> >> >#include <stdio.h>
> >> >#if defined QHULL5
> >> >#include <qhull/qhull_a.h>
> >> >#warning qhull5
> >> >#else
> >> >#define qh_QHpointer 1
> >> >#include <libqhull/qhull_a.h>
> >> >#warning qhull6
> >> >#endif
> >> >...
> >> >
> >> >gives same results for qhull6 as for qhull5.
> >> >
> >> >When you find time, could you please give me 
> >> >an explanation (maybe cc octave-help@ too)?
> >> >
> >> >Have a nice day & thanks a lot,
> >> >Petr
> >> >
> >> >
> >> 
> >> 
> >
> >
> >
> >-----
> >No virus found in this message.
> >Checked by AVG - www.avg.com
> >Version: 10.0.1411 / Virus Database: 2092/4049 - Release Date: 11/30/11
> 
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]