Skip to content
Snippets Groups Projects
Commit 8fa687b5 authored by Philipp Rüssmann's avatar Philipp Rüssmann
Browse files

Change test run for KKRnano from srun to mpirun

parent 3a0a6108
No related branches found
No related tags found
No related merge requests found
......@@ -21,8 +21,8 @@ ShowMD5 = True
AllMPIs = 1 # 1=Yes, 0=No
HighLmax = True
testNocoSOC = True
verbose = True
MPIEXEC = 'srun'
verbose = False
MPIEXEC = 'mpirun' # 'srun'
def run_it(cmd):
"""Run cmd, suppressing output. Returns output from stdout and exit code"""
......@@ -78,9 +78,10 @@ def KKRnano(inputdir, nranks=DEFAULT_nranks, nthreads=DEFAULT_nthreads, solver=D
if MPIEXEC=='srun':
mpirun = 'srun -n'
out, err, tim = run_it("OMP_STACKSIZE=80M OMP_NUM_THREADS={0} ".format(int(nthreads)) + mpirun + " {0} kkr.exe".format(int(nranks)))
#print 'out', out
#print 'err', err
#print 'tim', tim
if verbose:
print 'out', out
print 'err', err
print 'tim', tim
### grep the result
total_energy = get_energy(out)
print "KKR for",inputdir," with lmax=",lmax," gives",total_energy,"Ryd",
......@@ -96,6 +97,8 @@ def KKRnano(inputdir, nranks=DEFAULT_nranks, nthreads=DEFAULT_nthreads, solver=D
out, err, tim = run_it("./clearfiles.sh")
return total_energy
######################################################################################
class Test_alloys(unittest.TestCase):
def test_Fe8Co8(self):
"""Test random alloy of 16 atoms"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment