GWEReallyQuickStartGuide

From NAMIC Wiki
Jump to: navigation, search
Home < GWEReallyQuickStartGuide

About

Grid Wizard Enterprise provides powerful tools for harnessing the computing power and making tedious computations feasible. You can follow the instructions on the GWE web site, or the following steps to get running with GWE very quickly.

Steps

These steps worked with GWE 0.7.3 on SPL linux machines

1. Download the installation package from here, and put it on your local machine where you are not restricted in disk space

2. Edit your .cshrc/.bashrc to set the environment variables that GWE requires, following by source ~/.chsrc

setenv GWE_HOME /path/to/gwe/directory
setenv PATH $GWE_HOME/bin:${PATH}
setenv JAVA_HOME /local/os-exact/bin/java

3. edit $GWE_HOME/conf/gwe-auth.xml to include your login credentials for the resources you are planning to use:

<!-- User authentication information -->
<!-- Detailed configuration guide @ http://www.gridwizardenterprise.org/guides/config.html -->
<keystore>
  <accessControl>
     <account user="fedorov" password="?"/>
        <realms>
          <realm schemes="ssh;sftp" domain="*.bwh.harvard.edu" testHost="george.bwh.harvard.edu"/>
        </realms>
     </accessControl>
</keystore>

NOTE: setting password to "?" will force GWE to ask your password once to establish your credentials. This option must be preferred over saving your plain password in a configuration file.

and $GWE_HOME/conf/gwe-grid.xml, to have the correct path to the Slicer installation you are planning to use:

<!-- End User Environment & Definitions -->
<!-- Detailed configuration guide @ http://www.gridwizardenterprise.org/guides/config.html -->
<grid>
  <cluster name="LOCALHOST" 
           host="localhost" 
           installRootPath="/projects/birn/fedorov/software" 
           resourceManager="local" 
           queueSize="1" 
           maxWaitMins="0.5" 
           maxHijackMins="120" 
           maxIdleMins="1" >
           <p2elVar name="SLICER_HOME" value="/projects/birn/fedorov/software/Slicer/Slicer3-3.4-2009-05-21-linux-x86_64" />
  </cluster>
</grid>

NOTE: If you are planning to use shared computing resources, it is advisable to configure all of the paths to have unique names to avoid clashes with other users. Do not use the default path settings!

4. launch gwe-web.sh

5. point your browser to http://localhost:8080

6. you should see a web interface to GWE, and localhost in the "My Grid" tab. Click on "LOCALHOST", and in the bottom click on the button to install GWE daemon.

7. The daemon should be running, and you should be able to see in with the green "ok" triangle in the list "GWE Daemons"

8. Click on the "LOCALHOST" link to the daemon, and you should be able to submit the following P2EL script that describes a small parameter exploration study for GradientAnisotropicDiffucion filter:

${CONDUCT}=$range(0.5,1.5,1) 
${TIME}=$range(0.01,0.05,0.03)
${ITER}=$const(11)
${grad_EXPLORATION_ID}=${CONDUCT}-${TIME}-${ITER} 

${output}=$out(sftp://localhost.bwh.harvard.edu/projects/birn/fedorov/data/Testing/${grad_EXPLORATION_ID}.nrrd)
${input}=$in(sftp://localhost.bwh.harvard.edu/projects/birn/fedorov/data/Testing/MRMeningioma1.nrrd) ${grad}=$const(${grad_SLICER} --conductance ${CONDUCT} --timeStep ${TIME} --iterations ${ITER}) ${grad_SLICER}=$const(${SLICER_HOME}/Slicer3 --launch ${SLICER_HOME}/lib/Slicer3/Plugins/GradientAnisotropicDiffusion) 

${grad} ${input} ${output}

At least, this should get you started. Good luck!

Wish list

  • improved error handling: exception stack trace like below is not helping in finding the source of the problem.
        at org.gwe.drivers.netAccess.ShellCommand.logResult(ShellCommand.java:186)
	at org.gwe.drivers.netAccess.ShellCommand.runLocally(ShellCommand.java:162)
	at org.gwe.persistence.model.order.OSCommandDaemonRequest.process(OSCommandDaemonRequest.java:68)
	at org.gwe.app.agent.BaseAgent.processRequest(BaseAgent.java:85)
	at org.gwe.app.agent.BaseAgent.call(BaseAgent.java:55)
	at org.gwe.app.agent.AgentApp.main(AgentApp.java:44)

Possible improvement: give the exact command line back to the user to try manual launch to debug the problem.

  • Changes to variables in gwe-grid.xml are not propagated to the remote daemon, even if the daemon is manually restarted. The only means to propagate is to re-deploy. This is OK, but should be stated in the docs.

Tricks

  • When you restart the demon on the local machine, kill the process
  • If there is an error in the conf file, there is no error message, so if demon exists w/o error, check your conf files

Examples

${DIM1}=$range(3,4,1)
${DIM2}=$range(3,4,1)
${DIM3}=$range(3,4,1)

${output}=/scratch/tmp/gwe-tmp/${SYSTEM_JOB_NUM}.nrrd

${m}=/home/andrey/NAMICBoston2010/ProstateRegistration/Data/Case003_scene/BRAINSFitRegistration/t2ax-N4.nrrd
${f}=/home/andrey/NAMICBoston2010/ProstateRegistration/Data/Case003_scene/t2ax-intraop.nrrd

${mb}=/home/andrey/NAMICBoston2010/ProstateRegistration/Data/Case003_scene/t2ax-TG.nrrd
${fb}=/home/andrey/NAMICBoston2010/ProstateRegistration/Data/Case003_scene/t2ax-intraop-TG.nrrd

${SLICING_CMD}=$sliceGen(${SLICER_HOME},${output},2,17)

${SLICER_HOME}/Slicer3 --launch BRAINSFit --fixedVolume ${f} --movingVolume ${m} --outputVolume ${output} --transformType Rigid,ScaleVersor3D,Affine,BSpline --useCenterOfHeadAlign --splineGridSize ${DIM1},${DIM2},${DIM3} --maskProcessingMode ROI --fixedBinaryVolume ${fb} --movingBinaryVolume ${mb} --maskProcessingMode ROI && ${SLICING_CMD}