ecr05 / MSM_HOCR

Multimodal Surface Matching with Higher order Clique Reduction: Mac OS and Linux binaries
35 stars 10 forks source link

Help with make install instructions for the compilation #20

Open marionpavaux opened 2 years ago

marionpavaux commented 2 years ago

Hi, I got some difficulties with the installation of the MSM. I precisely followed the compilation instructions and got to the point where I had to do the make install for the DiscreteOpt, FastPDlib, etc..

The thing is, the compiler could not find the "includes" like includes related to the file newmesh, etc. It cannot find it because it is not the same folder. Another issue is with the FastPDlib, the error was it could not find the target.

I am just wondering if you have any idea of what could got wrong during the installation , or more detailed instructions we have to follow for "make install".

Thanks !

ecr05 commented 2 years ago

Hi, are the released versions not sufficient? https://github.com/ecr05/MSM_HOCR/releases

newmesh should be found in your fsl install. I always build fsl from source, which then sets up the $FSLDIR to the fsl source directory. $FSLDIR/includes should then point to where the newmesh headers are. FastPD likewise should be found there - which target do you mean?

marionpavaux commented 2 years ago

Hi, I took the last version that was released. $FSLDIR is at the right place (echo..), but newmesh is in fsl/src not fsl/includes, maybe that is the problem? FastPD is also there but when I do make install in the FastPD folder is says it cannot find the target (I suppose it is the Makefile that it cannot find in this case).

marionpavaux commented 2 years ago

This is the error I obtain more specifically :

Screenshot_20211028_205833

jewellewej commented 2 years ago

Hi Emma, I got the same issues when I tried to compile MSM, can you provide any further comments? After I changed the path of newmesh folder, other similar problems occurred. I've tried the compiled version you released, but it didn't work (my OS is Ubuntu 18.04). I want MSM for HCPpipeline use, it seems like the FSL MSM version isn't enough.

ecr05 commented 2 years ago

newmesh should be in $FSLDIR/include/newmesh/ . I built my FSL from source. If it's not there you will need to post to the FSL list to ask them where to find it. Have you added the path to $FSLDIR to your path as per: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation/SourceCode#Compiling_Source_Distribution which says to add these two lines to your environment script

export FSLDIR=pwd/fsl . ${FSLDIR}/etc/fslconf/fsl.sh

If the ubuntu 16 version doesn't work then I'll probably have to rebuild msm for ubuntu 18 myself soon and add it to the release tab. Probably with the next 2 weeks.

No the FSL version isn't enough.

marionpavaux commented 2 years ago

Hi, I think finally that the problem comes from the fact the fsl is not building properly. It seems not all projects are built. So finally I tried to download the binaries directly with the msm_ubuntu_v3. I then made chmod +x msm_ubuntu_v3 in the terminal to gives the authorization to execute. Then when I try ./msm_ubuntu_v3 --help, I get the error:

./msm_ubuntu_v3 : error while loading shared libraries: libopenblas.so.0: cannot open shared object file: no such file or directory.

So I really don't know what to do. Either I try to install the msm but the fsl is not built correctly, or I download the binaries but it is not working as well. Have you any idea ?

Also can I use the dHCP_template_alignment with the binaries If then I succeed to execute?

ecr05 commented 2 years ago

I need to rebuild msm for Ubuntu 18 for my systems. I'll get to it by beginning of next week and add it to the release

marionpavaux commented 2 years ago

I have Ubuntu 20.04 in case it needs more. Thanks for your help.

ecr05 commented 2 years ago

I don't have Ubuntu 20 to build it there I'm afraid.

Don't you have IT support that can help you build FSL and then MSM from source? Or downgrade your Ubuntu?

You can also check with the FSLlist for compile support. I cannot provide you with any more guidance than is provided on their website.

marionpavaux commented 2 years ago

Yes it seems I will have to understand why fsl is not building correctly with their website. Thanks

ecr05 commented 2 years ago

HI @marionpavaux @jewellewej. It turns out that building for ubuntu18 is really not working at the moment. As a workaround you can download the msm_centos_v3 binary but you will either have to put it in your ${FSLDIR}/bin folder and/or install the blas library using:

sudo apt-get install libopenblas-dev

To get it to then run.

marionpavaux commented 2 years ago

Hi, thanks for your comment, we finally succeeded in making the binaries msm_ubuntu_v3 work in a ubuntu 16 container using singluarity. It turns out finally that it is also working for ubuntu 20. The library was in fact not installed so it was not working at the beginning. The only thing now is when I try to run it with the Neuroimage aMSM configuration file and not the Neuroimage normal MSM configuration file:

I get the error

cost.size() 3 DISCRETE,DISCRETE,DISCRETE iters 40,40,40 lambda 0.025,0.025,0.025 sigmain 6,4,2 sigmaref 6,4,2 datagrid 4,5,6 cp gridres 2,3,4 sp grid 4,5,6 alpha_knn 5,5,5 in parse options _simval 2,2,2 interations 40,40,40 input sigma 6,4,2 ref sigma 6,4,2 lambda 0.025,0.025,0.025 _genesis 4,5,6 _gridres 2,3,4 _sampres 4,5,6 opt DISCRETE,DISCRETE,DISCRETE _scale 0 mesh interpolator BARY discrete implementation HOCR regoption 5 potts 0 Initialising level 1 terminate called after throwing an instance of 'MESHREG::MeshReg_error' what(): ��Q Aborted

ecr05 commented 2 years ago

I would need to see your call to msm

marionpavaux commented 2 years ago

The call was this one :

./msm_ubuntu_v3 -v --refmesh=/home/marion/Documents/XXX/additional_subject_data/XXX/ses-64201/XXX_ses-64201_hemi-left_sphere.surf.gii -o /home/marion/Documents/XXX/MSM_tests/XXX-acurvature/XXX-acurvature --inmesh=/home/marion/Documents/XXX/additional_subject_data/XXX/ses-45100/XXX_ses-45100_hemi-left_sphere.surf.gii --conf=/home/marion/Documents/XXX/MSM_HOCR-master/config/NeuroImage2017_configs/aMSM_STR_longitudinal_alignment --indata=/home/marion/Documents/XXX/longit_subset_surf/XXX/ses-45100/XXX_ses-45100_hemi-left_curv.shape.gii --refdata=/home/marion/Documents/XXX/longit_subset_surf/XXX/ses-64201/XXX_ses-64201_hemi-left_curv.shape.gii

ecr05 commented 2 years ago

You are missing the anatomical surfaces which are required for aMSM see https://emmarobinson01.com/2020/04/05/advanced-features-of-msm-a-guide/