← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2456: 1. Fix batch script with debug builds, thanks to Anton for reporting.

 

------------------------------------------------------------
revno: 2456
committer: Chiara Modenese <chia@engs-018373>
branch nick: yade
timestamp: Fri 2010-10-01 16:38:55 +0100
message:
  1. Fix batch script with debug builds, thanks to Anton for reporting.
modified:
  core/main/main.py.in
  core/main/yade-batch.in
  pkg/dem/Engine/GlobalEngine/DomainLimiter.hpp


--
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 'core/main/main.py.in'
--- core/main/main.py.in	2010-09-30 09:05:24 +0000
+++ core/main/main.py.in	2010-10-01 15:38:55 +0000
@@ -42,7 +42,7 @@
 	import subprocess
 	# rebuild
 	sourceRoot,profile='${sourceRoot}','${profile}' # replaced at install-time
-	cmd=['scons','-Q','-C',sourceRoot,'profile=%s!'%profile,'debug=%d'%(1 if opts.debug else 0),'optimize=0','execCheck=%s'%(prefix+'/bin/yade'+suffix)]
+	cmd=['scons','-Q','-C',sourceRoot,'profile=%s!'%profile,'debug=%d'%(1 if opts.debug else 0),'optimize=%d'%(0 if opts.debug else 1),'execCheck=%s'%(prefix+'/bin/yade'+suffix)]
 	print 'Rebuilding yade using',' '.join(cmd)
 	if subprocess.call(cmd): raise RuntimeError('Error rebuilding Yade (--rebuild).')
 	# run ourselves

=== modified file 'core/main/yade-batch.in'
--- core/main/yade-batch.in	2010-09-30 09:05:24 +0000
+++ core/main/yade-batch.in	2010-10-01 15:38:55 +0000
@@ -9,9 +9,9 @@
 #socket.setdefaulttimeout(10) 
 
 ## replaced by scons automatically
-prefix,suffix='${runtimePREFIX}' if not os.environ.has_key('YADE_PREFIX') else os.environ['YADE_PREFIX'],'${SUFFIX}'
+prefix,suffix,suffixNoDebug='${runtimePREFIX}' if not os.environ.has_key('YADE_PREFIX') else os.environ['YADE_PREFIX'],'${SUFFIX}','${SUFFIX_NODEBUG}'
 sys.path.append(os.path.join(prefix,'lib','yade'+suffix,'py'))
-executable=os.path.join(prefix,'bin','yade'+suffix)
+executable=os.path.join(prefix,'bin','yade'+suffixNoDebug)
 ## we just need this ...
 import yade, yade.utils, yade.config, yade.remote
 
@@ -281,8 +281,8 @@
 if opts.manpage:
 	import yade.manpage
 	yade.config.metadata['short_desc']='batch system for computational platform Yade'
-	yade.config.metadata['long_desc']='Manage batches of computation jobs for the Yade platform; batches are described using text-file tables with parameters which are passed to individual runs of yade. Jobs are being run with pre-defined number of computational cores as soon as the required number of cores is available. Logs of all computations are stored in files and the batch progress can be watched online at (usually) http://localhost:9080. Unless overridden, the executable yade%s is used to run jobs.'%(yade.config.suffix)
-	yade.manpage.generate_manpage(parser,yade.config.metadata,opts.manpage,section=1,seealso='yade%s (1)\n.br\nhttps://yade-dem.org/sphinx/user.html#batch-queuing-and-execution-yade-multi'%suffix)
+	yade.config.metadata['long_desc']='Manage batches of computation jobs for the Yade platform; batches are described using text-file tables with parameters which are passed to individual runs of yade. Jobs are being run with pre-defined number of computational cores as soon as the required number of cores is available. Logs of all computations are stored in files and the batch progress can be watched online at (usually) http://localhost:9080. Unless overridden, the executable yade%s is used to run jobs.'%(suffixNoDebug)
+	yade.manpage.generate_manpage(parser,yade.config.metadata,opts.manpage,section=1,seealso='yade%s (1)\n.br\nhttps://yade-dem.org/sphinx/user.html#batch-queuing-and-execution-yade-batch'%suffixNoDebug)
 	print 'Manual page %s generated.'%opts.manpage
 	sys.exit(0)
 
@@ -341,7 +341,7 @@
 			logging.warning('WARNING: job #%d will use %d slots but only %d are available'%(i,nSlots,maxJobs))
 	# compose command-line: build the hyper-linked variant, then strip HTML tags (ugly, but ensures consistency)
 	env='PARAM_TABLE=<a href="jobs/%d/table">%s:%d</a> DISPLAY= %s '%(i,table,l,' '.join(envVars))
-	cmd='%s --threads=%d %s -x <a href="jobs/%d/script">%s</a>'%(executable,int(nSlots),'--nice=%s'%nice if nice!=None else '',i,simul)
+	cmd='%s%s --threads=%d %s -x <a href="jobs/%d/script">%s</a>'%(executable,' --debug' if opts.debug else '',int(nSlots),'--nice=%s'%nice if nice!=None else '',i,simul)
 	log='> <a href="jobs/%d/log">%s</a> 2>&1'%(i,pipes.quote(logFile))
 	hrefCmd=env+cmd+log
 	fullCmd=re.sub('(<a href="[^">]+">|</a>)','',hrefCmd)

=== modified file 'pkg/dem/Engine/GlobalEngine/DomainLimiter.hpp'
--- pkg/dem/Engine/GlobalEngine/DomainLimiter.hpp	2010-09-30 19:30:57 +0000
+++ pkg/dem/Engine/GlobalEngine/DomainLimiter.hpp	2010-10-01 15:38:55 +0000
@@ -42,6 +42,9 @@
 		((Real,renderLength,0,,"Characteristic length for the purposes of rendering, set equal to the smaller radius."))
 		((Vector3r,contPt,Vector3r::Zero(),,"Contact point (for rendering only)"))
 		//((int,sense,1,,"Determines what particle is moved: negative for id1, positive for id2, 0 for both."))
+		// applyWeight
+		// shearRotWeight
+		// reset force components along individual axes, instead of blocking DOFs which have no specific direction (for the force control)
 	);
 };
 REGISTER_SERIALIZABLE(LawTester);