-
Notifications
You must be signed in to change notification settings - Fork 15
add parfor loop into bidsSpatialPrep #257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
1530a16
Merge pull request #145 from cpp-lln-lab/dev
Remi-Gau cc5b636
fix contributor bot json
Remi-Gau 9c02da5
Merge pull request #185 from Remi-Gau/remi-fix_contributor_bot
Remi-Gau 9da5478
docs: update README.md [skip ci]
allcontributors[bot] 78ad40d
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] 858f3cb
Merge pull request #186 from cpp-lln-lab/all-contributors/add-marcoba…
Remi-Gau e24480f
docs: update README.md [skip ci]
allcontributors[bot] b6d7e91
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] df0f501
Merge branch 'master' into all-contributors/add-marcobarilari
Remi-Gau 57e33fc
Merge pull request #203 from cpp-lln-lab/all-contributors/add-marcoba…
Remi-Gau 70d6e10
docs: update README.md [skip ci]
allcontributors[bot] 2b1bd7e
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] b5e03ff
Merge pull request #204 from cpp-lln-lab/all-contributors/add-fedefalag
Remi-Gau 75864bd
docs: update README.md [skip ci]
allcontributors[bot] 81ae18c
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] 6f2f6b6
Merge pull request #205 from cpp-lln-lab/all-contributors/add-CerenB
Remi-Gau 93f5d03
docs: update README.md [skip ci]
allcontributors[bot] a72dadf
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] 7fe5505
Merge branch 'master' into all-contributors/add-CerenB
Remi-Gau b7001cc
Merge pull request #206 from cpp-lln-lab/all-contributors/add-CerenB
Remi-Gau f86185f
docs: update README.md [skip ci]
allcontributors[bot] fc28147
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] 4a5dee2
Merge pull request #207 from cpp-lln-lab/all-contributors/add-Remi-Gau
Remi-Gau b96b266
Merge remote-tracking branch 'cpp-lln-lab/master' into dev
CerenB 46f3f16
Merge remote-tracking branch 'cpp-lln-lab/dev' into dev
CerenB 794f63b
bids matlab master branch update
CerenB 6ea3e32
Merge remote-tracking branch 'cpp-lln-lab/dev' into dev
CerenB d269f73
parfor loop added
CerenB fe76134
mh_style fix
CerenB 0fcd9fd
Update src/workflows/bidsSpatialPrepro.m
CerenB 84a5b94
make sure that when set to false parallel.do only uses 1 worker
Remi-Gau e81402a
mh autofix
Remi-Gau 9557217
Merge pull request #1 from Remi-Gau/remi-parfor_maangement
CerenB File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| function test_suite = test_manageWorkersPool %#ok<*STOUT> | ||
| try % assignment of 'localfunctions' is necessary in Matlab >= 2016 | ||
| test_functions = localfunctions(); %#ok<*NASGU> | ||
| catch % no problem; early Matlab versions can use initTestSuite fine | ||
| end | ||
| initTestSuite; | ||
| end | ||
|
|
||
| function test_manageWorkersPoolBasic() | ||
|
|
||
| opt.parallelize.do = true; | ||
| opt.parallelize.nbWorkers = 3; | ||
| opt.parallelize.killOnExit = true; | ||
|
|
||
| matlabVer = version('-release'); | ||
|
|
||
| manageWorkersPool('close', opt); | ||
|
|
||
| manageWorkersPool('open', opt); | ||
|
|
||
| if ~isOctave() | ||
| if str2double(matlabVer(1:4)) > 2013 | ||
|
|
||
| pool = gcp('nocreate'); | ||
| nbWorkers = pool.NumWorkers; | ||
|
|
||
| else | ||
| nbWorkers = matlabpool('size'); %#ok<DPOOL> | ||
|
|
||
| end | ||
|
|
||
| manageWorkersPool('close', opt); | ||
|
|
||
| assertEqual(nbWorkers, opt.parallelize.nbWorkers); | ||
|
|
||
| end | ||
|
|
||
| end | ||
|
|
||
| function test_manageWorkersPoolNoParallel() | ||
|
|
||
| opt.parallelize.do = false; | ||
| opt.parallelize.nbWorkers = 3; | ||
| opt.parallelize.killOnExit = true; | ||
|
|
||
| matlabVer = version('-release'); | ||
|
|
||
| manageWorkersPool('close', opt); | ||
|
|
||
| manageWorkersPool('open', opt); | ||
|
|
||
| if ~isOctave() | ||
| if str2double(matlabVer(1:4)) > 2013 | ||
|
|
||
| pool = gcp('nocreate'); | ||
| nbWorkers = pool.NumWorkers; | ||
|
|
||
| else | ||
| nbWorkers = matlabpool('size'); %#ok<DPOOL> | ||
|
|
||
| end | ||
|
|
||
| manageWorkersPool('close', opt); | ||
|
|
||
| assertEqual(nbWorkers, 1); | ||
|
|
||
| end | ||
|
|
||
| end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.