← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2050: 1. Add no-alignment macros to compiler command line directly, this fixes compilation with eigen, ...

 

------------------------------------------------------------
revno: 2050
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-02-25 11:20:07 +0100
message:
  1. Add no-alignment macros to compiler command line directly, this fixes compilation with eigen, including the tt.py test and scripts/regression-testss.py
removed:
  lib/base/yadeEigen.hpp
modified:
  SConstruct
  examples/concrete/uniax.py
  py/utils.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	2010-02-21 00:04:22 +0000
+++ SConstruct	2010-02-25 10:20:07 +0000
@@ -390,6 +390,8 @@
 		if not ok: featureNotOK('eigen',note="You might have to add eigen header directory (e.g. /usr/include/eigen2) to CPPPATH.")
 	if 'nowm3' in env['features'] and 'eigen' not in env['features']:
 		featureNotOK("You selected the 'nowm3' feature; you MUST also select the 'eigen' feature in such case.")
+	# this should fix eigen crashes at runtime
+	if 'nowm3' in env['features']: env.Append(CPPDEFINES=['EIGEN_DONT_ALIGN','EIGEN_DONT_VECTORIZE'])
 
 	if env['useMiniWm3'] and not 'nowm3' in env['features']: env.Append(LIBS='miniWm3',CPPDEFINES=['MINIWM3'])
 

=== modified file 'examples/concrete/uniax.py'
--- examples/concrete/uniax.py	2010-02-06 16:01:07 +0000
+++ examples/concrete/uniax.py	2010-02-25 10:20:07 +0000
@@ -89,7 +89,7 @@
 	NewtonIntegrator(damping=damping,label='damper'),
 	CpmStateUpdater(realPeriod=1),
 	UniaxialStrainer(strainRate=strainRateTension,axis=axis,asymmetry=0,posIds=posIds,negIds=negIds,crossSectionArea=crossSectionArea,blockDisplacements=False,blockRotations=False,setSpeeds=setSpeeds,label='strainer'),
-	PeriodicPythonRunner(virtPeriod=3e-5/strainRateTension,realLim=5,command='addPlotData()',label='plotDataCollector'),
+	PeriodicPythonRunner(virtPeriod=3e-5/strainRateTension,realPeriod=5,command='addPlotData()',label='plotDataCollector'),
 	PeriodicPythonRunner(realPeriod=4,command='stopIfDamaged()',label='damageChecker'),
 ]
 #O.miscParams=[Gl1_CpmPhys(dmgLabel=False,colorStrain=False,epsNLabel=False,epsT=False,epsTAxes=False,normal=False,contactLine=True)]

=== removed file 'lib/base/yadeEigen.hpp'
--- lib/base/yadeEigen.hpp	2010-01-21 16:39:18 +0000
+++ lib/base/yadeEigen.hpp	1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-#pragma once
-
-#include <Eigen/Core>
-#include <Eigen/Geometry>
-  
-typedef Eigen::Vector3f Vector3r;
-

=== modified file 'py/utils.py'
--- py/utils.py	2010-02-21 00:04:22 +0000
+++ py/utils.py	2010-02-25 10:20:07 +0000
@@ -237,12 +237,16 @@
 	Return list of facets forming the box;
 	
 	:Parameters:
-			- `center`: center of the created box; (X,Y,Z) coordinates;
-			- `extents`: lengths of the box sides; (eX,eY,eZ);
-			- `orientation`: orientation of the box in quaternion format;
-			- `extents`: lengths of the box sides; (eX,eY,eZ);
-			- `wallMask`: bitmask; determines which walls will be created, in the order -x (1), +x (2), -y (4), +y (8), -z (16), +z (32). The numbers are ANDed; the default 63 means to create all walls;
-			- `**kw`: passed to utils.facet;
+			`center`: Vector3
+				center of the created box
+			`extents`: (eX,eY,eZ)
+				lengths of the box sides
+			`orientation`: quaternion
+				orientation of the box
+			`wallMask`: bitmask
+				determines which walls will be created, in the order -x (1), +x (2), -y (4), +y (8), -z (16), +z (32). The numbers are ANDed; the default 63 means to create all walls;
+			`**kw`: (unused keyword arguments)
+				passed to utils.facet
 	"""