ecr05 / MSM_HOCR

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

Installation issue #18

Closed bmdeen closed 3 years ago

bmdeen commented 3 years ago

Hi,

I'm running into difficulties trying to install msm on a Linux system (CentOS 7.9.2009, amd64, GCC 4.8.5, FSL 6.0.1). When I run the precompiled CentOS binaries, I get a "cannot execute binary file" error. When I try to compile the DiscreteOpt package using make, I get the below error:

c++ -Wall -ansi -pedantic -Wno-long-long     -g -DNDEBUG -std=c++11  -DHAS_HOCR  -DNDEBUG -m64  -g -O3 -fexpensive-optimizations -m64  -I/lab_files/opt/fsl-6.0.1/extras/include/boost -I/lab_files/opt/fsl-6.0.1/extras/include/armawrap/armawrap -DARMA_USE_LAPACK -DARMA_USE_BLAS -DARMA_64BIT_WORD -I/lab_files/opt/fsl-6.0.1/extras/include/newran -I/usr/include -I/lab_files/opt/fsl-6.0.1/extras/include/libcprob -I/lab_files/opt/fsl-6.0.1/extras/include/libprob -I/lab_files/opt/fsl-6.0.1/extras/include/boost -I/bdeen/scripts/MSM/include -I/bdeen/scripts/MSM/extras/include -I. -I/bdeen/scripts/MSM/include -I/lab_files/opt/fsl-6.0.1/include   -c -o DiscreteCostFunction.o DiscreteCostFunction.cpp
DiscreteCostFunction.cpp: In member function ‘virtual double DISCRETEOPT::NonLinearSRegDiscreteCostFunction::computeTripletCost(int, int, int, int)’:
DiscreteCostFunction.cpp:434:107: error: no matching function for call to ‘calculate_triangular_strain(NEWMESH::Triangle&, NEWMESH::Triangle&, float&, float&, boost::shared_ptr<armawrap::AWColVector<double> >, float&)’
     cost=calculate_triangular_strain(TRI_ORIG, TRI, _mu, _kappa, boost::shared_ptr<ColumnVector>(), _k_exp);
                                                                                                           ^
DiscreteCostFunction.cpp:434:107: note: candidates are:
In file included from /lab_files/opt/fsl-6.0.1/include/newmesh/featurespace.h:77:0,
                 from similarities.h:17,
                 from DiscreteCostFunction.h:9,
                 from DiscreteCostFunction.cpp:8:
/lab_files/opt/fsl-6.0.1/include/newmesh/meshfns.h:123:10: note: double NEWMESH::calculate_triangular_strain(const NEWMESH::Triangle&, const NEWMESH::Triangle&, const double&, const double&, const boost::shared_ptr<armawrap::AWColVector<double> >&)
   double calculate_triangular_strain(const Triangle &,const Triangle &,const double &,const double &, const boost::shared_ptr<ColumnVector> & indexSTRAINS=boost::shared_ptr<ColumnVector> ());
          ^
/lab_files/opt/fsl-6.0.1/include/newmesh/meshfns.h:123:10: note:   candidate expects 5 arguments, 6 provided
/lab_files/opt/fsl-6.0.1/include/newmesh/meshfns.h:125:10: note: double NEWMESH::calculate_triangular_strain(int, const NEWMESH::newmesh&, const NEWMESH::newmesh&, const double&, const double&, const boost::shared_ptr<armawrap::AWColVector<double> >&)
   double calculate_triangular_strain(int, const NEWMESH::newmesh &, const NEWMESH::newmesh &,const double &,const double &, const boost::shared_ptr<ColumnVector> & indexSTRAINS=boost::shared_ptr<ColumnVector> ());
          ^
/lab_files/opt/fsl-6.0.1/include/newmesh/meshfns.h:125:10: note:   no known conversion for argument 1 from ‘NEWMESH::Triangle’ to ‘int’
DiscreteCostFunction.cpp:497:111: error: no matching function for call to ‘calculate_triangular_strain(NEWMESH::Triangle&, NEWMESH::Triangle&, float&, float&, boost::shared_ptr<armawrap::AWColVector<double> >, float&)’
    cost+=calculate_triangular_strain(TRIorig, TRItrans, _mu, _kappa, boost::shared_ptr<ColumnVector>(), _k_exp);
                                                                                                               ^
DiscreteCostFunction.cpp:497:111: note: candidates are:
In file included from /lab_files/opt/fsl-6.0.1/include/newmesh/featurespace.h:77:0,
                 from similarities.h:17,
                 from DiscreteCostFunction.h:9,
                 from DiscreteCostFunction.cpp:8:
/lab_files/opt/fsl-6.0.1/include/newmesh/meshfns.h:123:10: note: double NEWMESH::calculate_triangular_strain(const NEWMESH::Triangle&, const NEWMESH::Triangle&, const double&, const double&, const boost::shared_ptr<armawrap::AWColVector<double> >&)
   double calculate_triangular_strain(const Triangle &,const Triangle &,const double &,const double &, const boost::shared_ptr<ColumnVector> & indexSTRAINS=boost::shared_ptr<ColumnVector> ());
          ^
/lab_files/opt/fsl-6.0.1/include/newmesh/meshfns.h:123:10: note:   candidate expects 5 arguments, 6 provided
/lab_files/opt/fsl-6.0.1/include/newmesh/meshfns.h:125:10: note: double NEWMESH::calculate_triangular_strain(int, const NEWMESH::newmesh&, const NEWMESH::newmesh&, const double&, const double&, const boost::shared_ptr<armawrap::AWColVector<double> >&)
   double calculate_triangular_strain(int, const NEWMESH::newmesh &, const NEWMESH::newmesh &,const double &,const double &, const boost::shared_ptr<ColumnVector> & indexSTRAINS=boost::shared_ptr<ColumnVector> ());
          ^
/lab_files/opt/fsl-6.0.1/include/newmesh/meshfns.h:125:10: note:   no known conversion for argument 1 from ‘NEWMESH::Triangle’ to ‘int’
DiscreteCostFunction.cpp:343:8: warning: unused variable ‘filename’ [-Wunused-variable]
   char filename[1000];
        ^
make: *** [DiscreteCostFunction.o] Error 1

Any idea what's going wrong, either with the binary file or the compilation? Thanks!

ecr05 commented 3 years ago

Hi, did you compile all the subfolders? You'll also need to recompile the FastPD folder in the FSL folder. Have you reviewed the step by step guidance in https://github.com/ecr05/MSM_HOCR/blob/master/compilation%20instructions?

Thanks

Emma

bmdeen commented 3 years ago

Hi Emma,

I'm following those instructions. The first folder I tried to compile was DiscreteOpt, and I get the errors above during that step. Thanks,

Ben

ecr05 commented 3 years ago

Well the obvious but unhelpful answer is that the version of newmesh from your fsl6 is incompatible but I don't immediately know why since the fsl 6 version I have seems to have it. Can you post to the FSL list so I can discuss with them?

bmdeen commented 3 years ago

Problem solved - I needed to use version 6.0.2 or greater of FSL, and copy the binaries to $FSLDIR/bin before using. Thanks for your help!