coderunner 0.12.13 → 0.12.14

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.12.13
1
+ 0.12.14
data/coderunner.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "coderunner"
8
- s.version = "0.12.13"
8
+ s.version = "0.12.14"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Edmund Highcock"]
12
- s.date = "2013-07-16"
12
+ s.date = "2013-07-26"
13
13
  s.description = "CodeRunner is a framework for the automated running and analysis of simulations. It automatically generates any necessary input files, organises the output data and analyses it. Because it is a modular system, it can easily be customised to work with any system and any simulation code. One of its greatest strengths is that it is independent of any one simulation code; thus it can easily plot and compare the data from different codes."
14
14
  s.email = "edmundhighcock@sourceforge.net"
15
15
  s.executables = ["coderunner"]
@@ -61,6 +61,7 @@ Gem::Specification.new do |s|
61
61
  "lib/coderunner/system_modules/moab.rb",
62
62
  "lib/coderunner/system_modules/new_hydra.rb",
63
63
  "lib/coderunner/system_modules/slurm.rb",
64
+ "lib/coderunner/system_modules/stampede.rb",
64
65
  "lib/coderunner/test.rb",
65
66
  "lib/coderunner/version.rb",
66
67
  "lib/cubecalccrmod.rb",
@@ -71,6 +72,7 @@ Gem::Specification.new do |s|
71
72
  "lib/cubecalccrmod/empty.rb",
72
73
  "lib/cubecalccrmod/sleep.rb",
73
74
  "test/cubecalc.cc",
75
+ "test/fortran_namelist.in",
74
76
  "test/helper.rb",
75
77
  "test/old_test.rb",
76
78
  "test/test_coderunner.rb"
@@ -668,8 +668,9 @@ EOF
668
668
  copts_r[:Y] = nil
669
669
  copts[:Y] = nil
670
670
  unless @runners[[host, folder]]
671
+ copts[:cache] ||= :auto
671
672
  runner = @runners[[host, folder]] = RemoteCodeRunner.new(host, folder, copts)
672
- (eputs 'Updating remote...'; runner.update) unless (copts[:g] and (copts[:g].kind_of? String or copts[:g].size > 0)) or copts[:no_update] or copts[:cache]
673
+ #(eputs 'Updating remote...'; runner.update) unless (copts[:g] and (copts[:g].kind_of? String or copts[:g].size > 0)) or copts[:no_update] or copts[:cache]
673
674
  else
674
675
  runner = @runners[[host, folder]]
675
676
  end
@@ -0,0 +1,21 @@
1
+ class CodeRunner
2
+ require SCRIPT_FOLDER + '/system_modules/slurm.rb'
3
+ module Stampede
4
+ include Slurm
5
+ #def batch_script
6
+ #raise "Please specify project" unless @project
7
+ #super
8
+ #end
9
+ def max_ppn
10
+ 16
11
+ end
12
+ def run_command
13
+ # "qsub #{batch_script_file}"
14
+ if (ENV['CODE_RUNNER_LAUNCHER'].size > 0 rescue false)
15
+ return %[mpiexec -np #{@nprocs} #{executable_location}/#{executable_name} #{parameter_string} > #{output_file} 2> #{error_file}]
16
+ else
17
+ "ibrun #{executable_location}/#{executable_name} #{parameter_string}"
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,255 @@
1
+ !==============================================================================
2
+ ! GS2 INPUT FILE automatically generated by CodeRunner
3
+ !==============================================================================
4
+ !
5
+ ! GS2 is a gyrokinetic flux tube initial value turbulence code
6
+ ! which can be used for fusion or astrophysical plasmas.
7
+ !
8
+ ! See http://gyrokinetics.sourceforge.net
9
+ !
10
+ ! CodeRunner is a framework for the automated running and analysis
11
+ ! of large simulations.
12
+ !
13
+ ! See http://coderunner.sourceforge.net
14
+ ! by CodeRunner version 0.12.6.0
15
+ !
16
+ !==============================================================================
17
+
18
+ !==============================
19
+ !GENERAL PARAMETERS
20
+ !==============================
21
+ &parameters
22
+ beta = 0.0 ! Ratio of particle to magnetic pressure (reference Beta, not total beta): beta=n_0 T_0 /( B^2 / (8 pi))
23
+ zeff = 1.0 ! Effective ionic charge.
24
+ /
25
+
26
+ &kt_grids_knobs
27
+ grid_option = "single" ! The general layout of the perpendicular grid.
28
+ /
29
+
30
+ !==============================
31
+ !
32
+ !==============================
33
+ &kt_grids_single_parameters
34
+ aky = 1.0
35
+ akx = 0.0
36
+ /
37
+
38
+ !==============================
39
+ !
40
+ !==============================
41
+ &theta_grid_parameters
42
+ ntheta = 24 ! Number of points along field line (theta) per 2 pi segment
43
+ nperiod = 1 ! Number of 2 pi segments along equilibrium magnetic field.
44
+ eps = 0.18 ! eps=r/R
45
+ epsl = 2.0 ! epsl=2 a/R
46
+ shat = 0.8 !
47
+ pk = 1.44 ! pk = 2 a / q R
48
+ shift = 0.0 ! shift = -R q**2 dbeta/drho (>0)
49
+ /
50
+
51
+ !==============================
52
+ !
53
+ !==============================
54
+ &theta_grid_knobs
55
+ equilibrium_option = "s-alpha" ! Controls which geometric assumptions are used in the run.
56
+ /
57
+
58
+ !==============================
59
+ !
60
+ !==============================
61
+ &theta_grid_salpha_knobs
62
+ model_option = "default"
63
+ /
64
+
65
+ !==============================
66
+ !PITCH ANGLE/ENERGY GRID SETUP
67
+ !==============================
68
+ &le_grids_knobs
69
+ ngauss = 5 ! Number of untrapped pitch-angles moving in one direction along field line.
70
+ negrid = 8 ! Total number of energy grid points
71
+ /
72
+
73
+ !==============================
74
+ !BOUNDARY CONDITIONS
75
+ !==============================
76
+ &dist_fn_knobs
77
+ gridfac = 1.0 ! Affects boundary condition at end of theta grid.
78
+ omprimfac = 1.0
79
+ boundary_option = "linked" ! Sets the boundary condition along the field line (i.e. the boundary conditions at theta = +- pi).
80
+ adiabatic_option = "iphi00=2" ! The form of the adiabatic response (if a species is being modeled as adiabatic).
81
+ g_exb = 0.0
82
+ nonad_zero = .true. ! If true switches on new parallel boundary condition where h=0 at incoming boundary instead of g=0.
83
+ /
84
+
85
+ !==============================
86
+ !ALGORITHMIC CHOICES
87
+ !==============================
88
+ &fields_knobs
89
+ field_option = "implicit" ! Controls which time-advance algorithm is used for the linear terms.
90
+ /
91
+
92
+ !==============================
93
+ !
94
+ !==============================
95
+ &knobs
96
+ wstar_units = .false. ! For linear runs only. Evolves each k_y with a different timestep.
97
+ fphi = 1.0 ! Multiplies Phi (electrostatic potential).
98
+ fapar = 0.0 ! Multiplies A_par. Use 1 for finite beta (electromagnetic), 0 otherwise (electrostatic)
99
+ faperp = 0.0 ! Multiplies A_perp. Use 1 for high beta, 0 otherwise. Deprecated: use fbpar instead
100
+ delt = 0.05 ! Time step
101
+ nstep = 1000 ! Maximum number of timesteps
102
+ /
103
+
104
+ !==============================
105
+ !
106
+ !==============================
107
+ &reinit_knobs
108
+ delt_adj = 2.0 ! When the time step needs to be changed, it is adjusted
109
+ delt_minimum = 1.0e-06 ! The minimum time step is delt_minimum.
110
+ /
111
+
112
+ !==============================
113
+ !
114
+ !==============================
115
+ &layouts_knobs
116
+ layout = "lexys" ! 'yxles', 'lxyes', 'lyxes', 'lexys' Determines the way the grids are laid out in memory.
117
+ /
118
+
119
+ !==============================
120
+ !COLLISIONS
121
+ !==============================
122
+ &collisions_knobs
123
+ collision_model = "default" ! Collision model used in the simulation. Options: 'default', 'none', 'lorentz', 'ediffuse'
124
+ /
125
+
126
+ !==============================
127
+ !NONLINEARITY
128
+ !==============================
129
+ &nonlinear_terms_knobs
130
+ nonlinear_mode = "off" ! Include nonlinear terms? ('on','off')
131
+ flow_mode = "off"
132
+ cfl = 0.5 ! The maximum delt < cfl * min(Delta_perp/v_perp)
133
+ /
134
+
135
+ !==============================
136
+ !EVOLVED SPECIES
137
+ !==============================
138
+ &species_knobs
139
+ nspec = 1 ! Number of kinetic species evolved.
140
+ /
141
+
142
+ !==============================
143
+ !SPECIES PARAMETERS 1
144
+ !==============================
145
+ &species_parameters_1
146
+ z = 1.0 ! Charge
147
+ mass = 1.0 ! Mass
148
+ dens = 1.0 ! Density
149
+ temp = 1.0 ! Temperature
150
+ tprim = 6.9 ! -1/T (dT/drho)
151
+ fprim = 2.2 ! -1/n (dn/drho)
152
+ uprim = 0.0 ! ?
153
+ vnewk = 0.01 ! collisionality parameter
154
+ type = "ion" ! Type of species, e.g. 'ion', 'electron', 'beam'
155
+ /
156
+
157
+ !==============================
158
+ ! 1
159
+ !==============================
160
+ &dist_fn_species_knobs_1
161
+ fexpr = 0.45 ! Temporal implicitness parameter. Recommended value: 0.48
162
+ bakdif = 0.05 ! Spatial implicitness parameter. Recommended value: 0.05
163
+ /
164
+
165
+ !==============================
166
+ !SPECIES PARAMETERS 2
167
+ !==============================
168
+ &species_parameters_2
169
+ z = 1.0 ! Charge
170
+ mass = 1.0 ! Mass
171
+ dens = 0.0 ! Density
172
+ temp = 3.5e2 ! Temperature
173
+ sprim = 0.0 ! ?
174
+ type = "alpha" ! Type of species, e.g. 'ion', 'electron', 'beam'
175
+ /
176
+
177
+ !==============================
178
+ ! 1
179
+ !==============================
180
+ &dist_fn_species_knobs_2
181
+ fexpr = 0.45 ! Temporal implicitness parameter. Recommended value: 0.48
182
+ bakdif = 0.05 ! Spatial implicitness parameter. Recommended value: 0.05
183
+ /
184
+
185
+ !==============================
186
+ !INITIAL CONDITIONS
187
+ !==============================
188
+ &init_g_knobs
189
+ chop_side = .false. ! Rarely needed. Forces asymmetry into initial condition.
190
+ phiinit = 0.001 ! Average amplitude of initial perturbation of each Fourier mode.
191
+ ginit_option = "noise" ! Sets the way that the distribution function is initialized.
192
+ /
193
+
194
+ !==============================
195
+ !DIAGNOSTICS
196
+ !==============================
197
+ &gs2_diagnostics_knobs
198
+ print_flux_line = .F. ! Instantaneous fluxes output to screen
199
+ write_nl_flux = .true. ! Write nonlinear fluxes as a function of time.
200
+ print_line = .false. ! Estimated frequencies and growth rates to the screen/stdout
201
+ write_verr = .true. ! Write velocity space diagnostics to '.lpc' and '.verr' files
202
+ ! write_g not specified --- Write the distribution function to the '.dist' (NetCDF?)
203
+ write_line = .false. ! If (write_ascii = T) write estimated frequencies and growth rates to the output file
204
+ ! write_gyx not specified --- Write dist fn at a given physical spacial point to a file
205
+ write_hrate = .false. ! Write heating rate, collisonal entropy generation etc to '.heat'
206
+ ! write_final_epar not specified --- If (write_ascii = T) E_parallel(theta) written to runname.eigenfunc
207
+ write_avg_moments = .F. ! Write flux surface averaged low-order moments of g to runname.out.nc and runname.moments (if write_ascii = T)
208
+ ! write_lorentzian not specified --- Frequency Sweep Data
209
+ write_omega = .false. ! If (write_ascii = T) instantaneous omega to output file. Very heavy output
210
+ write_omavg = .false. ! If (write_ascii = T) time-averaged growth rate and frequency to the output file.
211
+ write_eigenfunc = .true. ! If (write_ascii = T) Normalized phi written to runname.eigenfunc
212
+ write_final_fields = .true. ! If (write_ascii = T) Phi(theta) written to '.fields'
213
+ write_final_moments = .true. ! write final n, T
214
+ ! write_parity not specified --- Writes parities in dist fn and particle fluxes
215
+ nsave = 100 ! Write restart files every nsave timesteps
216
+ nwrite = 1 ! Output diagnostic data every nwrite
217
+ navg = 10 ! Any time averages performed over navg
218
+ omegatol = -0.001 ! The convergence has to be better than one part in 1/omegatol
219
+ omegatinst = 500.0 ! Recommended value: 500.
220
+ save_for_restart = .true. ! Write restart files.
221
+ ! write_flux_line not specified ---
222
+ ! write_ascii not specified ---
223
+ ! write_kpar not specified ---
224
+ ! write_gs not specified ---
225
+ ! write_gg not specified ---
226
+ ! write_lpoly not specified ---
227
+ ! write_fields not specified ---
228
+ ! write_final_antot not specified ---
229
+ ! write_cerr not specified ---
230
+ ! write_max_verr not specified ---
231
+ ! nmovie not specified ---
232
+ ! igomega not specified ---
233
+ ! exit_when_converged not specified ---
234
+ ! write_full_moments_notgc not specified ---
235
+ ! write_cross_phase not specified ---
236
+ ! dump_check1 not specified ---
237
+ ! dump_check2 not specified ---
238
+ ! dump_fields_periodically not specified ---
239
+ ! make_movie not specified ---
240
+ write_phi_over_time = .false. ! Write entire Phi field to NetCDF file every nwrite.
241
+ ! write_apar_over_time not specified --- Write entire A_parallel field to NetCDF file every nwrite.
242
+ ! write_bpar_over_time not specified --- Write entire B_parallel field to NetCDF file every nwrite.
243
+ ! write_symmetry not specified --- Test the symmetry properties of the GK eqn.
244
+ ! save_distfn not specified --- Save dist_fn with lots of detail.
245
+ ! write_correlation_extend not specified --- Extend domain of correlation function calculation.
246
+ ! nwrite_mult not specified --- Large datasets written every nwrite_mult * nwrite timesteps.
247
+ ! write_correlation not specified --- Write parallel correlation.
248
+ ! write_moments not specified ---
249
+ ! write_final_db not specified --- Write final delta B.
250
+ /
251
+
252
+ &general_f0_parameters
253
+ alpha_f0 = 'analytic'
254
+ energy_0 = 0.01
255
+ /
@@ -332,3 +332,12 @@ EOF
332
332
 
333
333
  end # class TestCodeRunner
334
334
 
335
+ #class TestFortranNamelist < Test::Unit::TestCase
336
+ ##require 'gs2crmod'
337
+ #def test_make_defaults
338
+ #Dir.chdir('test') do
339
+ #CodeRunner.code_command('make_new_defaults_file("fortran_namelist", "fortran_namelist.in")', C: 'gs2')
340
+ #assert(File.read('fortran_namelist_defaults.rb')=~/tprim_1/)
341
+ #end
342
+ #end
343
+ #end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coderunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.13
4
+ version: 0.12.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-16 00:00:00.000000000 Z
12
+ date: 2013-07-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphkit
@@ -228,6 +228,7 @@ files:
228
228
  - lib/coderunner/system_modules/moab.rb
229
229
  - lib/coderunner/system_modules/new_hydra.rb
230
230
  - lib/coderunner/system_modules/slurm.rb
231
+ - lib/coderunner/system_modules/stampede.rb
231
232
  - lib/coderunner/test.rb
232
233
  - lib/coderunner/version.rb
233
234
  - lib/cubecalccrmod.rb
@@ -238,6 +239,7 @@ files:
238
239
  - lib/cubecalccrmod/empty.rb
239
240
  - lib/cubecalccrmod/sleep.rb
240
241
  - test/cubecalc.cc
242
+ - test/fortran_namelist.in
241
243
  - test/helper.rb
242
244
  - test/old_test.rb
243
245
  - test/test_coderunner.rb