Commit 72c78992 authored by Mathieu's avatar Mathieu
Browse files

Merge branch '9-dev' of ssh://gitlab.openmole.org:20022/openmole/openmole into 9-dev

parents c8c31309 cdbf51d1
Pipeline #274 passed with stage
in 17 minutes and 45 seconds
......@@ -139,7 +139,7 @@ lazy val netlogo5 = OsgiProject(
"asm" % "asm-all" % "3.3.1" % "provided",
"org.picocontainer" % "picocontainer" % "2.13.6" % "provided"), version := netLogo5Version, scalaVersion := "2.9.2", crossPaths := false) settings(settings: _*)
lazy val netLogo6Version = "6.0.4"
lazy val netLogo6Version = "6.1.0"
lazy val netlogo6 = OsgiProject(
dir,
......@@ -150,13 +150,15 @@ lazy val netlogo6 = OsgiProject(
//resolvers += Resolver.bintrayRepo("netlogo", "NetLogo-JVM"),
libraryDependencies ++= Seq(
"org.nlogo" % "netlogo" % netLogo6Version % "provided" from s"https://dl.bintray.com/netlogo/NetLogo-JVM/org/nlogo/netlogo/$netLogo6Version/netlogo-$netLogo6Version.jar",
"org.scala-lang" % "scala-library" % "2.12.4" % "provided",
"org.scala-lang" % "scala-library" % "2.12.8" % "provided",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.5" % "provided",
"commons-codec" % "commons-codec" % "1.10" % "provided",
"org.ow2.asm" % "asm-all" % "5.0.4" % "provided",
"org.picocontainer" % "picocontainer" % "2.13.6" % "provided",
"org.parboiled" %% "parboiled" % "2.1.3" % "provided"
), version := netLogo6Version, scalaVersion := "2.12.4", crossPaths := false) settings(settings: _*)
"org.parboiled" %% "parboiled" % "2.1.3" % "provided",
"com.typesafe" % "config" % "1.3.1" % "provided",
"net.lingala.zip4j" % "zip4j" % "1.3.2" % "provided"
), version := netLogo6Version, scalaVersion := "2.12.8", crossPaths := false) settings(settings: _*)
lazy val scalaTagsVersion = "0.6.5"
lazy val scalaRxVersion = "0.4.0"
......@@ -164,7 +166,7 @@ lazy val scalaDomVersion = "0.9.3"
lazy val scalaUpickleVersion = "0.4.4"
lazy val scalaBoopickleVersion = "1.2.6"
lazy val scalaAutowireVersion = "0.2.6"
lazy val scalajsVersion = "0.6.23"
lazy val scalajsVersion = "0.6.28"
lazy val rx = OsgiProject(dir, "rx", exports = Seq("rx.*")) settings(
libraryDependencies ++= Seq("com.lihaoyi" %% "scalarx" % scalaRxVersion),
......@@ -427,3 +429,4 @@ lazy val gridscaleWebDAV = OsgiProject(dir, "gridscale.webdav", imports = Seq("*
libraryDependencies += "fr.iscpif.gridscale" %% "webdav" % gridscaleVersion,
version := gridscaleVersion
) settings(settings: _*) dependsOn(gridscale, gridscaleHTTP)
......@@ -235,8 +235,7 @@ lazy val pluginManager = OsgiProject(
imports = Seq("*")
) settings (defaultActivator) dependsOn(exception, tools, location) settings (coreSettings: _*)
lazy val fileService = OsgiProject(coreDir, "org.openmole.core.fileservice", imports = Seq("*")) dependsOn(tools, workspace, openmoleTar, preference, threadProvider) settings (coreSettings: _*) settings (defaultActivator) settings (
libraryDependencies += Libraries.guava)
lazy val fileService = OsgiProject(coreDir, "org.openmole.core.fileservice", imports = Seq("*")) dependsOn(tools, workspace, openmoleTar, preference, threadProvider) settings (coreSettings: _*) settings (defaultActivator) settings (libraryDependencies += Libraries.guava)
lazy val networkService = OsgiProject(coreDir, "org.openmole.core.networkservice", imports = Seq("*")) dependsOn(tools, workspace, preference) settings (coreSettings: _*) settings (defaultActivator)
......@@ -1044,18 +1043,22 @@ lazy val dockerBin = Project("docker", binDir / "docker") enablePlugins (sbtdock
copy((assemble in openmole).value, s"/openmole")
runRaw(
"""apt update && \
apt install -y python python-pycurl bash tar gzip ca-certificates ca-certificates-java && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /lib/modules""")
apt install -y python python-pycurl bash tar gzip ca-certificates ca-certificates-java sudo && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /lib/modules""")
runRaw(
"""groupadd -r openmole && \
useradd -r -g openmole openmole --home-dir /var/openmole/ --create-home && \
mkdir /workspace && chown openmole:openmole -R /workspace && \
chmod +x /openmole/openmole && \
ln -s /openmole/openmole /usr/bin/openmole""")
expose(8443)
user("openmole")
useradd -r -g openmole openmole --home-dir /var/openmole/ --create-home && \
chown openmole:openmole -R /var/openmole""")
runRaw(
"""chmod +x /openmole/openmole && \
|ln -s /openmole/openmole /usr/bin/openmole""".stripMargin)
runRaw(
"""echo '#!/bin/bash' > /usr/bin/openmole-docker && \
|echo 'mkdir -p /var/openmole/ && chown openmole:openmole /var/openmole && sudo -u openmole openmole --http --mem 2G --port 8443 --remote $@' >>/usr/bin/openmole-docker && \
|chmod +x /usr/bin/openmole-docker""".stripMargin)
volume("/var/openmole")
cmdShell("openmole", "--port", "8443", "--remote")
expose(8443)
cmdShell("openmole-docker")
}
)
......@@ -22,10 +22,11 @@ object ABCHook {
val size = s.thetas.size
val dim = s.thetas(0).size
val paramNames = abc.data.prior.map { x x.v.name }
val header =
(Vector("epsilon,pAcc,t,ts,rhos,weight") ++
Vector.tabulate(dim) { i "theta" ++ i.toString })
.mkString(",")
paramNames).mkString(",")
val data =
(Vector.fill(size)(s.epsilon) zip
......@@ -43,13 +44,6 @@ object ABCHook {
file.content = header ++ "\n" ++ data
/*writeVariablesToCSV(
resultFileLocation.from(context),
resultVariables(algorithm, context).map(_.prototype.array),
resultVariables(algorithm, context).map(_.value),
overwrite = true
)*/
}
context
......
......@@ -47,7 +47,7 @@ package object abc {
case class Observed[T](v: Val[T], observed: T)(implicit val obs: Observed.Observable[T])
case class ABCParameters(state: Val[MonAPMC.MonState], step: Val[Int])
case class ABCParameters(state: Val[MonAPMC.MonState], step: Val[Int], prior: Seq[Prior])
implicit class ABCContainer(dsl: DSLContainer[ABCParameters]) extends DSLContainerHook(dsl) {
def hook(directory: FromContext[File]): DSLContainer[ABC.ABCParameters] = {
......@@ -91,7 +91,7 @@ package object abc {
condition = !(stop: Condition)
)
DSLContainerExtension[ABCParameters](DSLContainer(loop), output = Some(postStepTask), delegate = mapReduce.delegate, data = ABCParameters(state, step))
DSLContainerExtension[ABCParameters](DSLContainer(loop), output = Some(postStepTask), delegate = mapReduce.delegate, data = ABCParameters(state, step, prior))
}
}
......@@ -158,7 +158,7 @@ package object abc {
stop = stop
)
DSLContainerExtension(DSLContainer(masterSlave), output = Some(master), delegate = Vector(slave), data = ABCParameters(masterState, step))
DSLContainerExtension(DSLContainer(masterSlave), output = Some(master), delegate = Vector(slave), data = ABCParameters(masterState, step, prior))
}
}
......@@ -44,12 +44,9 @@ public class NetLogo5 implements NetLogo {
@Override
public void open(String script,boolean switch3d) throws Exception {
System.setProperty("org.nlogo.is3d", "false");
// FIXME this is only a temporary fix - running simultaneously 3d and 2d models will fail anyway
if (switch3d&&script.endsWith("3d")) {
// set the 3d property in the case of a 3d model
System.setProperty("org.nlogo.is3d", "true");
}
if (switch3d && script.endsWith("3d")) System.setProperty("org.nlogo.is3d", "true");
else System.setProperty("org.nlogo.is3d", "false");
getWorkspace().open(script);
}
......
......@@ -47,13 +47,10 @@ public class NetLogo6 implements NetLogo {
@Override
public void open(String script, boolean switch3d) throws Exception {
System.setProperty("org.nlogo.is3d", "false");
// FIXME this is only a temporary fix - running simultaneously 3d and 2d models will fail anyway
if (switch3d&&script.endsWith("3d")) {
// set the 3d property in the case of a 3d model
System.setProperty("org.nlogo.is3d", "true");
}
getWorkspace().open(script);
if (switch3d && script.endsWith("3d")) System.setProperty("org.nlogo.is3d", "true");
else System.setProperty("org.nlogo.is3d", "false");
getWorkspace().open(script, false);
}
@Override
......
......@@ -14,7 +14,7 @@ object Libraries {
lazy val d3Version = "3.5.12"
lazy val tooltipserVersion = "3.3.0"
lazy val netLogo5Version = "5.3.1"
lazy val netLogo6Version = "6.0.4"
lazy val netLogo6Version = "6.1.0"
lazy val scalaTagsVersion = "0.6.5"
lazy val scalaJSDomVersion = "0.9.3"
lazy val rxVersion = "0.4.0"
......@@ -26,7 +26,7 @@ object Libraries {
lazy val json4sVersion = "3.5.0"
lazy val circeVersion = "0.10.0"
lazy val catsVersion = "1.0.1"
lazy val scalajsVersion = "0.6.23"
lazy val scalajsVersion = "0.6.28"
lazy val squantsVersion = "1.3.0"
lazy val xstreamVersion = "1.4.11"
lazy val scalaURIVersion = "1.1.1"
......@@ -136,7 +136,7 @@ object Libraries {
lazy val gridscaleOAR = "org.openmole.library" %% "gridscale-oar" % gridscaleVersion
lazy val scalaz = "org.scalaz" %% "scalaz-core" % "7.2.8"
lazy val guava = "com.google.guava" % "guava" % "19.0"
lazy val guava = "com.google.guava" % "guava" % "27.1-jre"
lazy val spray = "io.spray" %% "spray-json" % "1.3.2"
lazy val bouncyCastle = "org.bouncycastle" % "bcpkix-jdk15on" % bouncyCastleVersion
lazy val equinoxOSGi = "org.eclipse.platform" % "org.eclipse.osgi" % "3.13.200"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment