[Openmd-developers] QHULL as static while building

Martin Vala mvala at saske.sk
Mon Sep 8 15:56:30 EDT 2014


Hi Dan,

I removed STATIC from CMAKE and compiled with shared qhull

when i run gold example http://openmd.org/?p=277 i see following segv. I 
was looking to the code and it is not telling me too much yet (i just 
started to use openmd). One think what i see and i don't know if this is 
problem is :

facet variable (pointer) (line 76) is declared and it is not initialized 
so address is random. Then i don't see any "new" operator. Maybe it is 
hidden somewhere. Then at line 217

Vector3d V3dNormal(facet->normal[0], facet->normal[1], facet->normal[2]);

and i think this is failing

here is output from gdb

Program received signal SIGSEGV, Segmentation fault.
0x000000000065c924 in OpenMD::ConvexHull::computeHull (this=0xc16030, 
bodydoubles=std::vector of length 887, capacity 887 = {...}) at 
/tmp/openmd-2.2/src/math/ConvexHull.cpp:214
214       FORALLfacets {
(gdb) where
#0  0x000000000065c924 in OpenMD::ConvexHull::computeHull 
(this=0xc16030, bodydoubles=std::vector of length 887, capacity 887 = 
{...}) at /tmp/openmd-2.2/src/math/ConvexHull.cpp:214
#1  0x00000000007e71f6 in 
OpenMD::LangevinHullForceManager::LangevinHullForceManager 
(this=0xc104a0, info=0xb1fae0) at 
/tmp/openmd-2.2/src/integrators/LangevinHullForceManager.cpp:176
#2  0x00000000007bcf51 in 
OpenMD::LangevinHullDynamics::LangevinHullDynamics (this=0xb1c7a0, 
info=0xb1fae0) at 
/tmp/openmd-2.2/src/integrators/LangevinHullDynamics.cpp:57
#3  0x00000000006c4d55 in 
OpenMD::IntegratorBuilder<OpenMD::LangevinHullDynamics>::create 
(this=0xb1c340, info=0xb1fae0) at 
/tmp/openmd-2.2/src/integrators/IntegratorCreator.hpp:76
#4  0x00000000006d6080 in OpenMD::IntegratorFactory::createIntegrator 
(this=0xb1bc50, id="LHULL", info=0xb1fae0) at 
/tmp/openmd-2.2/src/integrators/IntegratorFactory.cpp:72
#5  0x0000000000601f01 in main (argc=2, argv=0x7fffffffd638) at 
/tmp/openmd-2.2/src/applications/openmd/openmd.cpp:188
(gdb) list
209       // intPoint = qh interior_point;
210       // RealType calcvol = 0.0;
211
212       qh_triangulate ();
213
214       FORALLfacets {
215         Triangle face;
216         //Qhull sets the unit normal in facet->normal
217         Vector3d V3dNormal(facet->normal[0], facet->normal[1], 
facet->normal[2]);
218         face.setUnitNormal(V3dNormal);
(gdb)

Can you check?

Ciao

Martin


On 08/09/2014 21:23, Martin Vala wrote:
> Hi Dan,
>
> i will and i will let you know. Probably i will have to remove STATIC 
> from add_library (...)
>
> Ciao
>
> Martin
>
> On 08/09/2014 21:22, Dan Gezelter wrote:
>>> Is there a reason that openmd uses static lib instead of shared lib? 
>>> Because from c++ point of view it will only increase size of final 
>>> executable size. If one would compile qhull as shared size of 
>>> executable is smaller, but qhull shared lib would need to be in 
>>> LD_LIBRARY_PATH, which i think is not problem.
>> Martin,
>>
>> I think an earlier version of the qhull library didn't actually work 
>> on dynamic loading.  If you try converting to shared, make sure you 
>> test out a simulation that uses the LHull integrator. I'll try a 
>> build now without to see.
>>
>>   --Dan
>>
>>
>> ***********************************************
>>    J. Daniel Gezelter
>>    Associate Professor of Chemistry
>>    Department of Chemistry and Biochemistry
>>    251 Nieuwland Science Hall
>>    University of Notre Dame
>>    Notre Dame, IN 46556-5670
>>
>>    phone:  +1 (574) 631-7595
>>    fax:    +1 (574) 631-6652
>>    e-mail: gezelter at nd.edu
>>    web:    http://www.nd.edu/~gezelter
>> ************************************************
>>
>>
>>
>
> _______________________________________________
> Openmd-developers mailing list
> Openmd-developers at openmd.org
> http://openmd.org/mailman/listinfo.cgi/openmd-developers



More information about the Openmd-developers mailing list