diff --git a/lib/buildTemplate.py b/lib/buildTemplate.py index 6d50cda..6e9823d 100644 --- a/lib/buildTemplate.py +++ b/lib/buildTemplate.py @@ -23,7 +23,7 @@ eps= 2.2204e-16 SCRIPTDIR= dirname(__file__) config = ConfigParser() -config.read(f'/tmp/harm_config_{getpid()}.ini') +config.read(pjoin(gettempdir(),f'harm_config_{getpid()}.ini')) N_shm = int(config['DEFAULT']['N_shm']) N_proc = int(config['DEFAULT']['N_proc']) bshell_b = int(config['DEFAULT']['bshell_b']) diff --git a/lib/debug_fa.py b/lib/debug_fa.py index 52e7c5c..a8589a1 100644 --- a/lib/debug_fa.py +++ b/lib/debug_fa.py @@ -23,7 +23,7 @@ mniTmp = pjoin(ROOTDIR, 'IITAtlas', 'IITmean_FA.nii.gz') config = ConfigParser() -config.read(f'/tmp/harm_config_{getpid()}.ini') +config.read(pjoin(gettempdir(),f'harm_config_{getpid()}.ini')) N_proc = int(config['DEFAULT']['N_proc']) diffusionMeasures = [x for x in config['DEFAULT']['diffusionMeasures'].split(',')] bshell_b = int(config['DEFAULT']['bshell_b']) diff --git a/lib/preprocess.py b/lib/preprocess.py index 32f73f7..c83f869 100644 --- a/lib/preprocess.py +++ b/lib/preprocess.py @@ -24,7 +24,7 @@ SCRIPTDIR= dirname(__file__) config = ConfigParser() -config.read(f'/tmp/harm_config_{getpid()}.ini') +config.read(pjoin(gettempdir(),f'harm_config_{getpid()}.ini')) N_shm = int(config['DEFAULT']['N_shm']) N_proc = int(config['DEFAULT']['N_proc']) diff --git a/lib/reconstSignal.py b/lib/reconstSignal.py index 17a14b9..6cfdd91 100644 --- a/lib/reconstSignal.py +++ b/lib/reconstSignal.py @@ -24,7 +24,7 @@ eps= 2.2204e-16 SCRIPTDIR= dirname(__file__) config = ConfigParser() -config.read(f'/tmp/harm_config_{getpid()}.ini') +config.read(pjoin(gettempdir(),f'harm_config_{getpid()}.ini')) N_shm = int(config['DEFAULT']['N_shm']) N_proc = int(config['DEFAULT']['N_proc']) bshell_b = int(config['DEFAULT']['bshell_b']) diff --git a/lib/util.py b/lib/util.py index 71c7c10..d7b297c 100644 --- a/lib/util.py +++ b/lib/util.py @@ -18,6 +18,7 @@ from shutil import copyfile, rmtree import numpy as np import shutil, sys +from tempfile import gettempdir SCRIPTDIR= abspath(dirname(__file__))