Back to Documentation
import org.openmole.core.implementation.data.* import org.openmole.core.implementation.transition.* import org.openmole.core.implementation.mole.* import org.openmole.core.implementation.task.* import org.openmole.core.implementation.capsule.* import org.openmole.core.implementation.sampling.* import org.openmole.core.implementation.mole.* import org.openmole.plugin.sampling.complete.* import org.openmole.plugin.task.groovy.* import org.openmole.plugin.environment.glite.* import org.openmole.plugin.domain.range.* onGrid = true // Declare the variable i = new Prototype("i", Integer) // Hello task helloTask = new GroovyTask("Sample groovy task") helloTask.setCode("println 'Hello world! ' + i") helloTask.addInput(i) helloCaps = new Capsule(helloTask) // Define the exploration task plan = new CompleteSampling(new Factor(i, new IntegerRange("0", "999"))) explorationCaps = new ExplorationCapsule(new ExplorationTask("exploration", plan)) new ExplorationTransition(explorationCaps, helloCaps) //For ISC grid env = new GliteEnvironment("vo.iscpif.fr", "voms://grid12.lal.in2p3.fr:20013/O=GRID-FR/C=FR/O=CNRS/OU=LAL/CN=grid12.lal.in2p3.fr", "ldap://topbdii.grif.fr:2170") //Build the mole mole = new Mole(explorationCaps) //Environment Selection strat = new FixedEnvironmentSelection() if(onGrid) strat.select(helloCaps,env) // Build the transition and run ex = new MoleExecution(mole, strat) ex.start()





