Dear Dr. Troyer,I see, thanks. But it still doesn't answer my question that why the code cannot be compiled even with cmake.I've tested the hello-world code from https://alps.comp-phys.org/svn/alps1/trunk/alps/tutorials/alpsize-01-cmake/, and the code can be successfully compiled by running cmake, changing "vecLib" to "Accelerate" as I explained in my previous email (some suggests that Yosemite is to be blamed for this; one can even replace -framework Accelerate simply by -llapack and it seems working), and finally running make. The same CMakeLists.txt file, however, cannot compile the hybridization code, and the error message was given in my previous email. Note that I do not link manually!Sincerely,Leo (Fang Yao-Lung)Duke Physics2015-06-17 23:02 GMT-04:00 Matthias Troyer <troyer@phys.ethz.ch>:When linking manually, as you seem to do, -L just gives the directory in which it should look for libraries, but does not specify the libraries that should be linked.Hello Dr. Troyer,Thank you very much for your reply. Forgive my stupidity, but aren't the paths to MPI headers and the MPI libraries already specified by the -I and -L flags? How come the MPI library is not linked?I have examined the possibility that my compile command wasn't complete enough. Therefore, I tried following the instruction on the ALPS website (http://alps.comp-phys.org/mediawiki/index.php/Tutorials:Using_ALPS_in_your_projects) to create a CMakeLists.txt file in which it pointed to hybmain.cpp. I put all source code and the txt file in the path ~/just_a_folder/, set $ALPS_HOME to /opt/alps, and ran cmake ~/just_a_folder/. It created a bunch of files in the same folder which I have not fully figured out what they represent yet, but I noticed there was a Makefile, so I further ran make. This time the error message was different:Scanning dependencies of target hyb_test[ 50%] Building CXX object CMakeFiles/hyb_test.dir/hybmain.cpp.o[100%] Linking CXX executable hyb_testld: framework not found vecLibclang: error: linker command failed with exit code 1 (use -v to see invocation)make[2]: *** [hyb_test] Error 1make[1]: *** [CMakeFiles/hyb_test.dir/all] Error 2make: *** [all] Error 2where the executable was named hyb_test. By looking at the file /opt/alps/share/alps/include.mk, I noticed that the flag vecLib represents lapack.Google told me the vecLib framework is in /System/Library/Frameworks/vecLib.framework/, and I checked that it does exist. However, Google also told me that vecLib has been deprecated (see the Apple documentation here) and one should instead use the Accelerate framework. Therefore, having no way to get around, I decided to manually modify the file ~/just_a_folder/CMakeFiles/hyb_test.dir/link.txt and to use -framework Accelerate. Now I encounter the same problem with much fewer functions missing (for example, Alps, Boost and MPI are found):[ 50%] Linking CXX executable hyb_testUndefined symbols for architecture x86_64:"evaluate_2p(alps::mcresults const&, alps::params const&, alps::hdf5::archive&)", referenced from:master_final_tasks(alps::mcresults const&, alps::params const&, std::string const&) in hybmain.cpp.o"evaluate_nnt(alps::mcresults const&, alps::params const&, alps::hdf5::archive&)", referenced from:master_final_tasks(alps::mcresults const&, alps::params const&, std::string const&) in hybmain.cpp.o"evaluate_nnw(alps::mcresults const&, alps::params const&, alps::hdf5::archive&)", referenced from:master_final_tasks(alps::mcresults const&, alps::params const&, std::string const&) in hybmain.cpp.o"evaluate_freq(alps::mcresults const&, alps::params const&, alps::hdf5::archive&)", referenced from:master_final_tasks(alps::mcresults const&, alps::params const&, std::string const&) in hybmain.cpp.o"evaluate_time(alps::mcresults const&, alps::params const&, alps::hdf5::archive&)", referenced from:master_final_tasks(alps::mcresults const&, alps::params const&, std::string const&) in hybmain.cpp.o"evaluate_basics(alps::mcresults const&, alps::params const&, alps::hdf5::archive&)", referenced from:master_final_tasks(alps::mcresults const&, alps::params const&, std::string const&) in hybmain.cpp.o"evaluate_legendre(alps::mcresults const&, alps::params const&, alps::hdf5::archive&)", referenced from:master_final_tasks(alps::mcresults const&, alps::params const&, std::string const&) in hybmain.cpp.o"evaluate_sector_statistics(alps::mcresults const&, alps::params const&, alps::hdf5::archive&)", referenced from:master_final_tasks(alps::mcresults const&, alps::params const&, std::string const&) in hybmain.cpp.o"hybridization::update()", referenced from:vtable for alps::mcmpiadapter<hybridization, alps::check_schedule> in hybmain.cpp.o"hybridization::measure()", referenced from:vtable for alps::mcmpiadapter<hybridization, alps::check_schedule> in hybmain.cpp.o"hybridization::hybridization(alps::params const&, int)", referenced from:alps::mcmpiadapter<hybridization, alps::check_schedule>::mcmpiadapter(alps::params const&, boost::mpi::communicator const&, alps::check_schedule const&) in hybmain.cpp.o"hybridization::fraction_completed() const", referenced from:alps::mcmpiadapter<hybridization, alps::check_schedule>::run(boost::function<bool ()> const&) in hybmain.cpp.o"typeinfo for hybridization", referenced from:typeinfo for alps::mcmpiadapter<hybridization, alps::check_schedule> in hybmain.cpp.o"vtable for hybridization", referenced from:hybridization::~hybridization() in hybmain.cpp.oNOTE: a missing vtable usually means the first non-inline virtual member function has no definition.ld: symbol(s) not found for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see invocation)make[2]: *** [hyb_test] Error 1make[1]: *** [CMakeFiles/hyb_test.dir/all] Error 2make: *** [all] Error 2These functions were already missing when I compiled with the simple command g++ -I/opt/alps/include -L/opt/alps/lib hybmain.cpp. Now with the aid of cmake it seems less likely that a library is not linked. What can I do now?Thanks.Sincerely,Leo (Fang Yao-Lung)Duke Physics2015-06-17 21:26 GMT-04:00 Matthias Troyer <troyer@phys.ethz.ch>:Hi Leo,The error messages indicate that you did not link against the MPI libraries.MatthiasOn 17 Jun 2015, at 17:45, Leo Fang <leofang@phy.duke.edu> wrote:Hello all,FYI, same error message can also be seen by compiling in the command line with g++ -I/opt/alps/include -L/opt/alps/lib hybmain.cpp. Moreover, with g++ --version the information of my compiler is given below:Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)Target: x86_64-apple-darwin14.3.0Thread model: posixAny suggestion? Thanks.Sincerely,Leo (Fang Yao-Lung)Duke Physics2015-06-17 17:40 GMT-04:00 Leo Fang <leofang@phy.duke.edu>:Hello all,It's me again...I have the binary packages of alps 2.2.0b3, vistrails 2.1.2 and alps-vistrails-2.2.0b3 installed on Mac OS X 10.10.3, and I've tested them.Now I imported the source code of the "hybridization" application to Xcode as a stand-alone project and took care of the paths of included header files. However, when compiling almost finished, Xcode returned a bunch of "Apple Mach-O Linker Error", saying, for example,Undefined symbols for architecture x86_64:"_MPI_Abort", referenced from:MPI::Comm::Abort(int) in hybevaluate.oMPI::Comm::Abort(int) in hybretintfun.oMPI::Comm::Abort(int) in hybint.oMPI::Comm::Abort(int) in hybmatrix_ft.oMPI::Comm::Abort(int) in hybupdates.oMPI::Comm::Abort(int) in hybmain.oMPI::Comm::Abort(int) in hybfun.oand a lot of similar errors have to do with the MPI functions and other ALPS functions such as hdf5, ngs, etc. It seems the compiler can correctly find where the dylib files are, and so I am not sure what else can be wrong...I hope this question is less dumber than my previous one...Thanks.Sincerely,Leo (Fang Yao-Lung)Duke Physics