<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">With great pleasure Michael!<br>
<br>
I join as attachment a patch for the three files. Please notice that it's only for bedpostx_gpu. There are other routines than seem to be parallelised by fsl-5.0-gpu. I wil have a look at them later. I'll answer Alex as well since there are some slight differences
 between the results from CPU and GPU.<br>
<br>
Best,<br>
<br>
Jonathan<br>
<br>
<br>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF935687" style="direction:ltr"><font color="#000000" face="Tahoma" size="2"><b>De :</b> Michael Hanke [michael.hanke@gmail.com]<br>
<b>Envoyé :</b> mardi 25 février 2014 21:25<br>
<b>À :</b> Jonathan Berrebi<br>
<b>Cc :</b> Alex Waite; neurodebian-users@lists.alioth.debian.org<br>
<b>Objet :</b> Re: [Neurodebian-users] fsl-5.0-gpu<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Hey,
<div><br>
</div>
<div>would you mind submitting a patch for all changes you had to make?</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Michael</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Feb 25, 2014 at 9:10 PM, Jonathan Berrebi <span dir="ltr">
<<a href="mailto:Jonathan.Berrebi@ki.se" target="_blank">Jonathan.Berrebi@ki.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
Thank you Alex and Yury!<br>
<br>
I replaced all the #/bin/sh with #/bin/bash in the bedpostx_gpu and bedpostx_postproc_gpu.sh and fsl_sub files. I think it worked now. It took 6 hours on a 96 cores GPU instead of one day on Intel Xeon. The only warning I get is on the monitor "routine" ${subjdir}.bedpostX/monitor
 about zeropadding:<br>
<br>
<<FP02.bedpostX/monitor: line 21: /bin/zeropad: No such file or directory>><br>
<br>
I will check that the results are numerically not different than when they CPU computed.<br>
<br>
Once thing though is that I had to stop gdm3 in order to get it to work. I really tried to use the intel HD 3000 integrated GPU for the Graphics by changing the settings in the bios. But then the nvidia-detect routine did not detect the GPU. So I thought it
 wouldn't work. Then I even installed bumblebee  and changed the settings in the bios into Optimus but that become more a bumblebee than a fsl/cuda problem so I gave up. I might retry later.<br>
<br>
Thank you for your help,<br>
<div class=""><br>
Jonathan<br>
<br>
________________________________________<br>
De : Neurodebian-users [neurodebian-users-bounces+jonathan.berrebi=<a href="mailto:ki.se@lists.alioth.debian.org" target="_blank">ki.se@lists.alioth.debian.org</a>] de la part de Alex Waite [<a href="mailto:alexqw85@gmail.com" target="_blank">alexqw85@gmail.com</a>]<br>
</div>
Envoyé : mardi 25 février 2014 09:52<br>
<div class="im HOEnZb">À : <a href="mailto:neurodebian-users@lists.alioth.debian.org" target="_blank">
neurodebian-users@lists.alioth.debian.org</a><br>
Objet : Re: [Neurodebian-users] fsl-5.0-gpu<br>
<br>
</div>
<div class="HOEnZb">
<div class="h5">> The result of cat /etc/proc/cpuinfo | grep 'model name' is<br>
> Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz which includes an Intel® HD Graphics 3000. So I don't need the NVIDIA GPU to have graphics on my laptop.<br>
<br>
Excellent.<br>
<br>
> However the nvidia-settings program shows that the nvidia gpu is in used.<br>
 > [snip]<br>
<br>
You may need to take a look in your BIOS to change the primary GPU to<br>
the Intel one. Also, make sure that you're no longer telling X to load<br>
the nvidia driver (/etc/X11/xorg.conf.d/20-nvidia.conf).<br>
<br>
I think this should work. The computer will use the intel GPU from boot,<br>
X will automatically load the Intel driver, and the nvidia GPU will not<br>
be used for display.<br>
<br>
> Then I got a message "Bad substitution" when bedpostx_gpu entered bedpost_postproc_gpu.sh at line 67:<br>
><br>
> subjdir=${@:${#@}}<br>
><br>
> I don't know bash programming so much so I har coded subjdir and it still does not work. But at least I can really hear the fan of my GPU for a short while and the screen freezes as well which are good signs I guess. But the jobs stop<br>
><br>
> /usr/share/fsl/5.0/bin/bedpostx_postproc_gpu.sh: 71: /usr/share/fsl/5.0/bin/bedpostx_postproc_gpu.<br>
> sh: [[: not found<br>
 ><br>
 > So again it is the bash programming at the beggining of the<br>
bedpostx_postproc_gpu.sh that seems to be an issue.<br>
<br>
I agree with Yury that these are bashisms in the code. No need to hard<br>
code the subjdir.<br>
<br>
The shebang of the shell script declares /bin/sh as the interpreter. For<br>
awhile there, many distros (Debian included) made the poor decision to<br>
point /bin/sh to /bin/bash. The thing is that bash has many more<br>
features than sh, and this lead a bunch of people to write sh scripts<br>
that actually rely on bash features. Now debian (and many other distros)<br>
point /bin/sh to /bin/dash (a small, fast, POSIX compliant shell meant<br>
to mimic sh's behavior). It lacks many of the features of bash, hence<br>
the problem here.<br>
<br>
Change the first line of that script to:<br>
#!/bin/bash<br>
<br>
> I will look at that tomorrow. Thank you for the help,<br>
<br>
Always happy to help out.<br>
<br>
---Alex<br>
<br>
<br>
_______________________________________________<br>
Neurodebian-users mailing list<br>
<a href="mailto:Neurodebian-users@lists.alioth.debian.org" target="_blank">Neurodebian-users@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/neurodebian-users" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/neurodebian-users</a><br>
_______________________________________________<br>
Neurodebian-users mailing list<br>
<a href="mailto:Neurodebian-users@lists.alioth.debian.org" target="_blank">Neurodebian-users@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/neurodebian-users" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/neurodebian-users</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div>Michael Hanke</div>
<div><a href="http://mih.voxindeserto.de" target="_blank">http://mih.voxindeserto.de</a></div>
<div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>