Révision 16 prepareQMX/qmxWRITE.py
qmxWRITE.py (revision 16) | ||
---|---|---|
25 | 25 |
arrImports.append(s) |
26 | 26 |
|
27 | 27 |
stream.write("\n") |
28 |
for name in ['high-level', 'low-level', 'qmx']:
|
|
28 |
for name in ['high-level', 'low-level', 'hybrid']:
|
|
29 | 29 |
for definition in definitions: |
30 | 30 |
if definition.system.lower() != name: |
31 | 31 |
continue |
... | ... | |
37 | 37 |
stream.write(strSystem+'='+strClass+'('+strOptions+')\n') |
38 | 38 |
|
39 | 39 |
stream.write("\n") |
40 |
for name in ['system', 'cluster', 'embed']: |
|
40 |
|
|
41 |
extraOptions = '' |
|
42 |
for name in ['cluster', 'system', 'embed']: |
|
41 | 43 |
for definition in definitions: |
42 | 44 |
if definition.system.lower() != name: |
43 | 45 |
continue |
... | ... | |
46 | 48 |
strOptions=definition.getValue('class.options') |
47 | 49 |
|
48 | 50 |
if (strClass is not ''): |
49 |
stream.write(strSystem+'='+strClass+"('"+strOptions+"')\n") |
|
51 |
if name is 'embed': |
|
52 |
if strOptions is not '': |
|
53 |
strOptions += ', ' |
|
54 |
strOptions += extraOptions |
|
55 |
stream.write(strSystem+'='+strClass+"("+strOptions+")\n") |
|
50 | 56 |
|
57 |
if name is 'cluster' and definition.name is 'CLUSTER': |
|
58 |
stream.write(strSystem+'=['+strOptions+']'+'\n') |
|
59 |
extraOptions='cluster_pos=False' |
|
60 |
|
|
51 | 61 |
if name is 'embed': |
52 |
strMethod=definition.getValue('method') |
|
53 |
strOptions=definition.getValue('method.options') |
|
54 |
stream.write(strSystem+'.'+strMethod+'('+strOptions+')\n') |
|
62 |
strOptions=definition.getValue('set_calculator') |
|
63 |
stream.write(strSystem+'.set_calculator('+strOptions+')\n') |
|
55 | 64 |
|
56 |
strOptions=definition.getValue('calculator') |
|
57 |
stream.write(strSystem+'.set_calculator('+strOptions+')\n') |
|
58 |
|
|
59 | 65 |
stream.write("\n") |
60 | 66 |
for definition in definitions: |
61 | 67 |
if (definition.system.lower() == 'job'): |
Formats disponibles : Unified diff