Skip to content

FIX: Select Eddy command at runtime #1871

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 7 commits into from
Mar 22, 2017
Merged

FIX: Select Eddy command at runtime #1871

merged 7 commits into from
Mar 22, 2017

Conversation

effigies
Copy link
Member

@effigies effigies commented Mar 9, 2017

Follow-up to #1711

@satra
Copy link
Member

satra commented Mar 9, 2017

lgtm

@mgxd
Copy link
Member

mgxd commented Mar 9, 2017

whoops, good catch!

@codecov-io
Copy link

codecov-io commented Mar 9, 2017

Codecov Report

Merging #1871 into master will decrease coverage by <.01%.
The diff coverage is 50%.

@@            Coverage Diff             @@
##           master    #1871      +/-   ##
==========================================
- Coverage   72.92%   72.91%   -0.01%     
==========================================
  Files        1061     1061              
  Lines       53749    53756       +7     
  Branches     7728     7728              
==========================================
+ Hits        39194    39197       +3     
- Misses      13341    13345       +4     
  Partials     1214     1214
Flag Coverage Δ
#smoketests 72.91% <50%> (-0.01%) ⬇️
#unittests 70.35% <50%> (-0.01%) ⬇️
Impacted Files Coverage Δ
nipype/interfaces/fsl/epi.py 65.54% <50%> (-0.42%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf2b1f8...33f5db1. Read the comment docs.

@effigies
Copy link
Member Author

effigies commented Mar 9, 2017

Actually, if use_cuda is in the input_spec, it should be editable after instantiation, IMO. Pushed a change that just defines _cmd as a property. Is that reasonable, or does something need for _cmd to be accessible for the class as well?

@satra
Copy link
Member

satra commented Mar 9, 2017

@effigies - for many things we have class level assignments and instance level assignments. we could potentially support both in this case, but it's less of an issue here. i'm fine with your current changes.

@alexsavio
Copy link
Contributor

Thanks for this. I will remove the other issue I've just created: #1876.

How are you installing Eddy? The copy I've got is from the Debian version of the Neurodebian package:
http://neuro.debian.net/pkgs/fsl-5.0-eddy-nonfree.html

@satra
Copy link
Member

satra commented Mar 10, 2017

@yarikoptic, @mih - does the neurodebian version still distribute eddy separately? the fsl installer no longer does.

@effigies effigies changed the title FIX: Make Eddy._use_cuda update instance variable FIX: Select Eddy command at runtime Mar 10, 2017
@effigies
Copy link
Member Author

What's the best way to do a version check? Input spec? And what would be the check? The latest release seems to be 5.0.9, which is what's in Neurodebian.

If it's easier, someone feel free to build on my branch and start a new PR.

@alexsavio
Copy link
Contributor

For version checking, the interfaces.fsl.Info.version static method is your best friend. :)

@satra
Copy link
Member

satra commented Mar 19, 2017

@alexsavio - do you not have an eddy_openmp command with neurodebian?

@alexsavio
Copy link
Contributor

@satra - no I don't. I looked for it, I tried to update my installed package...nothing. I am using the Ubuntu xenial version.

@satra
Copy link
Member

satra commented Mar 20, 2017

@alexsavio - it looks like indeed eddy_openmp is not distributed via neurodebian or osx, which have eddy. however, it is available as part of the fsl centos download.

@effigies - we should think about adjusting this interface.

@effigies
Copy link
Member Author

@satra is eddy equivalent to eddy_openmp? And can we assume or require a properly defined $FSL_BIN?

return 'eddy'

FSLDIR = os.environ['FSLDIR']
if use_cuda and os.path.exists(os.path.join(FSLDIR, 'eddy_cuda')):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't the and clause be on a separate line? otherwise if cuda is not found it will default to one of openmp or plain eddy.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see how this is problematic for a lot of things, but the only thing i was hoping for was to replace eddy_openmp with eddy on systems that have eddy but not eddy_openmp at runtime. (so in an overloaded run_interface call.

the previous deleted _use_cuda seems reasonable here and can also be used in doctests without requiring fsl to be present.

@satra
Copy link
Member

satra commented Mar 22, 2017

looks good

@alexsavio
Copy link
Contributor

👍 LGTM

@satra satra merged commit 943f040 into nipy:master Mar 22, 2017
@effigies effigies deleted the patch-1 branch March 22, 2017 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants