Skip to content
Snippets Groups Projects
Commit 0ff9f81c authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

fix job script for SGE

I messed up the nprocesses/nthreads parameter
parent 98d5afab
No related branches found
No related tags found
1 merge request!23WIP: Feature/use cmake
...@@ -271,7 +271,7 @@ class _code(_base): ...@@ -271,7 +271,7 @@ class _code(_base):
qsub_script_name = 'run_' + suffix + '.sh' qsub_script_name = 'run_' + suffix + '.sh'
self.write_sge_file( self.write_sge_file(
file_name = os.path.join(self.work_dir, qsub_script_name), file_name = os.path.join(self.work_dir, qsub_script_name),
nprocesses = nb_processes*nb_threads_per_process, nprocesses = nb_processes,
name_of_run = suffix, name_of_run = suffix,
command_atoms = command_atoms[5:], command_atoms = command_atoms[5:],
hours = hours, hours = hours,
...@@ -590,14 +590,15 @@ class _code(_base): ...@@ -590,14 +590,15 @@ class _code(_base):
envprocs)) envprocs))
script_file.write('echo "got $NSLOTS slots."\n') script_file.write('echo "got $NSLOTS slots."\n')
script_file.write('echo "Start time is `date`"\n') script_file.write('echo "Start time is `date`"\n')
script_file.write('mpiexec -machinefile $TMPDIR/machines ' + script_file.write('mpiexec \\\n' +
'-genv OMP_NUM_THREADS={0} '.format(nb_threads_per_process) + '\t-machinefile $TMPDIR/machines \\\n' +
'-genv OMP_PLACES=cores ' + '\t-genv OMP_NUM_THREADS={0} \\\n'.format(nb_threads_per_process) +
'-genv LD_LIBRARY_PATH ' + '\t-genv OMP_PLACES=cores \\\n' +
'"' + '\t-genv LD_LIBRARY_PATH \\\n' +
'\t"' +
':'.join([bfps.lib_dir] + bfps.install_info['library_dirs']) + ':'.join([bfps.lib_dir] + bfps.install_info['library_dirs']) +
'" ' + '" \\\n' +
'-n {0} {1}\n'.format(nprocesses, ' '.join(command_atoms))) '\t-n {0} \\\n\t{1}\n'.format(nprocesses, ' '.join(command_atoms)))
script_file.write('echo "End time is `date`"\n') script_file.write('echo "End time is `date`"\n')
script_file.write('exit 0\n') script_file.write('exit 0\n')
script_file.close() script_file.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment