Difference between revisions of "Wmake"

From OpenFOAMWiki
 
Line 21: Line 21:
 
WM_SCHEDULER : the name of the scheduler to use
 
WM_SCHEDULER : the name of the scheduler to use
 
WM_HOSTS    : the list of cores to use
 
WM_HOSTS    : the list of cores to use
WM_NCOMPROCS : the number of parallel builds (usually the size of WM_HOSTS
+
WM_NCOMPROCS : the number of parallel builds (usually the size of WM_HOSTS)
 +
 
 +
Example to build on 1 processor of dm and 4 processors of noisy:
 +
 
 +
{{VersionInfo}}{{Version1.4.1}}:
  
Example:
 
 
export WM_SCHEDULER=wmakeScheduler
 
export WM_SCHEDULER=wmakeScheduler
 +
 +
export WM_HOSTS="dm:1 noisy:4"
 +
 +
export WM_NCOMPPROCS=$($WM_SCHEDULER -count)
 +
 +
 +
{{VersionInfo}}{{Version1.4}}:
 +
 +
export WM_SCHEDULER=wmakeScheduler
 +
 
export WM_HOSTS="(dm:0 noisy:1 noisy:2 noisy:3 noisy:4)"
 
export WM_HOSTS="(dm:0 noisy:1 noisy:2 noisy:3 noisy:4)"
 +
 
eval "hosts=$WM_HOSTS"
 
eval "hosts=$WM_HOSTS"
export WM_NCOMPPROCS=${#hosts[@]}
 
  
This will build on 1 processor of dm and 4 processors of noisy.
+
export WM_NCOMPPROCS=${#hosts[@]}

Revision as of 16:16, 3 August 2007

Valid versions: OF version 14.png

wmake tips:

- all invocations can have an optional directory:

 wmake $FOAM_UTILITIES/mesh/manipulation/checkMesh
 wmake libso $FOAM_SRC/finiteVolume

- wmake all

 wmake all <dir>

will recursively build all applications in current or specified directory.

- wmake <target>, e.g.

  wmake Make/linux64Gcc4DPOpt/meshBb.o

will build just that taget

- distributed building: wmake comes with a simple scheduler, wmakeScheduler, which spawns a job on a free machine. It is currently set up to distribute only compilation of c,c++. Dependency building and linking gets done on the local machine.

It is set up with three environment variables: WM_SCHEDULER : the name of the scheduler to use WM_HOSTS  : the list of cores to use WM_NCOMPROCS : the number of parallel builds (usually the size of WM_HOSTS)

Example to build on 1 processor of dm and 4 processors of noisy:

Valid versions: OF version 141.png:

export WM_SCHEDULER=wmakeScheduler

export WM_HOSTS="dm:1 noisy:4"

export WM_NCOMPPROCS=$($WM_SCHEDULER -count)


Valid versions: OF version 14.png:

export WM_SCHEDULER=wmakeScheduler

export WM_HOSTS="(dm:0 noisy:1 noisy:2 noisy:3 noisy:4)"

eval "hosts=$WM_HOSTS"

export WM_NCOMPPROCS=${#hosts[@]}