wanderine / BROCCOLI

BROCCOLI: Software for Fast fMRI Analysis on Many-Core CPUs and GPUs
GNU General Public License v3.0
114 stars 38 forks source link

unsupported compiler #1

Closed 0xd5dc closed 10 years ago

0xd5dc commented 10 years ago

Warning: You are using gcc version "4.6.3-1ubuntu5)". The version currently supported with MEX is "4.4.6". For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release/

Do you use the gcc-4.4 and g++-4.4? I tried gcc-4.4 and g++-4.4 and got the following:

In file included from ../code/Matlab_Wrapper/FirstLevelAnalysis.cpp:20: ../code/Matlab_Wrapper/help_functions.cpp:1: fatal error: broccoli_lib.h: No such file or directory compilation terminated.

mex: compile of ' "../code/Matlab_Wrapper/FirstLevelAnalysis.cpp"' failed.

Error using mex (line 206) Unable to complete successfully.

Error in FirstLevelAnalysis_MixedGamblesTask (line 44) mex ../code/Matlab_Wrapper/FirstLevelAnalysis.cpp -lOpenCL -lBROCCOLI_LIB -I/usr/local/cuda-5.0/include/ -I/usr/local/cuda-5.0/include/CL -L/usr/lib -I/home/andek/Research_projects/BROCCOLI/BROC

And how do you update the addPath and basePath?

wanderine commented 10 years ago

I mostly develop with Centos 6.4, which has an older gcc. Fedora and Ubuntu often have very new versions, which often causes problems. See the beta testing folder for precompiled examples, or remove the mex command in the m-file.

You have to download nifti Matlab (http://research.baycrest.org/~jimmy/NIfTI/), in order to open nifti files in Matlab, and change addpath to where you stored nifti Matlab. More information is given in the instructions in the beta testing folder, https://github.com/wanderine/BROCCOLI/blob/master/beta_testing/BROCCOLI_beta_testing.pdf

The basepath for the beta testing folder does not need to be changed. For other folders, you first have to download data from the 1000 functional connectomes project (http://fcon_1000.projects.nitrc.org/fcpClassic/FcpTable.html) or OpenfMRI (https://openfmri.org/). Then simply change basepath to where you have saved these datasets.

0xd5dc commented 10 years ago

Thank you for the response; I can run the beta-test properly. But I am having trouble with OpenfMRIExample, think I the compiler didn't pick the correct path for BROCCOLI_LIB so according to this code

mex ../code/Matlab_Wrapper/FirstLevelAnalysis.cpp -lOpenCL -lBROCCOLI_LIB

Did you install BROCCOLI_LIB somewhere or just used it as a included local folder?

wanderine commented 10 years ago

In my case libBROCCOLI_LIB.a is stored at -L/home/andek/cuda-workspace/BROCCOLI_LIB/Release

If you look at the file FirstLevelAnalysis_RhymeJudgment.m under OpenfMRIExamples you will see the full mex command

mex ../code/Matlab_Wrapper/FirstLevelAnalysis.cpp -lOpenCL -lBROCCOLI_LIB -I/usr/local/cuda-5.0/include/ -I/usr/local/cuda-5.0/include/CL -L/usr/lib -I/home/andek/Research_projects/BROCCOLI/BROCCOLI/code/BROCCOLI_LIB/ -L/home/andek/cuda-workspace/BROCCOLI_LIB/Release -I/home/andek/Research_projects/BROCCOLI/BROCCOLI/code/BROCCOLI_LIB/Eigen/

I have now uploaded libBROCCOLI_LIB.a under https://github.com/wanderine/BROCCOLI/tree/master/code/BROCCOLI_LIB

0xd5dc commented 10 years ago

where can I find /highres001_brain.nii.gz and /highres001_brain.nii.gz?

../code/BROCCOLI_LIB/Release/libBROCCOLI_LIB.a: file not recognized: File format not recognized collect2: ld returned 1 exit status

mex: link of ' "FirstLevelAnalysis.mexa64"' failed.

so which Broccoli have you installed? I think I need compile it for my platform(ubuntu 12.04 x86_64).

wanderine commented 10 years ago

You have to download the RhymeJudgment dataset from the OpenfMRI homepage if you want to run FirstLevelAnalsis_RhymeJudgment.m

https://openfmri.org/dataset/ds000003

If you need to recompile the library you can do it with Nvidia Nsight

https://developer.nvidia.com/nsight-eclipse-edition

0xd5dc commented 10 years ago

Would you please provide a Makefile for BROCCOLI_LIB? I would be much easier for all Linux users.

wanderine commented 10 years ago

OK, but it might take some time.

wanderine commented 10 years ago

I have now added the script compile_broccoli_library.sh under https://github.com/wanderine/BROCCOLI/tree/master/code/BROCCOLI_LIB

It is not a makefile, but a makefile is a bit overkill for this project with only one cpp file

Note that I use the nvcc compiler, which you get if you download the CUDA SDK

https://developer.nvidia.com/cuda-downloads

Also note that you need some header files for OpenCL, these are included in the CUDA SDK

0xd5dc commented 10 years ago

Thanks, I think I can create a makefile based on the sh script.