[Neurodebian-users] fsl-5.0-gpu

Alex Waite alexqw85 at gmail.com
Tue Feb 25 08:52:40 UTC 2014


> The result of cat /etc/proc/cpuinfo | grep 'model name' is
> 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.

Excellent.

> However the nvidia-settings program shows that the nvidia gpu is in used.
 > [snip]

You may need to take a look in your BIOS to change the primary GPU to 
the Intel one. Also, make sure that you're no longer telling X to load 
the nvidia driver (/etc/X11/xorg.conf.d/20-nvidia.conf).

I think this should work. The computer will use the intel GPU from boot, 
X will automatically load the Intel driver, and the nvidia GPU will not 
be used for display.

> Then I got a message "Bad substitution" when bedpostx_gpu entered bedpost_postproc_gpu.sh at line 67:
>
> subjdir=${@:${#@}}
>
> 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
>
> /usr/share/fsl/5.0/bin/bedpostx_postproc_gpu.sh: 71: /usr/share/fsl/5.0/bin/bedpostx_postproc_gpu.
> sh: [[: not found
 >
 > So again it is the bash programming at the beggining of the 
bedpostx_postproc_gpu.sh that seems to be an issue.

I agree with Yury that these are bashisms in the code. No need to hard 
code the subjdir.

The shebang of the shell script declares /bin/sh as the interpreter. For 
awhile there, many distros (Debian included) made the poor decision to 
point /bin/sh to /bin/bash. The thing is that bash has many more 
features than sh, and this lead a bunch of people to write sh scripts 
that actually rely on bash features. Now debian (and many other distros) 
point /bin/sh to /bin/dash (a small, fast, POSIX compliant shell meant 
to mimic sh's behavior). It lacks many of the features of bash, hence 
the problem here.

Change the first line of that script to:
#!/bin/bash

> I will look at that tomorrow. Thank you for the help,

Always happy to help out.

---Alex




More information about the Neurodebian-users mailing list