Skip to content
Snippets Groups Projects
Commit 7190b899 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

tox call works on laptop again

parent e4160734
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,7 @@ class code(base):
raise IOError('header not there:\n' +
'{0}\n'.format(os.path.join(bfps.header_dir, 'base.hpp')) +
'{0}\n'.format(bfps.dist_loc))
libraries = ['bfps'] + bfps.install_info['extra_libraries']
libraries = ['bfps'] + bfps.install_info['libraries']
command_strings = ['g++']
command_strings += [self.name + '.cpp', '-o', self.name]
......@@ -168,10 +168,10 @@ class code(base):
subprocess.call(qsub_atoms + [qsub_script_name])
os.chdir(current_dir)
job_name_list.append(self.name + '_' + suffix)
elif hostinfo['type'] == 'pc':
elif self.host_info['type'] == 'pc':
os.chdir(self.work_dir)
os.environ['LD_LIBRARY_PATH'] += ':{0}'.format(bfps.lib_dir)
subprocess.call(command,
subprocess.call(command_atoms,
stdout = open(out_file + '_' + simname, 'w'),
stderr = open(err_file + '_' + simname, 'w'))
os.chdir(current_dir)
......
......@@ -14,6 +14,7 @@ if hostname == 'chichi-G':
'/usr/include/mpich']
library_dirs = ['/usr/local/lib'
'/usr/lib/mpich']
extra_libraries = ['mpich']
if hostname in ['frontend01', 'frontend02']:
include_dirs = ['/usr/nld/mvapich2-1.9a2-gcc/include',
......
......@@ -70,7 +70,7 @@ pickle.dump(
{'include_dirs' : include_dirs,
'library_dirs' : library_dirs,
'extra_compile_args' : extra_compile_args,
'extra_libraries' : extra_libraries,
'libraries' : libraries,
'install_date' : now,
'git_revision' : git_revision},
open('bfps/install_info.pickle', 'wb'),
......
......@@ -143,6 +143,7 @@ def double(opt):
c.parameters['dst_nz'] = 2*opt.n
c.parameters['dst_simname'] = new_simname
c.write_src()
c.set_host_info({'type' : 'pc'})
if not os.path.isdir(os.path.join(opt.work_dir, 'resize')):
os.mkdir(os.path.join(opt.work_dir, 'resize'))
c.write_par(simname = old_simname)
......@@ -192,6 +193,7 @@ def NSlaunch(
c.finalize_code()
c.write_src()
c.write_par(simname = c.simname)
c.set_host_info({'type' : 'pc'})
if opt.run:
if opt.iteration == 0 and opt.initialize:
np.array([0.0]).tofile(
......@@ -204,10 +206,10 @@ def NSlaunch(
write_to_file = True,
testing = True,
rseed = 3284)
for nrun in range(opt.njobs):
c.run(ncpu = opt.ncpu,
simname = 'test',
iter0 = opt.iteration + nrun*opt.nsteps)
c.run(ncpu = opt.ncpu,
simname = 'test',
iter0 = opt.iteration,
njobs = opt.njobs)
return c
def convergence_test(opt):
......@@ -244,6 +246,7 @@ def convergence_test(opt):
# get real space fields
converter = bfps.fluid_converter()
converter.write_src()
converter.set_host_info({'type' : 'pc'})
for c in [c0, c1, c2]:
converter.work_dir = c.work_dir
converter.simname = c.simname + '_converter'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment