OACISにHostGroupという機能を導入した。 ジョブの作成時にHostを個別に指定するのではなく、HostGroupというHostの集団を指定できるようにする。 ジョブの投入先としてHostGroupを指定した場合、workerがジョブの投入時にGroupの中の空いているHostに投入する。
- Runの作成時にHostだけではなくHostGroupに投入先として指定できるようにする
- HostGroupに投入する際にはHostParameterはすべてデフォルトの値で投入される
Gemfile.lock |
This is a sample of optimizing parameters using OACIS watcher. This program iteratively search for parameters which minimizes the results of the simulations. For the optimization, we adopted a differential evolutiion algorithm.
Register simulator as follows.
Some simulations, such as convergence calculations, need trials and errors for selecting appropriate parameters until an expected result is obtained.
In this sample, we demonstrate how to automate this kind of iterations. This sample tries candidate parameters, which are given by us in advance, one by one until an expected result is obtained.
Register simulator as follows.
import random | |
class Domain(): | |
def __init__(self, minimum, maximum): | |
self.min = minimum | |
self.max = maximum | |
assert self.min < self.max | |
def scale(self, r): | |
""" |
local function disableAllHotkeys() | |
for k, v in pairs(hs.hotkey.getHotkeys()) do | |
v['_hk']:disable() | |
end | |
end | |
local function enableAllHotkeys() | |
for k, v in pairs(hs.hotkey.getHotkeys()) do | |
v['_hk']:enable() | |
end |
import os, sys, json, subprocess | |
# Load JSON file | |
fp = open( '_input.json' ) | |
params = json.load( fp ) | |
# Prepare input file | |
f = open('configuration.xml', 'w') | |
param_txt = """<configuration> | |
<input> |
#include <iostream> | |
#include <cstdlib> | |
#include <ctime> | |
#include <unistd.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <fcntl.h> | |
#include <signal.h> | |
#include <vector> |