nera 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +6 -0
- data/Manifest.txt +14 -4
- data/Rakefile +18 -16
- data/config/website.yml +2 -0
- data/config/website.yml.sample +2 -0
- data/lib/nera/nera_database.rb +1 -0
- data/lib/nera/nera_job_layer_controller.rb +16 -10
- data/lib/nera/nera_parameter_layer_controller.rb +39 -2
- data/lib/nera/nera_parameter_records.rb +19 -3
- data/lib/nera/nera_run_layer_controller.rb +39 -31
- data/lib/nera/nera_run_records.rb +2 -3
- data/lib/nera.rb +1 -1
- data/{scripts → script}/console +2 -2
- data/script/txt2html +71 -0
- data/test/test_nera_job_layer_controller.rb +4 -1
- data/test/test_nera_parameter_layer_controller.rb +66 -9
- data/test/test_nera_parameter_records.rb +38 -1
- data/test/test_nera_run_layer_controller.rb +10 -3
- data/website/index.html +77 -0
- data/website/index.txt +55 -0
- data/website/javascripts/rounded_corners_lite.inc.js +285 -0
- data/website/stylesheets/screen.css +159 -0
- data/website/template.html.erb +50 -0
- data/website/temporary/temp.html +177 -0
- data/website/temporary/temp.txt +138 -0
- metadata +19 -18
- /data/{scripts → script}/destroy +0 -0
- /data/{scripts → script}/generate +0 -0
- /data/{scripts → script}/make_manifest.rb +0 -0
@@ -0,0 +1,159 @@
|
|
1
|
+
body {
|
2
|
+
background-color: #8DBD82;
|
3
|
+
font-family: "Georgia", sans-serif;
|
4
|
+
font-size: 16px;
|
5
|
+
line-height: 1.6em;
|
6
|
+
padding: 1.6em 0 0 0;
|
7
|
+
color: #333;
|
8
|
+
}
|
9
|
+
h1, h2, h3, h4, h5, h6 {
|
10
|
+
color: #444;
|
11
|
+
}
|
12
|
+
h1 {
|
13
|
+
font-family: sans-serif;
|
14
|
+
font-weight: normal;
|
15
|
+
font-size: 4em;
|
16
|
+
line-height: 0.8em;
|
17
|
+
letter-spacing: -0.1ex;
|
18
|
+
margin: 5px;
|
19
|
+
}
|
20
|
+
li {
|
21
|
+
padding: 0;
|
22
|
+
margin: 0;
|
23
|
+
list-style-type: square;
|
24
|
+
}
|
25
|
+
a {
|
26
|
+
color: #5E5AFF;
|
27
|
+
background-color: #A1DDB1;
|
28
|
+
font-weight: normal;
|
29
|
+
text-decoration: underline;
|
30
|
+
}
|
31
|
+
blockquote {
|
32
|
+
font-size: 90%;
|
33
|
+
font-style: italic;
|
34
|
+
border-left: 1px solid #111;
|
35
|
+
padding-left: 1em;
|
36
|
+
}
|
37
|
+
.caps {
|
38
|
+
font-size: 80%;
|
39
|
+
}
|
40
|
+
|
41
|
+
#main {
|
42
|
+
width: 55em;
|
43
|
+
padding: 0;
|
44
|
+
margin: 0 auto;
|
45
|
+
}
|
46
|
+
.coda {
|
47
|
+
text-align: right;
|
48
|
+
color: #77f;
|
49
|
+
font-size: smaller;
|
50
|
+
}
|
51
|
+
|
52
|
+
table {
|
53
|
+
font-size: 90%;
|
54
|
+
line-height: 1.4em;
|
55
|
+
color: #ff8;
|
56
|
+
background-color: #111;
|
57
|
+
padding: 2px 10px 2px 10px;
|
58
|
+
border-style: dashed;
|
59
|
+
}
|
60
|
+
|
61
|
+
th {
|
62
|
+
color: #fff;
|
63
|
+
}
|
64
|
+
|
65
|
+
td {
|
66
|
+
padding: 2px 10px 2px 10px;
|
67
|
+
}
|
68
|
+
|
69
|
+
.success {
|
70
|
+
color: #0CC52B;
|
71
|
+
}
|
72
|
+
|
73
|
+
.failed {
|
74
|
+
color: #E90A1B;
|
75
|
+
}
|
76
|
+
|
77
|
+
.unknown {
|
78
|
+
color: #995000;
|
79
|
+
}
|
80
|
+
pre, code {
|
81
|
+
font-family: monospace;
|
82
|
+
font-size: 90%;
|
83
|
+
line-height: 1.4em;
|
84
|
+
color: #ff8;
|
85
|
+
background-color: #111;
|
86
|
+
width: 40em;
|
87
|
+
padding: 2px 10px 2px 10px;
|
88
|
+
}
|
89
|
+
.comment { color: #aaa; font-style: italic; }
|
90
|
+
.keyword { color: #eff; font-weight: bold; }
|
91
|
+
.punct { color: #eee; font-weight: bold; }
|
92
|
+
.symbol { color: #0bb; }
|
93
|
+
.string { color: #6b4; }
|
94
|
+
.ident { color: #ff8; }
|
95
|
+
.constant { color: #66f; }
|
96
|
+
.regex { color: #ec6; }
|
97
|
+
.number { color: #F99; }
|
98
|
+
.expr { color: #227; }
|
99
|
+
|
100
|
+
.sidebar {
|
101
|
+
float: right;
|
102
|
+
}
|
103
|
+
|
104
|
+
#version {
|
105
|
+
width: 217px;
|
106
|
+
text-align: right;
|
107
|
+
font-family: sans-serif;
|
108
|
+
font-weight: normal;
|
109
|
+
color: #141331;
|
110
|
+
padding: 15px 20px 10px 20px;
|
111
|
+
margin: 0 auto;
|
112
|
+
margin-top: 15px;
|
113
|
+
background-color: #9A5535;
|
114
|
+
border: 3px solid #7E393E;
|
115
|
+
}
|
116
|
+
|
117
|
+
#version .numbers {
|
118
|
+
display: block;
|
119
|
+
font-size: 4em;
|
120
|
+
line-height: 0.8em;
|
121
|
+
letter-spacing: -0.1ex;
|
122
|
+
margin-bottom: 15px;
|
123
|
+
}
|
124
|
+
|
125
|
+
#version p {
|
126
|
+
text-decoration: none;
|
127
|
+
color: #F1F4FF;
|
128
|
+
background-color: #9A5535;
|
129
|
+
margin: 0;
|
130
|
+
padding: 0;
|
131
|
+
}
|
132
|
+
|
133
|
+
#version a {
|
134
|
+
text-decoration: none;
|
135
|
+
color: #F1F4FF;
|
136
|
+
background-color: #9A5535;
|
137
|
+
}
|
138
|
+
|
139
|
+
.clickable {
|
140
|
+
cursor: pointer;
|
141
|
+
cursor: hand;
|
142
|
+
}
|
143
|
+
|
144
|
+
#twitter_search {
|
145
|
+
margin: 40px 0 10px 15px;
|
146
|
+
color: #F1F4FF;
|
147
|
+
background-color: #9A5535;
|
148
|
+
border: 3px solid #7E393E;
|
149
|
+
}
|
150
|
+
|
151
|
+
#twitter_search h3 {
|
152
|
+
color: #F1F4FF;
|
153
|
+
margin-bottom: 0px;
|
154
|
+
}
|
155
|
+
|
156
|
+
#twitter_search center b {
|
157
|
+
display: none;
|
158
|
+
}
|
159
|
+
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
+
<title>
|
8
|
+
<%= title %>
|
9
|
+
</title>
|
10
|
+
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
|
11
|
+
<style>
|
12
|
+
|
13
|
+
</style>
|
14
|
+
<script type="text/javascript">
|
15
|
+
window.onload = function() {
|
16
|
+
settings = {
|
17
|
+
tl: { radius: 10 },
|
18
|
+
tr: { radius: 10 },
|
19
|
+
bl: { radius: 10 },
|
20
|
+
br: { radius: 10 },
|
21
|
+
antiAlias: true,
|
22
|
+
autoPad: true,
|
23
|
+
validTags: ["div"]
|
24
|
+
}
|
25
|
+
var versionBox = new curvyCorners(settings, document.getElementById("version"));
|
26
|
+
versionBox.applyCornersToAll();
|
27
|
+
}
|
28
|
+
</script>
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="main">
|
32
|
+
|
33
|
+
<h1><%= title %></h1>
|
34
|
+
<div class="sidebar">
|
35
|
+
<div id="version" class="clickable" onclick='document.location = "<%= download %>"; return false'>
|
36
|
+
<p>Get Version</p>
|
37
|
+
<a href="<%= download %>" class="numbers"><%= version %></a>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
<%= body %>
|
41
|
+
<p class="coda">
|
42
|
+
<a href="murase@serow.t.u-tokyo.ac.jp">Yohsuke Murase</a>, <%= modified.pretty %><br>
|
43
|
+
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
44
|
+
</p>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<!-- insert site tracking codes here, like Google Urchin -->
|
48
|
+
|
49
|
+
</body>
|
50
|
+
</html>
|
@@ -0,0 +1,177 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
+
<title>
|
8
|
+
Demonstration of usage
|
9
|
+
</title>
|
10
|
+
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
|
11
|
+
<style>
|
12
|
+
|
13
|
+
</style>
|
14
|
+
<script type="text/javascript">
|
15
|
+
window.onload = function() {
|
16
|
+
settings = {
|
17
|
+
tl: { radius: 10 },
|
18
|
+
tr: { radius: 10 },
|
19
|
+
bl: { radius: 10 },
|
20
|
+
br: { radius: 10 },
|
21
|
+
antiAlias: true,
|
22
|
+
autoPad: true,
|
23
|
+
validTags: ["div"]
|
24
|
+
}
|
25
|
+
var versionBox = new curvyCorners(settings, document.getElementById("version"));
|
26
|
+
versionBox.applyCornersToAll();
|
27
|
+
}
|
28
|
+
</script>
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="main">
|
32
|
+
|
33
|
+
<h1>Demonstration of usage</h1>
|
34
|
+
<div class="sidebar">
|
35
|
+
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/nera"; return false'>
|
36
|
+
<p>Get Version</p>
|
37
|
+
<a href="http://rubyforge.org/projects/nera" class="numbers">0.4.0</a>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
<p>The database created by nera is a hierarchical database which consists of three layers.<br />
|
41
|
+
The first layer corresponds to each simulation model (simulation layer), the second layer corresponds to each parameter set of the simulation model (parameter layer), and the third layer is where the data are stored (run layer).<br />
|
42
|
+
Suppose you registered your simulation model (e.g. “Ising model”). (We will show how to register a simulator later.)<br />
|
43
|
+
Your Ising-model simulator has three control parameters; system size L, inverse temperature K, and Monte Carlo step T.<br />
|
44
|
+
<del>-</del>———</p>
|
45
|
+
<p>Let’s start <span class="caps">NERA</span>.<br />
|
46
|
+
<pre> > nera my_db </pre></p>
|
47
|
+
<p>You will see the following output.<br />
|
48
|
+
<pre><br />
|
49
|
+
===========<br />
|
50
|
+
<del>-</del> in simulator layer <del>-</del>——————————-<br />
|
51
|
+
my_db<br />
|
52
|
+
===========<br />
|
53
|
+
Select a simulator. : <sup class="footnote"><a href="#fn0">0</a></sup><br />
|
54
|
+
<sup class="footnote"><a href="#fn0">0</a></sup>: go to Jobs layer<br />
|
55
|
+
<sup class="footnote"><a href="#fn1">1</a></sup>: Ising<br />
|
56
|
+
<sup class="footnote"><a href="#fn2">2</a></sup>: exit<br />
|
57
|
+
><br />
|
58
|
+
</pre><br />
|
59
|
+
The output is the menu for simulator layer.<br />
|
60
|
+
Here, you can select a simulator by typing a number. Let’s select “1”.<br />
|
61
|
+
If you select a number “0”, you will go to the Jobs layer. Description about the Jobs layer will shown later.</p>
|
62
|
+
<p>In the parameter layer, you will see an output like the following<br />
|
63
|
+
<pre> <br />
|
64
|
+
===========<br />
|
65
|
+
<del>-</del> in parameter layer <del>-</del>——————————-<br />
|
66
|
+
my_db / Ising<br />
|
67
|
+
===========<br />
|
68
|
+
id, created_at, updated_at, L, K, T : <sup class="footnote"><a href="#fn0">0</a></sup><br />
|
69
|
+
<sup class="footnote"><a href="#fn0">0</a></sup>: Menu<br />
|
70
|
+
<sup class="footnote"><a href="#fn1">1</a></sup>: 1, 2009-03-29, 2009-03-29, 32, 0.22, 128<br />
|
71
|
+
<sup class="footnote"><a href="#fn2">2</a></sup>: 2, 2009-03-29, 2009-03-29, 64, 0.24, 128<br />
|
72
|
+
><br />
|
73
|
+
</pre> <br />
|
74
|
+
You can select a parameter set here.<br />
|
75
|
+
In order to add a new parameter set, go to “Menu”.<br />
|
76
|
+
By selecting a number, you will go to the run layer of the selected parameter set.</p>
|
77
|
+
<p>The following is the menu of the run layer.<br />
|
78
|
+
<pre> <br />
|
79
|
+
===========<br />
|
80
|
+
<del>-</del> in run layer <del>-</del>—————————————-<br />
|
81
|
+
my_db / Ising / 1<br />
|
82
|
+
===========<br />
|
83
|
+
Select one : <sup class="footnote"><a href="#fn0">0</a></sup><br />
|
84
|
+
<sup class="footnote"><a href="#fn0">0</a></sup>: Back to parameter layer<br />
|
85
|
+
<sup class="footnote"><a href="#fn1">1</a></sup>: Show run infos<br />
|
86
|
+
<sup class="footnote"><a href="#fn2">2</a></sup>: Create jobs<br />
|
87
|
+
<sup class="footnote"><a href="#fn3">3</a></sup>: Cancel jobs<br />
|
88
|
+
<sup class="footnote"><a href="#fn4">4</a></sup>: Analyze data<br />
|
89
|
+
<sup class="footnote"><a href="#fn5">5</a></sup>: Exit<br />
|
90
|
+
><br />
|
91
|
+
</pre> <br />
|
92
|
+
Here, you can created jobs, cancel the created jobs, analyze data, etc.<br />
|
93
|
+
“Create jobs” will create shell scripts which execute the specified simulations.<br />
|
94
|
+
Let’s try to create jobs. You will asked the number of shell scripts and the number of independent runs for each shell script.<br />
|
95
|
+
<span class="caps">NERA</span> will assign seeds for the random number generator randomly, and create the shell scripts.<br />
|
96
|
+
The created shell scripts will appear in “my_db/Jobs”. (We call this folder “Job layer”.)</p>
|
97
|
+
<p>Quit the program and see inside of the “Jobs” folder. There should be the created shell script.<br />
|
98
|
+
Run it. You may run it on another computer or submit to batch-queue system such as Torque.<br />
|
99
|
+
<pre> <br />
|
100
|
+
bash j000002.sh<br />
|
101
|
+
</pre> <br />
|
102
|
+
After the script finishes, there is a result file which has the extension “.tar.bz2”.<br />
|
103
|
+
Move that file to “Include” directory, which is located under the “Jobs” directory.<br />
|
104
|
+
<pre> <br />
|
105
|
+
mv j000002.tar.bz2 my_db/Jobs/Include/<br />
|
106
|
+
</pre> <br />
|
107
|
+
Start <span class="caps">NERA</span> and move to the Job layer.<br />
|
108
|
+
<pre> <br />
|
109
|
+
nera my_db<br />
|
110
|
+
</pre> <br />
|
111
|
+
<pre> <br />
|
112
|
+
===========<br />
|
113
|
+
<del>-</del> in simulator layer <del>-</del>——————————-<br />
|
114
|
+
test_db<br />
|
115
|
+
===========<br />
|
116
|
+
Select a simulator. : <sup class="footnote"><a href="#fn0">0</a></sup><br />
|
117
|
+
<sup class="footnote"><a href="#fn0">0</a></sup>: go to Jobs layer<br />
|
118
|
+
<sup class="footnote"><a href="#fn1">1</a></sup>: Ising<br />
|
119
|
+
<sup class="footnote"><a href="#fn2">2</a></sup>: exit<br />
|
120
|
+
> 0<br />
|
121
|
+
</pre> <br />
|
122
|
+
At job layer menu, select “Include data”<br />
|
123
|
+
<pre> <br />
|
124
|
+
===========<br />
|
125
|
+
<del>-</del> in job layer <del>-</del>—————————————-<br />
|
126
|
+
test_db / Jobs<br />
|
127
|
+
===========<br />
|
128
|
+
Select one : <sup class="footnote"><a href="#fn0">0</a></sup><br />
|
129
|
+
<sup class="footnote"><a href="#fn0">0</a></sup>: Back to simulator layer<br />
|
130
|
+
<sup class="footnote"><a href="#fn1">1</a></sup>: Show job infos<br />
|
131
|
+
<sup class="footnote"><a href="#fn2">2</a></sup>: Cancel jobs<br />
|
132
|
+
<sup class="footnote"><a href="#fn3">3</a></sup>: Include data<br />
|
133
|
+
<sup class="footnote"><a href="#fn4">4</a></sup>: Exit<br />
|
134
|
+
> 3<br />
|
135
|
+
Select multiple numbers (ex. 1,3,5-8) : <sup class="footnote"><a href="#fn0">0</a></sup><br />
|
136
|
+
<sup class="footnote"><a href="#fn0">0</a></sup>: Cancel<br />
|
137
|
+
<sup class="footnote"><a href="#fn1">1</a></sup>: All<br />
|
138
|
+
<sup class="footnote"><a href="#fn2">2</a></sup>: j000002.tar.bz2<br />
|
139
|
+
><br />
|
140
|
+
</pre><br />
|
141
|
+
You’ll see the list of the zipped files in the Include folder.<br />
|
142
|
+
Select the file, then the file is decompressed and the result file is moved to the run layer automatically.<br />
|
143
|
+
At the data inclusion, the informations about the job (e.g. elapsed <span class="caps">CPU</span> time, job execution date, etc.) is also stored in the database.<br />
|
144
|
+
You can see these information by selecting “Show run info” at run layer (or see “runs.yml” in run layer).</p>
|
145
|
+
<h3>How to add your simulator to <span class="caps">NERA</span> database</h3>
|
146
|
+
<p>First, prepare your simulation codes by yourself. You may use any programming language such as C, C++, and Fortran.<br />
|
147
|
+
Parameters of the simulation program must be passed as arguments of the command line.<br />
|
148
|
+
For example, your Ising simulator for L=32, K=0.22, T=128, and seed of the random numbers = 98765 might work as following.<br />
|
149
|
+
<pre><br />
|
150
|
+
~/ising_sim.out 32 0.22 128 98765<br />
|
151
|
+
</pre><br />
|
152
|
+
Simulators should generate some result files such as “order_parameter.dat”.<br />
|
153
|
+
Be sure that the location of any result files or directories must be in the current directory.<br />
|
154
|
+
(Shell scripts created by <span class="caps">NERA</span> will create a folder and execute the simulation command in the folder. Any files in that will be included.)</p>
|
155
|
+
<p>After you create a database, start “nera_addsim” command.<br />
|
156
|
+
<pre><br />
|
157
|
+
nera_addsim my_db<br />
|
158
|
+
</pre><br />
|
159
|
+
“nera_addsim” is an interactive <span class="caps">CUI</span>-based program. Follow the instruction.<br />
|
160
|
+
You will be asked to do the following things.</p>
|
161
|
+
<ul>
|
162
|
+
<li>Input the name of your new simulator.</li>
|
163
|
+
<li>Specify the path to the simulator. The path should be the relative path from the home directory. This admits you to run the shell script at any directories and at any hosts.</li>
|
164
|
+
<li>Input the names, types, and default values of each parameter (e.g. L, K, or T). Input the parameters in the same order as the arguments of the simulator.</li>
|
165
|
+
</ul>
|
166
|
+
<p>The information you have just given is stored in the “my_db/Simulation_classes/Ising.rb”.<br />
|
167
|
+
You may edit this file by yourself if you want to modify it.</p>
|
168
|
+
<p class="coda">
|
169
|
+
<a href="murase@serow.t.u-tokyo.ac.jp">Yohsuke Murase</a>, 26th November 2009<br>
|
170
|
+
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
171
|
+
</p>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<!-- insert site tracking codes here, like Google Urchin -->
|
175
|
+
|
176
|
+
</body>
|
177
|
+
</html>
|
@@ -0,0 +1,138 @@
|
|
1
|
+
h2. Demonstration of usage
|
2
|
+
|
3
|
+
The database created by nera is a hierarchical database which consists of three layers.
|
4
|
+
The first layer corresponds to each simulation model (simulation layer), the second layer corresponds to each parameter set of the simulation model (parameter layer), and the third layer is where the data are stored (run layer).
|
5
|
+
Suppose you registered your simulation model (e.g. "Ising model"). (We will show how to register a simulator later.)
|
6
|
+
Your Ising-model simulator has three control parameters; system size L, inverse temperature K, and Monte Carlo step T.
|
7
|
+
---------
|
8
|
+
|
9
|
+
Let's start NERA.
|
10
|
+
<pre> > nera my_db </pre>
|
11
|
+
|
12
|
+
You will see the following output.
|
13
|
+
<pre>
|
14
|
+
===============================================
|
15
|
+
--- in simulator layer ------------------------
|
16
|
+
my_db
|
17
|
+
===============================================
|
18
|
+
Select a simulator. : [0]
|
19
|
+
[0]: go to Jobs layer
|
20
|
+
[1]: Ising
|
21
|
+
[2]: exit
|
22
|
+
>
|
23
|
+
</pre>
|
24
|
+
The output is the menu for simulator layer.
|
25
|
+
Here, you can select a simulator by typing a number. Let's select "1".
|
26
|
+
If you select a number "0", you will go to the Jobs layer. Description about the Jobs layer will shown later.
|
27
|
+
|
28
|
+
In the parameter layer, you will see an output like the following
|
29
|
+
<pre>
|
30
|
+
===============================================
|
31
|
+
--- in parameter layer ------------------------
|
32
|
+
my_db / Ising
|
33
|
+
===============================================
|
34
|
+
id, created_at, updated_at, L, K, T : [0]
|
35
|
+
[0]: Menu
|
36
|
+
[1]: 1, 2009-03-29, 2009-03-29, 32, 0.22, 128
|
37
|
+
[2]: 2, 2009-03-29, 2009-03-29, 64, 0.24, 128
|
38
|
+
>
|
39
|
+
</pre>
|
40
|
+
You can select a parameter set here.
|
41
|
+
In order to add a new parameter set, go to "Menu".
|
42
|
+
By selecting a number, you will go to the run layer of the selected parameter set.
|
43
|
+
|
44
|
+
The following is the menu of the run layer.
|
45
|
+
<pre>
|
46
|
+
===============================================
|
47
|
+
--- in run layer ------------------------------
|
48
|
+
my_db / Ising / 1
|
49
|
+
===============================================
|
50
|
+
Select one : [0]
|
51
|
+
[0]: Back to parameter layer
|
52
|
+
[1]: Show run infos
|
53
|
+
[2]: Create jobs
|
54
|
+
[3]: Cancel jobs
|
55
|
+
[4]: Analyze data
|
56
|
+
[5]: Exit
|
57
|
+
>
|
58
|
+
</pre>
|
59
|
+
Here, you can created jobs, cancel the created jobs, analyze data, etc.
|
60
|
+
"Create jobs" will create shell scripts which execute the specified simulations.
|
61
|
+
Let's try to create jobs. You will asked the number of shell scripts and the number of independent runs for each shell script.
|
62
|
+
NERA will assign seeds for the random number generator randomly, and create the shell scripts.
|
63
|
+
The created shell scripts will appear in "my_db/Jobs". (We call this folder "Job layer".)
|
64
|
+
|
65
|
+
Quit the program and see inside of the "Jobs" folder. There should be the created shell script.
|
66
|
+
Run it. You may run it on another computer or submit to batch-queue system such as Torque.
|
67
|
+
<pre>
|
68
|
+
bash j000002.sh
|
69
|
+
</pre>
|
70
|
+
After the script finishes, there is a result file which has the extension ".tar.bz2".
|
71
|
+
Move that file to "Include" directory, which is located under the "Jobs" directory.
|
72
|
+
<pre>
|
73
|
+
mv j000002.tar.bz2 my_db/Jobs/Include/
|
74
|
+
</pre>
|
75
|
+
Start NERA and move to the Job layer.
|
76
|
+
<pre>
|
77
|
+
nera my_db
|
78
|
+
</pre>
|
79
|
+
<pre>
|
80
|
+
===============================================
|
81
|
+
--- in simulator layer ------------------------
|
82
|
+
test_db
|
83
|
+
===============================================
|
84
|
+
Select a simulator. : [0]
|
85
|
+
[0]: go to Jobs layer
|
86
|
+
[1]: Ising
|
87
|
+
[2]: exit
|
88
|
+
> 0
|
89
|
+
</pre>
|
90
|
+
At job layer menu, select "Include data"
|
91
|
+
<pre>
|
92
|
+
===============================================
|
93
|
+
--- in job layer ------------------------------
|
94
|
+
test_db / Jobs
|
95
|
+
===============================================
|
96
|
+
Select one : [0]
|
97
|
+
[0]: Back to simulator layer
|
98
|
+
[1]: Show job infos
|
99
|
+
[2]: Cancel jobs
|
100
|
+
[3]: Include data
|
101
|
+
[4]: Exit
|
102
|
+
> 3
|
103
|
+
Select multiple numbers (ex. 1,3,5-8) : [0]
|
104
|
+
[0]: Cancel
|
105
|
+
[1]: All
|
106
|
+
[2]: j000002.tar.bz2
|
107
|
+
>
|
108
|
+
</pre>
|
109
|
+
You'll see the list of the zipped files in the Include folder.
|
110
|
+
Select the file, then the file is decompressed and the result file is moved to the run layer automatically.
|
111
|
+
At the data inclusion, the informations about the job (e.g. elapsed CPU time, job execution date, etc.) is also stored in the database.
|
112
|
+
You can see these information by selecting "Show run info" at run layer (or see "runs.yml" in run layer).
|
113
|
+
|
114
|
+
h3. How to add your simulator to NERA database
|
115
|
+
|
116
|
+
First, prepare your simulation codes by yourself. You may use any programming language such as C, C++, and Fortran.
|
117
|
+
Parameters of the simulation program must be passed as arguments of the command line.
|
118
|
+
For example, your Ising simulator for L=32, K=0.22, T=128, and seed of the random numbers = 98765 might work as following.
|
119
|
+
<pre>
|
120
|
+
~/ising_sim.out 32 0.22 128 98765
|
121
|
+
</pre>
|
122
|
+
Simulators should generate some result files such as "order_parameter.dat".
|
123
|
+
Be sure that the location of any result files or directories must be in the current directory.
|
124
|
+
(Shell scripts created by NERA will create a folder and execute the simulation command in the folder. Any files in that will be included.)
|
125
|
+
|
126
|
+
After you create a database, start "nera_addsim" command.
|
127
|
+
<pre>
|
128
|
+
nera_addsim my_db
|
129
|
+
</pre>
|
130
|
+
"nera_addsim" is an interactive CUI-based program. Follow the instruction.
|
131
|
+
You will be asked to do the following things.
|
132
|
+
|
133
|
+
* Input the name of your new simulator.
|
134
|
+
* Specify the path to the simulator. The path should be the relative path from the home directory. This admits you to run the shell script at any directories and at any hosts.
|
135
|
+
* Input the names, types, and default values of each parameter (e.g. L, K, or T). Input the parameters in the same order as the arguments of the simulator.
|
136
|
+
|
137
|
+
The information you have just given is stored in the "my_db/Simulation_classes/Ising.rb".
|
138
|
+
You may edit this file by yourself if you want to modify it.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nera
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yohsuke Murase
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-26 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -32,16 +32,6 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 2.0.2
|
34
34
|
version:
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: newgem
|
37
|
-
type: :development
|
38
|
-
version_requirement:
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- - "="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 1.4.1
|
44
|
-
version:
|
45
35
|
- !ruby/object:Gem::Dependency
|
46
36
|
name: hoe
|
47
37
|
type: :development
|
@@ -50,7 +40,7 @@ dependencies:
|
|
50
40
|
requirements:
|
51
41
|
- - ">="
|
52
42
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
43
|
+
version: 2.3.3
|
54
44
|
version:
|
55
45
|
description: |-
|
56
46
|
This is an application which helps you to manage a database for the Monte Carlo simulations.
|
@@ -66,7 +56,8 @@ extensions: []
|
|
66
56
|
extra_rdoc_files:
|
67
57
|
- History.txt
|
68
58
|
- Manifest.txt
|
69
|
-
-
|
59
|
+
- website/index.txt
|
60
|
+
- website/temporary/temp.txt
|
70
61
|
files:
|
71
62
|
- History.txt
|
72
63
|
- Manifest.txt
|
@@ -75,6 +66,8 @@ files:
|
|
75
66
|
- bin/nera
|
76
67
|
- bin/nera_addhost
|
77
68
|
- bin/nera_addsim
|
69
|
+
- config/website.yml
|
70
|
+
- config/website.yml.sample
|
78
71
|
- lib/nera.rb
|
79
72
|
- lib/nera/nera_cui.rb
|
80
73
|
- lib/nera/nera_database.rb
|
@@ -93,10 +86,11 @@ files:
|
|
93
86
|
- lib/nera/nera_simulator_records.rb
|
94
87
|
- lib/nera_addhost/add_hosts.rb
|
95
88
|
- lib/nera_addsim/make_simulator.rb
|
96
|
-
-
|
97
|
-
-
|
98
|
-
-
|
99
|
-
-
|
89
|
+
- script/console
|
90
|
+
- script/destroy
|
91
|
+
- script/generate
|
92
|
+
- script/make_manifest.rb
|
93
|
+
- script/txt2html
|
100
94
|
- test/runner.rb
|
101
95
|
- test/test_helper.rb
|
102
96
|
- test/test_nera_database.rb
|
@@ -112,6 +106,13 @@ files:
|
|
112
106
|
- test/test_nera_simulator.rb
|
113
107
|
- test/test_nera_simulator_layer_controller.rb
|
114
108
|
- test/test_nera_simulator_records.rb
|
109
|
+
- website/index.html
|
110
|
+
- website/index.txt
|
111
|
+
- website/javascripts/rounded_corners_lite.inc.js
|
112
|
+
- website/stylesheets/screen.css
|
113
|
+
- website/template.html.erb
|
114
|
+
- website/temporary/temp.html
|
115
|
+
- website/temporary/temp.txt
|
115
116
|
has_rdoc: true
|
116
117
|
homepage: http://nera.rubyforge.com
|
117
118
|
licenses: []
|
/data/{scripts → script}/destroy
RENAMED
File without changes
|
File without changes
|
File without changes
|