[Yade-dev] [Bug 416906] Re: some scripts possibly not compatible with python 2.5

2009-08-25 Thread Janek Kozicki
ooops, sorry false alarm. I forgot to run scons to install new version
of this script, hold on.

-- 
some scripts possibly not compatible with python 2.5
https://bugs.launchpad.net/bugs/416906
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.

Status in Yet Another Dynamic Engine: New

Bug description:
Python 2.5 should be fully supported because it is in lenny, squeeze and hardy, 
which we want to support for 0.20. All scripts should be checked that they work 
with python 2.5. The initial report was use of itertools.product in yade.pack 
by Janek.

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


[Yade-dev] [Bug 416906] Re: some scripts possibly not compatible with python 2.5

2009-08-25 Thread Janek Kozicki
ok... so I installed new script. I forgot to set version=trunk so it was
a full recompile ;) And now I get another error:

Running script ../../yade/examples/concrete/uniax.py
/usr/lib/python2.5/site-packages/pytz/__init__.py:32: UserWarning: Module pylab 
was already imported from /usr/lib/pymodules/python2.5/pylab.py, but 
/usr/lib/pymodules/python2.5 is being added to sys.path
  from pkg_resources import resource_stream
/usr/lib/python2.5/site-packages/pytz/__init__.py:32: UserWarning: Module 
matplotlib was already imported from 
/usr/lib/pymodules/python2.5/matplotlib/__init__.py, but 
/usr/lib/pymodules/python2.5 is being added to sys.path
  from pkg_resources import resource_stream
Traceback (most recent call last):
  File /home/janek/tmp/ZZ/BIN/lib/yade-bzr1734/gui/PythonUI_rc.py, line 128, 
in module
execfile(runtime.script)
  File ../../yade/examples/concrete/uniax.py, line 69, in module

spheres=pack.randomDensePack(pack.inHyperboloid((0,0,-.5*specimenLength),(0,0,.5*specimenLength),.25*specimenLength,.2*specimenLength),spheresInCell=2000,radius=sphereRadius,memoizeDb='/tmp/triaxPackCache.sqlite',young=young,poisson=poisson,frictionAngle=frictionAngle,physParamsClass='CpmMat',density=density)
  File /home/janek/tmp/ZZ/BIN/lib/yade-bzr1734/py/yade/pack.py, line 267, in 
randomDensePack
raise RuntimeError(ERROR: database,memoizeDb, not compatible with 
randomDensePack (deprecated format or not db created by randomDensePack))
RuntimeError: ('ERROR: database', '/tmp/triaxPackCache.sqlite', ' not 
compatible with randomDensePack (deprecated format or not db created by 
randomDensePack)')

So I deleted this file /tmp/triaxPackCache.sqlite and ran the script
again... And now it is running. It only printed few warnings:

ja...@atak:~/tmp/ZZ/BIN/bin$ ./yade-bzr1734 
../../yade/examples/concrete/uniax.py
INFO  /home/janek/tmp/ZZ/yade/core/yade.cpp:266 main: Loading 
/home/janek/.yade-bzr1734/preferences.xml
INFO  /home/janek/tmp/ZZ/yade/core/yade.cpp:268 main: Loading plugins
INFO  gui/qt3/YadeQtMainWindow.cpp:64 YadeQtMainWindow: Loading configuration 
file: /home/janek/.yade-bzr1734/QtGUIPreferences.xml.
Python TCP server listening on localhost:9000, auth cookie is `sdycsk'
Running script ../../yade/examples/concrete/uniax.py
/usr/lib/python2.5/site-packages/pytz/__init__.py:32: UserWarning: Module pylab 
was already imported from /usr/lib/pymodules/python2.5/pylab.py, but 
/usr/lib/pymodules/python2.5 is being added to sys.path
  from pkg_resources import resource_stream
/usr/lib/python2.5/site-packages/pytz/__init__.py:32: UserWarning: Module 
matplotlib was already imported from 
/usr/lib/pymodules/python2.5/matplotlib/__init__.py, but 
/usr/lib/pymodules/python2.5 is being added to sys.path
  from pkg_resources import resource_stream
INFO  
pkg/common/RenderingEngine/OpenGLRenderingEngine/OpenGLRenderingEngine.cpp:68 
initgl: (re)initializing GL for gldraw methods.

also in the OpenGL view I see it being compressed and some circles/wire-
spheres appearing and disappearing around. But after 9000 they stopped
appearing around, and it is just compressing.

I'll let you know when it will finish.

-- 
some scripts possibly not compatible with python 2.5
https://bugs.launchpad.net/bugs/416906
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.

Status in Yet Another Dynamic Engine: New

Bug description:
Python 2.5 should be fully supported because it is in lenny, squeeze and hardy, 
which we want to support for 0.20. All scripts should be checked that they work 
with python 2.5. The initial report was use of itertools.product in yade.pack 
by Janek.

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


[Yade-dev] [Bug 416906] Re: some scripts possibly not compatible with python 2.5

2009-08-25 Thread Janek Kozicki
I suppose that it works now:

ja...@atak:~/tmp/ZZ/BIN/bin$ rm /tmp/triaxPackCache.sqlite 
ja...@atak:~/tmp/ZZ/BIN/bin$ ./yade-bzr1734 
../../yade/examples/concrete/uniax.py
INFO  /home/janek/tmp/ZZ/yade/core/yade.cpp:266 main: Loading 
/home/janek/.yade-bzr1734/preferences.xml
INFO  /home/janek/tmp/ZZ/yade/core/yade.cpp:268 main: Loading plugins
INFO  gui/qt3/YadeQtMainWindow.cpp:64 YadeQtMainWindow: Loading configuration 
file: /home/janek/.yade-bzr1734/QtGUIPreferences.xml.
Python TCP server listening on localhost:9000, auth cookie is `sdycsk'
Running script ../../yade/examples/concrete/uniax.py
/usr/lib/python2.5/site-packages/pytz/__init__.py:32: UserWarning: Module pylab 
was already imported from /usr/lib/pymodules/python2.5/pylab.py, but 
/usr/lib/pymodules/python2.5 is being added to sys.path
  from pkg_resources import resource_stream
/usr/lib/python2.5/site-packages/pytz/__init__.py:32: UserWarning: Module 
matplotlib was already imported from 
/usr/lib/pymodules/python2.5/matplotlib/__init__.py, but 
/usr/lib/pymodules/python2.5 is being added to sys.path
  from pkg_resources import resource_stream
INFO  
pkg/common/RenderingEngine/OpenGLRenderingEngine/OpenGLRenderingEngine.cpp:68 
initgl: (re)initializing GL for gldraw methods.

INFO  extra/PeriodicInsertionSortCollider.cpp:432 action: Loaded to 1e+11 done, 
going to 1e+08 now
INFO  
pkg/common/RenderingEngine/OpenGLRenderingEngine/OpenGLRenderingEngine.cpp:68 
initgl: (re)initializing GL for gldraw methods.

INFO  extra/PeriodicInsertionSortCollider.cpp:428 action: Finished
Packing saved to the database /tmp/triaxPackCache.sqlite
Timestep 1.2521980674e-06
INFO  /home/janek/tmp/ZZ/yade/core/Omega.cpp:272 saveSimulation: Saving file 
:memory:initial
init
init done, will now run.
INFO  pkg/dem/Engine/StandAloneEngine/UniaxialStrainer.cpp:40 init: Setting 
initial length to 0.19226 (between #21 and #390)
INFO  pkg/dem/Engine/StandAloneEngine/UniaxialStrainer.cpp:64 init: Strain 
speed will be 0.019226, strain rate 0.1; velocities will be set directly at the 
beginning.
INFO  pkg/dem/Engine/StandAloneEngine/UniaxialStrainer.cpp:84 init: Stress will 
be updated every 79 steps.

__   __    _  
\ \ / /_ _|  _ \  ___   / ___|___  _ __  ___  ___ | | ___ 
 \ V / _` | | | |/ _ \ | |   / _ \| '_ \/ __|/ _ \| |/ _ \ 
  | | (_| | |_| |  __/ | |__| (_) | | | \__ \ (_) | |  __/
  |_|\__,_|/ \___|  \\___/|_| |_|___/\___/|_|\___|


In [1]: 20090825T103420p3155 tension 2.89257753603e-05 299967.505565
20090825T103420p3155 tension 4.38269323642e-05 877874.455292
20090825T103420p3155 tension 5.87280893678e-05 1458510.79307
20090825T103420p3155 tension 7.36292463717e-05 2039108.81177
20090825T103420p3155 tension 8.80295241485e-05 2039108.81177
20090825T103420p3155 tension 0.000102930681152 2608309.68231
20090825T103420p3155 tension 0.000117831838156 3105548.79418
20090825T103420p3155 tension 0.000131981676319 3478610.11643
20090825T103420p3155 tension 0.000146757613516 3629749.68248
20090825T103420p3155 tension 0.000161533550713 3629749.68248
20090825T103420p3155 tension 0.000176184268104 3865066.494
20090825T103420p3155 tension 0.000189958446847 4025471.16199
20090825T103420p3155 tension 0.00020448394443 4125289.87333
20090825T103420p3155 tension 0.00021888407 4185554.4989
20090825T103420p3155 tension 0.000232908840563 4185554.4989
20090825T103420p3155 tension 0.000246432579693 4185061.20288
20090825T103420p3155 tension 0.00026083285747 4081887.81576
20090825T103420p3155 tension 0.000275233135246 3734761.59853
20090825T103420p3155 tension 0.000289257753603 3325755.76535
20090825T103420p3155 tension 0.000303031932346 3325755.76535
20090825T103420p3155 tension 0.000313174736693 3143992.54529
20090825T103420p3155 tension 0.000321063584519 2863445.39658
20090825T103420p3155 tension 0.000330955949252 2714962.53932
20090825T103420p3155 tension 0.000338844797078 2588289.81719
20090825T103420p3155 tension 0.000346733644903 2588289.81719
20090825T103420p3155 tension 0.000354497272922 2456690.91919
20090825T103420p3155 tension 0.000362386120748 2363146.17701
20090825T103420p3155 tension 0.000370274968573 2247115.25037
20090825T103420p3155 tension 0.000378289036206 2137743.83668
20090825T103420p3155 tension 0.000386428323645 2137743.83668
20090825T103420p3155 tension 0.000394442391277 2034592.31657
Damaged, switching to compression... 
init
INFO  /home/janek/tmp/ZZ/yade/core/Omega.cpp:238 loadSimulation: Loading file 
:memory:initial
Reversing plot data
init done, will now run.
INFO  pkg/dem/Engine/StandAloneEngine/UniaxialStrainer.cpp:40 init: Setting 
initial length to 0.19226 (between #21 and #390)
INFO  pkg/dem/Engine/StandAloneEngine/UniaxialStrainer.cpp:64 init: Strain 
speed will be -0.19226, strain rate -1; velocities will be set directly at the 
beginning.
INFO  pkg/dem/Engine/StandAloneEngine/UniaxialStrainer.cpp:84 init: Stress will 
be updated every 7 steps.

Re: [Yade-dev] Pretty option

2009-08-25 Thread Václav Šmilauer
scons -h

C /home/vaclav/yade/build-trunk-opt/core/core.cpp

vs.

g++ -o /home/vaclav/yade/build-trunk/core/core.o -c -pipe -Wall -ggdb2
-fopenmp -DMINIWM3 -DYADE_GTS -DYADE_LOG4CXX -DYADE_OPENGL -DYADE_OPENMP
-DYADE_PYTHON -DYADE_CPM_FULL_MODEL_AVAILABLE -DSUFFIX=\-trunk\
-DPREFIX=\/usr/local\ -DYADE_DEBUG -DYADE_OPENMP
-DYADE_CAST=dynamic_cast -DYADE_PTR_CAST=dynamic_pointer_cast
-DYADE_VERSION=\trunk\
-I/home/vaclav/yade/build-trunk/include/yade-trunk -Iinclude/yade-trunk
-I/home/vaclav/yade/build-trunk/include/yade-trunk/yade/lib-miniWm3
-Iinclude/yade-trunk/yade/lib-miniWm3 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/share/qt3/include
-I/usr/share/qt3/include
-I/usr/include/python2.6 /home/vaclav/yade/build-trunk/core/core.cpp




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


Re: [Yade-dev] Pretty option

2009-08-25 Thread Anton Gladky
It ouptuts less data?
__
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями

Anton Gladkyy


2009/8/25 Václav Šmilauer eudo...@arcig.cz

 scons -h

 C /home/vaclav/yade/build-trunk-opt/core/core.cpp

 vs.

 g++ -o /home/vaclav/yade/build-trunk/core/core.o -c -pipe -Wall -ggdb2
 -fopenmp -DMINIWM3 -DYADE_GTS -DYADE_LOG4CXX -DYADE_OPENGL -DYADE_OPENMP
 -DYADE_PYTHON -DYADE_CPM_FULL_MODEL_AVAILABLE -DSUFFIX=\-trunk\
 -DPREFIX=\/usr/local\ -DYADE_DEBUG -DYADE_OPENMP
 -DYADE_CAST=dynamic_cast -DYADE_PTR_CAST=dynamic_pointer_cast
 -DYADE_VERSION=\trunk\
 -I/home/vaclav/yade/build-trunk/include/yade-trunk -Iinclude/yade-trunk
 -I/home/vaclav/yade/build-trunk/include/yade-trunk/yade/lib-miniWm3
 -Iinclude/yade-trunk/yade/lib-miniWm3 -I/usr/include/glib-2.0
 -I/usr/lib/glib-2.0/include -I/usr/share/qt3/include
 -I/usr/share/qt3/include
 -I/usr/include/python2.6 /home/vaclav/yade/build-trunk/core/core.cpp




 ___
 Mailing list: 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 Post to : yade-dev@lists.launchpad.net
 Unsubscribe : 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 More help   : https://help.launchpad.net/ListHelp

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


[Yade-dev] [Branch ~yade-dev/yade/trunk] Rev 1735: SConstruct: add doc for pretty, fix a few lib checks on karmic

2009-08-25 Thread noreply

revno: 1735
committer: Václav Šmilauer vac...@flux
branch nick: trunk
timestamp: Tue 2009-08-25 16:21:44 +0200
message:
  SConstruct: add doc for pretty, fix a few lib checks on karmic
modified:
  SConstruct
  py/pack.py


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to 
https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'SConstruct'
--- SConstruct	2009-08-24 17:07:33 +
+++ SConstruct	2009-08-25 14:21:44 +
@@ -151,7 +151,7 @@
 	#('SHLINK','Linker for shared objects','g++'),
 	('SHCCFLAGS','Additional compiler flags for linking (for plugins).',None,None,Split),
 	BoolVariable('QUAD_PRECISION','typedef Real as long double (=quad)',0),
-	BoolVariable('pretty',Don't show compiler command line (like the Linux kernel),1),
+	BoolVariable('pretty',Don't show commands being run, only what files are being compiled/linked/installed,1),
 	BoolVariable('useMiniWm3','use local miniWm3 library instead of Wm3Foundation',1),
 	#BoolVariable('useLocalQGLViewer','use in-tree QGLViewer library instead of the one installed in system',1),
 )
@@ -327,15 +327,15 @@
 		Exit(1)
 	# check optional libs
 	if 'opengl' in env['features']:
-		ok=conf.CheckLibWithHeader('glut','GL/glut.h','c','glutGetModifiers();',autoadd=1)
-		if not ok: featureNotOK('openGL')
+		ok=conf.CheckLibWithHeader('glut','GL/glut.h','c++','glutGetModifiers();',autoadd=1)
+		if not ok: featureNotOK('opengl')
 	if 'gts' in env['features']:
 		env.ParseConfig('pkg-config glib-2.0 --cflags --libs');
-		ok=conf.CheckLibWithHeader('gts','gts.h','c','gts_object_class();',autoadd=1)
+		ok=conf.CheckLibWithHeader('gts','gts.h','c++','gts_object_class();',autoadd=1)
 		if not ok: featureNotOK('gts')
 	if 'qt3' not in env['exclude']:
 		if 'opengl' not in env['features']:
-			print \nQt3 interface can only be used if openGL is enabled.\nEither add openGL to 'features' or add qt3 to 'exclude'.
+			print \nQt3 interface can only be used if opengl is enabled.\nEither add opengl to 'features' or add qt3 to 'exclude'.
 			Exit(1)
 		ok=conf.CheckQt(env['QTDIR'])
 		env.Tool('qt'); env.Replace(QT_LIB='qt-mt')

=== modified file 'py/pack.py'
--- py/pack.py	2009-08-24 18:07:45 +
+++ py/pack.py	2009-08-25 14:21:44 +
@@ -251,9 +251,10 @@
 		beta,gamma=fullDim[1]/fullDim[0],fullDim[2]/fullDim[0] # ratios β=y₀/x₀, γ=z₀/x₀
 		N100=spheresInCell/cloudPorosity # number of spheres for cell being filled by spheres without porosity
 		x1=radius*(1/(beta*gamma)*N100*(4/3.)*pi)**(1/3.)
-		y1,z1=beta*x1,gamma*x1
+		y1,z1=beta*x1,gamma*x1; vol0=x1*y1*z1
 		maxR=radius*(1+rRelFuzz)
-		x1=max(x1,8*maxR); y1=max(y1,8*maxR); z1=max(z1,8*maxR) # this might make the packing looser, oh well...
+		x1=max(x1,8*maxR); y1=max(y1,8*maxR); z1=max(z1,8*maxR); vol1=x1*y1*z1
+		N100*=vol1/vol0 # volume might have been increased, increase number of spheres to keep porosity the same
 	if(memoizeDb and os.path.exists(memoizeDb)):
 		if memoDbg:
 			def memoDbgMsg(s): print s
@@ -264,7 +265,7 @@
 		try:
 			c.execute('select radius,rRelFuzz,dimx,dimy,dimz,N,timestamp,periodic from packings order by N')
 		except sqlite3.OperationalError:
-			raise RuntimeError(ERROR: database,memoizeDb, not compatible with randomDensePack (deprecated format or not db created by randomDensePack))
+			raise RuntimeError(ERROR: database `+memoizeDb+' not compatible with randomDensePack (corrupt, deprecated format or not a db created by randomDensePack))
 		for row in c:
 			R,rDev,X,Y,Z,NN,timestamp,isPeri=row[0:8]; scale=radius/R
 			rDev*=scale; X*=scale; Y*=scale; Z*=scale

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


Re: [Yade-dev] Pretty option

2009-08-25 Thread Václav Šmilauer

 It ouptuts less data?
OMG why don't you try?



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


[Yade-dev] [Branch ~yade-dev/yade/trunk] Rev 1736: Fix version detection on systems where version is not specified by hand or in RELEASE file and bz...

2009-08-25 Thread noreply

revno: 1736
committer: Václav Šmilauer vac...@flux
branch nick: trunk
timestamp: Wed 2009-08-26 00:28:12 +0200
message:
  Fix version detection on systems where version is not specified by hand or in 
RELEASE file and bzr is not installed
modified:
  SConstruct


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to 
https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'SConstruct'
--- SConstruct	2009-08-25 14:21:44 +
+++ SConstruct	2009-08-25 22:28:12 +
@@ -188,6 +188,7 @@
 ## ALL generated stuff should go here - therefore we must determine it very early!!
 if not env.has_key('version'):
 	env['realVersion']=yadeSCons.getRealVersion()
+	if not env['realVersion']: env['realVersion']='unknown'
 	env['version']=env['realVersion']
 if not env.has_key('realVersion') or not env['realVersion']: env['realVersion']=env['version']
 

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