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

remove LD_LIBRARY_PATH definitions

if code doesn't run, fix the -rpath thing in the cmake config.
parent 05457bec
Branches
Tags
1 merge request!23WIP: Feature/use cmake
Pipeline #45144 canceled
......@@ -196,7 +196,7 @@ class _code(_base):
return None
def compile_code(
self,
no_debug = False):
no_debug = True):
# compile code
build_dir = 'bfps_build_' + self.name
os.makedirs(build_dir, exist_ok = True)
......@@ -219,7 +219,8 @@ class _code(_base):
outfile.write('target_link_libraries(' + self.name + ' ${BFPS_LIBS})\n')
subprocess.check_call(['cmake', '.'])
current_environment = os.environ
current_environment['VERBOSE'] = '1'
if not no_debug:
current_environment['VERBOSE'] = '1'
make_result = subprocess.check_call(['make'], env = current_environment)
os.chdir('..')
shutil.copy2(build_dir + '/' + self.name, self.name)
......@@ -357,9 +358,6 @@ class _code(_base):
elif self.host_info['type'] == 'pc':
os.chdir(self.work_dir)
if os.getenv('LD_LIBRARY_PATH') != None:
os.environ['LD_LIBRARY_PATH'] += ':{0}'.format(bfps.lib_dir)
print('added to LD_LIBRARY_PATH the location {0}'.format(bfps.lib_dir))
for j in range(njobs):
suffix = self.simname + '_{0}'.format(iter0 + j*self.parameters['niter_todo'])
print('running code with command\n' + ' '.join(command_atoms))
......@@ -444,9 +442,6 @@ class _code(_base):
script_file.write('module li\n')
script_file.write('export OMP_NUM_THREADS={}\n'.format(nb_threads_per_process))
#script_file.write('LD_LIBRARY_PATH=' +
# ':'.join([bfps.lib_dir] + bfps.install_info['library_dirs']) +
# ':${LD_LIBRARY_PATH}\n')
script_file.write('echo "Start time is `date`"\n')
script_file.write('export HTMLOUTPUT={}.html\n'.format(command_atoms[-1]))
script_file.write('cd ' + self.work_dir + '\n')
......@@ -549,9 +544,6 @@ class _code(_base):
script_file.write('module li\n')
script_file.write('export OMP_NUM_THREADS={}\n'.format(nb_threads_per_process))
#script_file.write('LD_LIBRARY_PATH=' +
# ':'.join([bfps.lib_dir] + bfps.install_info['library_dirs']) +
# ':${LD_LIBRARY_PATH}\n')
script_file.write('echo "Start time is `date`"\n')
script_file.write('export HTMLOUTPUT={}.html\n'.format(command_atoms[-1]))
script_file.write('cd ' + self.work_dir + '\n')
......@@ -610,10 +602,6 @@ class _code(_base):
'\t-machinefile $TMPDIR/machines \\\n' +
'\t-genv OMP_NUM_THREADS={0} \\\n'.format(nb_threads_per_process) +
'\t-genv OMP_PLACES=cores \\\n' +
'\t-genv LD_LIBRARY_PATH \\\n' +
#'\t"' +
#':'.join([bfps.lib_dir] + bfps.install_info['library_dirs']) +
#'" \\\n' +
'\t-n {0} \\\n\t{1}\n'.format(nprocesses, ' '.join(command_atoms)))
script_file.write('echo "End time is `date`"\n')
script_file.write('exit 0\n')
......@@ -682,9 +670,6 @@ class _code(_base):
script_file.write('export OMP_NUM_THREADS={0}\n'.format(nb_threads_per_process))
script_file.write('export OMP_PLACES=cores\n')
#script_file.write('LD_LIBRARY_PATH=' +
# ':'.join([bfps.lib_dir] + bfps.install_info['library_dirs']) +
# ':${LD_LIBRARY_PATH}\n')
script_file.write('echo "Start time is `date`"\n')
script_file.write('cd ' + self.work_dir + '\n')
script_file.write('export HTMLOUTPUT={}.html\n'.format(command_atoms[-1]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment