Skip to content
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

Using eddy_cuda when applying dwifslpreproc in MicaPipe #133

Open
PaulBautin opened this issue Sep 23, 2024 · 0 comments
Open

Using eddy_cuda when applying dwifslpreproc in MicaPipe #133

PaulBautin opened this issue Sep 23, 2024 · 0 comments

Comments

@PaulBautin
Copy link

PaulBautin commented Sep 23, 2024

What is the current behaviour?

  • From my understanding, MicaPipe disables by default the use of CUDA with line export CUDA_VISIBLE_DEVICES=''" in $MICAPIPE/functions/utilities.sh script.

What is the motivation / use case for changing the behaviour?

  • Certain MRtrix dwifslpreproc eddy functions only work on GPU (ex: slice-to-volume correction).

Solution:

  • The micapipe FSL version requires cudatoolkit version 9.1. This can be installed in the micapipe conda environement with the command: conda install numba::cudatoolkit (latest version of cudatoolkit on numba is v9.1).
  • A pointer to toolkit in the conda environment must be addded with command export LD_LIBRARY_PATH="$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"
  • Comment this line export CUDA_VISIBLE_DEVICES=''" in $MICAPIPE/functions/utilities.sh script.

Other information
I think the solution could be implemented on the local MicaPipe env (keeping cudatoolkit version to eddy_cuda/FSL requirements). The use of CUDA could continue to be disabled by default and a different dwifslpreproc command could be used when flag -use_cuda is enabled.

  • without flag -use_cuda:
    dwifslpreproc "$dwi_4proc" "$dwi_corr" $opt -pe_dir "$pe_dir" -readout_time "$ReadoutTime" -eddy_options " --data_is_shelled --slm=linear --repol " -nthreads "$threads" -nocleanup -scratch "$tmp" -force

  • with flag -use_cuda:
    dwifslpreproc "$dwi_4proc" "$dwi_corr" $opt -pe_dir "$pe_dir" -readout_time "$ReadoutTime" -eddy_options " --data_is_shelled --slm=linear --repol --mporder=# --nvoxhp=4000" -nthreads "$threads" -nocleanup -scratch "$tmp" -force

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

No branches or pull requests

1 participant