This is an important point, so it's good that we get a chance to comment on it.
Any and all statements that produce I/O (such as disk operations, file read/write, and print statements) must be made "parallel-safe" when you run ATK under MPI, otherwise multiple MPI processes will attempt to write to the same file. This is because when you execute a script in parallel, each node actually runs the whole script and executes all statements. In the benign case this results in double output in your stdout log, but in other situations your files, like VNL files, may be corrupted.
To make a statement "parallel-safe", precede it with the statement:
This function should be imported from the
ATK.MPI module. Thus, for a full example (I'm completing your example with the for-loop):
from ATK.MPI import processIsMaster
...
if processIsMaster():
for i in range(len(trans_energy)):
print trans_energy.pop(),'\t',trans_coeff.pop()
Note that VNL always produces MPI-safe scripts.
NOTE: The above approach to print the spectrum is a bit dangerous. Once the loop is done, the variables
trans_energy and
trans_coeff are destroyed (empty). Cf. this example:
v = [1,2,3]
for i in range(len(v)):
print v.pop()
print v
which produces
3
2
1
[]
A better example of how to write nicely formatted T(E) can be found in
the manual.