Commit 1743c80a authored by Martin Uecker's avatar Martin Uecker

update patches

parent 3f8d82ca
......@@ -7,10 +7,10 @@ Subject: makefile change for compatibility with debian
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 0729483..29258b6 100644
index a2821d2..78fb74e 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ MEMONLY_CFL?=0
@@ -37,7 +37,7 @@ MEMONLY_CFL?=0
DESTDIR ?= /
......
From: Martin Uecker <martin.uecker@med.uni-goettingen.de>
Date: Mon, 10 Dec 2018 21:32:53 +0100
Subject: some more memory leaks
---
src/noncart/nufft.c | 1 +
src/pics.c | 14 +++++---------
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/src/noncart/nufft.c b/src/noncart/nufft.c
index ed0a6e4..2d9d6bc 100644
--- a/src/noncart/nufft.c
+++ b/src/noncart/nufft.c
@@ -590,6 +590,7 @@ static void nufft_free_data(const linop_data_t* _data)
md_free(data->fftmod);
md_free(data->weights);
md_free(data->roll);
+ md_free(data->basis);
#ifdef USE_CUDA
md_free(data->linphase_gpu);
diff --git a/src/pics.c b/src/pics.c
index da6ce4b..38b7624 100644
--- a/src/pics.c
+++ b/src/pics.c
@@ -79,20 +79,15 @@ static const struct linop_s* sense_nc_init(const long max_dims[DIMS], const long
*/
const struct linop_s* fft_slice = linop_fft_create(DIMS, map_dims, SLICE_FLAG);
- const struct linop_s* tmp = fft_op;
- fft_op = linop_chain(fft_slice, tmp);
- linop_free(tmp);
- linop_free(fft_slice);
+
+ fft_op = linop_chain_FF(fft_slice, fft_op);
}
- const struct linop_s* lop = linop_chain(maps_op, fft_op);
+ const struct linop_s* lop = linop_chain_FF(maps_op, fft_op);
//precond_op[0] = (struct operator_s*) nufft_precond_create( fft_op );
precond_op[0] = NULL;
- linop_free(maps_op);
- linop_free(fft_op);
-
return lop;
}
@@ -414,7 +409,7 @@ int main_pics(int argc, char* argv[])
if (NULL != basis_file) {
const struct linop_s* basis_op = linop_fmac_create(DIMS, bmx_dims, COEFF_FLAG, TE_FLAG, ~(COEFF_FLAG | TE_FLAG), basis);
- forward_op = linop_chain(forward_op, basis_op);
+ forward_op = linop_chain_FF(forward_op, basis_op);
}
} else {
@@ -677,6 +672,7 @@ int main_pics(int argc, char* argv[])
xfree(pat_file);
xfree(traj_file);
+ xfree(basis_file);
double end_time = timestamp();
From: Martin Uecker <martin.uecker@med.uni-goettingen.de>
Date: Tue, 11 Dec 2018 09:25:17 +0100
Subject: fix bart script
---
matlab/bart.m | 51 ++++++++++++++++++++++++++-------------------------
1 file changed, 26 insertions(+), 25 deletions(-)
diff --git a/matlab/bart.m b/matlab/bart.m
index 47d0af4..861a024 100644
--- a/matlab/bart.m
+++ b/matlab/bart.m
@@ -12,23 +12,24 @@ function [varargout] = bart(cmd, varargin)
end
bart_path = getenv('TOOLBOX_PATH');
- isWSL = false;
+ isWSL = false;
if isempty(bart_path)
if exist('/usr/local/bin/bart', 'file')
bart_path = '/usr/local/bin';
elseif exist('/usr/bin/bart', 'file')
bart_path = '/usr/bin';
- else
- % Try to execute bart inside wsl, if it works, then it returns
- % status 0
- [bartstatus, ~] = system('wsl bart version -V');
- if bartstatus==0
- bart_path = '/usr/bin';
- isWSL = true;
- else
- error('Environment variable TOOLBOX_PATH is not set.');
- end
+ else
+ % Try to execute bart inside wsl, if it works, then it returns
+ % status 0
+ [bartstatus, ~] = system('wsl bart version -V');
+ if bartstatus==0
+ bart_path = '/usr/bin';
+ isWSL = true;
+ else
+ error('Environment variable TOOLBOX_PATH is not set.');
+ end
+ end
end
% clear the LD_LIBRARY_PATH environment variable (to work around
@@ -60,20 +61,20 @@ function [varargout] = bart(cmd, varargin)
out_str = sprintf(' %s', out{:});
if ispc
- if isWSL
- % For WSL and modify paths
- cmdWSL = WSLPathCorrection(cmd);
- in_strWSL = WSLPathCorrection(in_str);
- out_strWSL = WSLPathCorrection(out_str);
- ERR = system(['wsl bart ', cmdWSL, ' ', in_strWSL, ' ', out_strWSL]);
- else
- % For cygwin use bash and modify paths
- ERR = system(['bash.exe --login -c ', ...
- strrep(bart_path, filesep, '/'), ...
- '"', '/bart ', strrep(cmd, filesep, '/'), ' ', ...
- strrep(in_str, filesep, '/'), ...
- ' ', strrep(out_str, filesep, '/'), '"']);
- end
+ if isWSL
+ % For WSL and modify paths
+ cmdWSL = WSLPathCorrection(cmd);
+ in_strWSL = WSLPathCorrection(in_str);
+ out_strWSL = WSLPathCorrection(out_str);
+ ERR = system(['wsl bart ', cmdWSL, ' ', in_strWSL, ' ', out_strWSL]);
+ else
+ % For cygwin use bash and modify paths
+ ERR = system(['bash.exe --login -c ', ...
+ strrep(bart_path, filesep, '/'), ...
+ '"', '/bart ', strrep(cmd, filesep, '/'), ' ', ...
+ strrep(in_str, filesep, '/'), ...
+ ' ', strrep(out_str, filesep, '/'), '"']);
+ end
else
ERR = system([bart_path, '/bart ', cmd, ' ', in_str, ' ', out_str]);
end
......@@ -7,10 +7,10 @@ Subject: remove empty directory
1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index 29258b6..89a02cb 100644
index 78fb74e..37d5003 100644
--- a/Makefile
+++ b/Makefile
@@ -560,7 +560,6 @@ install: bart $(root)/doc/commands.txt
@@ -596,7 +596,6 @@ install: bart $(root)/doc/commands.txt
install bart $(DESTDIR)/$(PREFIX)/bin/
install -d $(DESTDIR)/$(PREFIX)/share/doc/bart/
install $(root)/doc/*.txt $(root)/README $(DESTDIR)/$(PREFIX)/share/doc/bart/
......
From: Martin Uecker <martin.uecker@med.uni-goettingen.de>
Date: Tue, 11 Dec 2018 09:26:07 +0100
Subject: relax unit test
---
utests/test_nufft.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utests/test_nufft.c b/utests/test_nufft.c
index f834283..ce998ce 100644
--- a/utests/test_nufft.c
+++ b/utests/test_nufft.c
@@ -224,7 +224,7 @@ static bool test_nufft_basis_toeplitz(void)
md_zsmul(N, ci2_dims, dst1, dst1, sc / (n * n));
- return md_znrmse(N, ci2_dims, dst1, dst2) < 1.E-5;
+ return md_znrmse(N, ci2_dims, dst1, dst2) < 1.E-4;
}
0001-some-more-memory-leaks.patch
0002-fix-bart-script.patch
0003-relax-unit-test.patch
0004-makefile-change-for-compatibility-with-debian.patch
0005-remove-empty-directory.patch
0006-deactivate-ode-unit-tests.patch
0001-makefile-change-for-compatibility-with-debian.patch
0002-remove-empty-directory.patch
0003-deactivate-ode-unit-tests.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment