Re: [Yade-users] [Question #297855]: AttributeError: 'module' object has no attribute 'inGtsSurface'

2016-11-03 Thread Matt Kesseler
Question #297855 on Yade changed:
https://answers.launchpad.net/yade/+question/297855

Status: Answered => Solved

Matt Kesseler confirmed that the question is solved:
In the end we modified the script so it didn't require GTS, so this case
can be closed.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #297855]: AttributeError: 'module' object has no attribute 'inGtsSurface'

2016-09-09 Thread Colin Bannister
Question #297855 on Yade changed:
https://answers.launchpad.net/yade/+question/297855

Colin Bannister posted a new comment:
Thanks Klaus, that at least gives me a clue where to look.  I'll report
back when I've had a go at a new build.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #297855]: AttributeError: 'module' object has no attribute 'inGtsSurface'

2016-08-22 Thread Klaus Thoeni
Question #297855 on Yade changed:
https://answers.launchpad.net/yade/+question/297855

Klaus Thoeni posted a new comment:
Hi Colin,

what distro are you using? Have you tried to compile the latest trunk
version? We recently compiled yade on our HPC running with Red Hat 7.2.
There were some problems too but not related to the GTS module. We are
using the latest trunk version.

Just looked at my CMakeCach.txt and noted that I have a couple of lines
related to GTS which are missing in your file:

//Location of Python module gts
PY_gts:STRING=/usr/lib/python2.7/dist-packages/gts

//Details about finding gts
FIND_PACKAGE_MESSAGE_DETAILS_gts:INTERNAL=[/usr/lib/python2.7/dist-packages/gts][v()]

Not sure, but maybe FindGTS is not setting everything as it should?

Klaus

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #297855]: AttributeError: 'module' object has no attribute 'inGtsSurface'

2016-08-22 Thread Colin Bannister
Question #297855 on Yade changed:
https://answers.launchpad.net/yade/+question/297855

Colin Bannister posted a new comment:
Is anyone able to suggest how we might resolve this issue ?  Is a re-
build needed, and if so, how should it be done differently to before ?

Any assistance gratefully received!

Colin

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #297855]: AttributeError: 'module' object has no attribute 'inGtsSurface'

2016-07-28 Thread Colin Bannister
Question #297855 on Yade changed:
https://answers.launchpad.net/yade/+question/297855

Colin Bannister posted a new comment:
To be clear, I actually used ccmake to add the options - I set

CMAKE_CXX_COMPILER /cm/shared/apps/gcc/5.2.0/bin/c++
CMAKE_C_COMPILER /cm/shared/apps/gcc/5.2.0/bin/gcc
EIGEN_INCLUDE_DIR /cm/shared/apps/eigen-3.2.8/include
PYTHON_INCLUDE_DIR /cm/shared/apps/python/2.7.12/include/python2.7
PYTHON_LIBRARY /cm/shared/apps/python/2.7.12/lib/libpython2.7.so
LOKI_INCLUDE_DIR /cm/shared/apps/loki-0.1.7/gcc/include
LOKI_LIBRARY /cm/shared/apps/loki-0.1.7/gcc/lib
GTS_CONFIG /cm/shared/apps/gts-0.7.6/gcc/bin/gts-config

also set ENABLE_GUI to OFF, and set install directory
(CMAKE_INSTALL_PREFIX)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #297855]: AttributeError: 'module' object has no attribute 'inGtsSurface'

2016-07-28 Thread Colin Bannister
Question #297855 on Yade changed:
https://answers.launchpad.net/yade/+question/297855

Colin Bannister posted a new comment:
OK - obviously I did that before the make!

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #297855]: AttributeError: 'module' object has no attribute 'inGtsSurface'

2016-07-28 Thread Jérôme Duriez
Question #297855 on Yade changed:
https://answers.launchpad.net/yade/+question/297855

Jérôme Duriez posted a new comment:
To compile yade from sources, you have to run (before make install) some 
"cmake" command with attributes, see the first lines of 
https://yade-dem.org/doc/installation.html#compilation
Which will give you some output in the terminal

This is what "cmake-step" is ! ;-)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #297855]: AttributeError: 'module' object has no attribute 'inGtsSurface'

2016-07-28 Thread Colin Bannister
Question #297855 on Yade changed:
https://answers.launchpad.net/yade/+question/297855

Colin Bannister posted a new comment:
I am not sure what you mean by 'cmake-step':

$ cmake-step
-bash: cmake-step: command not found

Contents of CMakeCache.txt:

# This is the CMakeCache file.
# For build in directory: 
/panfs/panasas01.panfs.cluster/cczcb/builds/yade/yade-build
# It was generated by CMake: /cm/shared/apps/cmake/2.8.12.2/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.


# EXTERNAL cache entries


//Path to a library.
AMD_LIBRARY:FILEPATH=AMD_LIBRARY-NOTFOUND

//Path to a file.
BZIP2_INCLUDE_DIR:PATH=/usr/include

//Path to a library.
BZIP2_LIBRARY_DEBUG:FILEPATH=BZIP2_LIBRARY_DEBUG-NOTFOUND

//Path to a library.
BZIP2_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libbz2.so

//Boost date_time library (debug)
Boost_DATE_TIME_LIBRARY_DEBUG:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_date_time.so

//Boost date_time library (release)
Boost_DATE_TIME_LIBRARY_RELEASE:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_date_time.so

//The directory containing a CMake configuration file for Boost.
Boost_DIR:PATH=Boost_DIR-NOTFOUND

//Boost filesystem library (debug)
Boost_FILESYSTEM_LIBRARY_DEBUG:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_filesystem.so

//Boost filesystem library (release)
Boost_FILESYSTEM_LIBRARY_RELEASE:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_filesystem.so

//Path to a file.
Boost_INCLUDE_DIR:PATH=/cm/shared/apps/boost_1_61_0/gcc/include

//Boost iostreams library (debug)
Boost_IOSTREAMS_LIBRARY_DEBUG:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_iostreams.so

//Boost iostreams library (release)
Boost_IOSTREAMS_LIBRARY_RELEASE:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_iostreams.so

//Boost library directory
Boost_LIBRARY_DIR:PATH=/cm/shared/apps/boost_1_61_0/gcc/lib

//Boost python library (debug)
Boost_PYTHON_LIBRARY_DEBUG:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_python.so

//Boost python library (release)
Boost_PYTHON_LIBRARY_RELEASE:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_python.so

//Boost regex library (debug)
Boost_REGEX_LIBRARY_DEBUG:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_regex.so

//Boost regex library (release)
Boost_REGEX_LIBRARY_RELEASE:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_regex.so

//Boost serialization library (debug)
Boost_SERIALIZATION_LIBRARY_DEBUG:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_serialization.so

//Boost serialization library (release)
Boost_SERIALIZATION_LIBRARY_RELEASE:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_serialization.so

//Boost system library (debug)
Boost_SYSTEM_LIBRARY_DEBUG:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_system.so

//Boost system library (release)
Boost_SYSTEM_LIBRARY_RELEASE:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_system.so

//Boost thread library (debug)
Boost_THREAD_LIBRARY_DEBUG:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_thread.so

//Boost thread library (release)
Boost_THREAD_LIBRARY_RELEASE:FILEPATH=/cm/shared/apps/boost_1_61_0/gcc/lib/libboost_thread.so

//Path to a library.
CAMD_LIBRARY:FILEPATH=CAMD_LIBRARY-NOTFOUND

//Path to a library.
CCOLAMD_LIBRARY:FILEPATH=CCOLAMD_LIBRARY-NOTFOUND

//Path to a file.
CGAL_INCLUDE_DIR:PATH=CGAL_INCLUDE_DIR-NOTFOUND

//Path to a library.
CGAL_LIBRARIES:FILEPATH=CGAL_LIBRARIES-NOTFOUND

//Path to a file.
CHOLMOD_INCLUDE_DIR:PATH=CHOLMOD_INCLUDE_DIR-NOTFOUND

//Path to a library.
CHOLMOD_LIBRARIES:FILEPATH=CHOLMOD_LIBRARIES-NOTFOUND

//Path to a program.
CMAKE_AR:FILEPATH=/usr/bin/ar

//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
CMAKE_BUILD_TYPE:STRING=

//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON

//CXX compiler.
CMAKE_CXX_COMPILER:FILEPATH=/cm/shared/apps/gcc/5.2.0/bin/c++

//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=

//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g

//Flags used by the compiler during release minsize builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//Flags used by the compiler during release builds (/MD /Ob1 /Oi
// /Ot /Oy /Gs will produce slightly less optimized but smaller
// files).
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

//Flags used by the compiler during Release with Debug Info builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

//C compiler.

Re: [Yade-users] [Question #297855]: AttributeError: 'module' object has no attribute 'inGtsSurface'

2016-07-27 Thread Matt Kesseler
Question #297855 on Yade changed:
https://answers.launchpad.net/yade/+question/297855

Matt Kesseler posted a new comment:
Here is the output of yade --test:

[evxmk9@login01 ~]$ yade --test
/cm/shared/apps/yade-2016.06a/lib64/yade-2016.06a/py/yade/plot.py:22: 
UserWarning: PIL (python-imaging package) must be installed to use yade.plot
  warnings.warn("PIL (python-imaging package) must be installed to use 
yade.plot")
testMatrix3 (yade.TestEigenWrapper)
Math: Matrix3 operations ... ok
testQuaternion (yade.TestEigenWrapper)
Math: Quaternion operations ... ok
testVector2 (yade.TestEigenWrapper)
Math: Vector2 operations ... ok
testVector3 (yade.TestEigenWrapper)
Math: Vector3 operations ... ok
testClassCtors (yade.TestObjectInstantiation)
Core: correct types are instantiated ... Entered the initialization functionok
testDispatcherCtor (yade.TestObjectInstantiation)
Core: dispatcher ctors with functors ... ok
testHidden (yade.TestObjectInstantiation)
Core: Attr::hidden ... ok
testInteractionLoopCtor (yade.TestObjectInstantiation)
Core: InteractionLoop special ctor ... ok
testInvalidAttr (yade.TestObjectInstantiation)
Core: invalid attribute access raises AttributeError ... ok
testNoSave (yade.TestObjectInstantiation)
Core: Attr::noSave ... ok
testParallelEngineCtor (yade.TestObjectInstantiation)
Core: ParallelEngine special ctor ... ok
testRootDerivedCtors_attrs_few (yade.TestObjectInstantiation)
Core: class ctor's attributes ... ok
testTriggerPostLoad (yade.TestObjectInstantiation)
Core: Attr::triggerPostLoad ... ok
testWrongFunctorType (yade.TestObjectInstantiation)
Core: dispatcher and functor type mismatch is detected ... ok
testErase (yade.TestBodies)
Bodies: erased bodies are None in python ... ok
testErasedAndNewlyCreatedSphere (yade.TestBodies)
Bodies: The bug is described in LP:1001194. If the new body was created after 
deletion of previous, it has no bounding box ... ok
testErasedIterate (yade.TestBodies)
Bodies: Iterator silently skips erased ones ... ok
testIterate (yade.TestBodies)
Bodies: Iteration ... ok
testLen (yade.TestBodies)
Bodies: len(O.bodies) ... ok
testNegativeIndex (yade.TestBodies)
Bodies: Negative index counts backwards (like python sequences). ... ok
testSaveAllClasses (yade.TestIO)
I/O: All classes can be saved and loaded with boost::serialization ... Entered 
the initialization functionWARNING: cannot open files used for capillary law, 
all forces will be null. Instructions on how to download and install them is 
found here : https://yade-dem.org/wiki/CapillaryTriaxialTest.
ok
testEraseBodiesInInteraction (yade.TestInteractions) ... ok
testDead (yade.TestLoop)
Loop: dead engines are not run ... ok
testEnginesModificationInsideLoop (yade.TestLoop)
Loop: O.engines can be modified inside the loop transparently. ... ok
testSubstepping (yade.TestLoop)
Loop: substepping ... ok
testMatchMakerCollisions (yade.TestMatchMaker) ... ok
testMaterialReturnsState (yade.TestMaterialStateAssociativity)
Material+State: CpmMat returns CpmState when asked for newAssocState ... ok
testThrowsAtBadCombination (yade.TestMaterialStateAssociativity)
Material+State: throws when body has material and state that don't work 
together. ... ok
testThrowsAtNullState (yade.TestMaterialStateAssociativity)
Material+State: throws when body has material but NULL state. ... ok
testAccess (yade.TestMaterials)
Material: find by index or label; KeyError raised for invalid label. ... ok
testIterate (yade.TestMaterials)
Material: iteration over O.materials ... ok
testLen (yade.TestMaterials)
Material: len(O.materials) ... ok
testNegativeIndex (yade.TestMaterials)
Material: negative index counts backwards. ... ok
testShared (yade.TestMaterials)
Material: shared_ptr's makes change in material immediate everywhere ... ok
testSharedAfterReload (yade.TestMaterials)
Material: shared_ptr's are preserved when saving/loading ... ok
testDegenerate (yade.TestPBC)
PBC: degenerate cell raises exception ... ok
testHomotheticResizeVel (yade.TestPBC)
PBC: homothetic cell deformation adjusts particle velocity ... ok
testKineticEnergy (yade.TestPBC)
PBC: utils.kineticEnergy considers only fluctuation velocity, not the velocity 
gradient ... ok
testL3GeomIncidentVelocity (yade.TestPBC)
PBC: L3Geom computes incident velocity correctly ... ok
testScGeomIncidentVelocity (yade.TestPBC)
PBC: ScGeom computes incident velocity correctly ... ok
testSetBox (yade.TestPBC)
PBC: setBox modifies hSize correctly ... ok
testTrsfChange (yade.TestPBC)
PBC: chaing trsf changes hSize0, but does not modify hSize ... ok
testVelGrad (yade.TestPBC)
PBC: velGrad changes hSize, accumulates in trsf ... ok
testConsistency (yade.TestSimpleClump)
Clump: ids and flags consistency ... ok
testStaticProperties (yade.TestSimpleClump)
Clump: mass, centroid, intertia ... ok
testVelocity (yade.TestSimpleClump)
Clump: velocities of member assigned by NewtonIntegrator ... ok
testMotion (yade.tests.cohesive-chain.TestCohesiveChain)
CohesiveChain: velocity/positions tested in 

Re: [Yade-users] [Question #297855]: AttributeError: 'module' object has no attribute 'inGtsSurface'

2016-07-26 Thread Anton Gladky
Question #297855 on Yade changed:
https://answers.launchpad.net/yade/+question/297855

Status: Open => Answered

Anton Gladky proposed the following answer:
Could you please provide the output of cmake-step and also CmakeCache.txt file, 
which is in build-folder?
Also please run "yade --test" and "yade --check".

Anton

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #297855]: AttributeError: 'module' object has no attribute 'inGtsSurface'

2016-07-19 Thread Matt Kesseler
New question #297855 on Yade:
https://answers.launchpad.net/yade/+question/297855

Hi all. I am currently taking some code that I developed on my office PC and 
using it on a HPC cluster. The code generated a volume of particles from a 
predicate determined by GTS and works correctly on the office computer, but 
when I tried to run the script on the HPC cluster, it gives "AttributeError: 
'module' object has no attribute 'inGtsSurface'" despite (as far as I'm aware) 
all of the relevant modules being installed to the HPC, including python, 
boost, gts, and yade. Here is the relevant code section.

from yade import pack,plot,bodiesHandling, qt, utils
from math import tan,sin,cos,sqrt

internalfrictionangle=28*(pi/180)
externalfrictionangle=26*(pi/180)
width=.1
rampangle=60*(pi/180)
shutterheight=.2
factor=1
radius=.0025
cwidth=width
insertradius=.2464
shutterpoint=1.448+insertradius*tan(rampangle/2)
ramplength=shutterpoint+shutterheight/(tan(rampangle-internalfrictionangle))
runofflength=1.7
damp=0.015

finish=40

O.materials.append(FrictMat(density=1730,young=65e6,poisson=.2,frictionAngle=internalfrictionangle,label='sand'))

#particle generation
#base points of wedge
v0=gts.Vertex(-.001+((cwidth-width)/2),cos(rampangle)*shutterpoint,-.001+sin(rampangle)*shutterpoint)
v1=gts.Vertex(-.001+((cwidth+width)/2),cos(rampangle)*shutterpoint,-.001+sin(rampangle)*shutterpoint)

#back top points of wedge
v2=gts.Vertex(-.001+((cwidth-width)/2),(cos(rampangle)*ramplength),-.001+(sin(rampangle)*ramplength))
v3=gts.Vertex(-.001+((cwidth+width)/2),(cos(rampangle)*ramplength),-.001+(sin(rampangle)*ramplength))

#front top points of wedge
v4=gts.Vertex(-.001+((cwidth-width)/2),(cos(rampangle)*shutterpoint)-(sin(rampangle)*shutterheight),-.001+(sin(rampangle)*shutterpoint)+(cos(rampangle)*shutterheight))
v5=gts.Vertex(-.001+((cwidth+width)/2),(cos(rampangle)*shutterpoint)-(sin(rampangle)*shutterheight),-.001+(sin(rampangle)*shutterpoint)+(cos(rampangle)*shutterheight))

e0=gts.Edge(v0,v1)
... and so on

f0=gts.Face(e0,e1,e2)
... and so on

surf=gts.Surface()
for f in (f0,f1,f2,f3,f4,f5,f6,f7):
   surf.add(f)

#surf.translate(0,0,0)
pred=pack.inGtsSurface(surf)
sp=pack.randomDensePack(pred,spheresInCell=1000,radius=radius,rRelFuzz=0.25,color=(0,0,1),returnSpherePack=True)
sp.toSimulation()

The actual error message is below:

Running script simulation.py
Traceback (most recent call last):
  File "/cm/shared/apps/yade-2016.06a/bin/yade", line 182, in runScript
execfile(script,globals())
  File "simulation.py", line 70, in 
pred=pack.inGtsSurface(surf)
AttributeError: 'module' object has no attribute 'inGtsSurface'

As far as I can tell this is some sort of problem with the GTS implementation, 
but I don't know what. Let me know if you can help me with this issue.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp