Hi again Matthias, I've tried your suggestion below in CMakeLists.txt, compilation is successful (as always) but in the file include.mk there is no openmp flag appearing in the compiler flags. It's strange since in the configuration process with ccmake the build system correctly recognizes the openmp flag appropriate for the compiler. This is my include.mk : # shell # path prefix = /home/alfonsi/alps-2.0.0b5-r5017 exec_prefix = /home/alfonsi/alps-2.0.0b5-r5017 bindir = /home/alfonsi/alps-2.0.0b5-r5017/bin datadir = /home/alfonsi/alps-2.0.0b5-r5017 datarootdir = /home/alfonsi/alps-2.0.0b5-r5017/share libdir = /home/alfonsi/alps-2.0.0b5-r5017/lib includedir = /home/alfonsi/alps-2.0.0b5-r5017/include docdir = /home/alfonsi/alps-2.0.0b5-r5017/doc # Makefiles INCLUDE_MK = $(datadir)/alps/include.mk # tools AR = /usr/bin/ar RANLIB = /usr/bin/ranlib # base BASE_CPPFLAGS = BASE_LDFLAGS = BASE_LIBS = # for Boost BOOST_CPPFLAGS = -I/home/alfonsi/src/alps-2.0.0b5-r5017-src-with-boost/boost BOOST_LDFLAGS = BOOST_LIBS = /usr/lib/libboost_system.so BOOST_SRCDIR = /home/alfonsi/src/alps-2.0.0b5-r5017-src-with-boost/boost # for MPI MPI_CPPFLAGS = MPI_LDFLAGS = MPI_LIBS = # for LAPACK LAPACK_CPPFLAGS = LAPACK_LDFLAGS = LAPACK_LIBS = /usr/lib/liblapack.so /usr/lib/libblas.so /usr/lib/libpthread.so # for HDF5 library HDF5_CPPFLAGS = -I/usr/include HDF5_LDFLAGS = HDF5_LIBS = /usr/lib/libhdf5_hl.so /usr/lib/libhdf5.so # for Python library PYTHON_CPPFLAGS = PYTHON_LDFLAGS = PYTHON_LIBS = /usr/lib/python2.6/config/libpython2.6.so # for XML parser XML_CPPFLAGS = XML_LDFLAGS = XML_LIBS = # C/C++ compiler CC = /opt/intel/Compiler/11.1/073/bin/ia32/icc CFLAGS = -O3 -DNDEBUG CXX = /opt/intel/Compiler/11.1/073/bin/ia32/icpc CXXFLAGS = -O3 -DNDEBUG CPPFLAGS = $(BASE_CPPFLAGS) $(XML_CPPFLAGS) $(LAPACK_CPPFLAGS) $(HDF5_CPPFLAGS) $(PYTHON_CPPFLAGS) $(BOOST_CPPFLAGS) $(MPI_CPPFLAGS) -I$(includedir) LDFLAGS = $(BASE_LDFLAGS) $(BOOST_LDFLAGS) -L$(libdir) $(PYTHON_LDFLAGS) $(HDF5_LDFLAGS) $(LAPACK_LDFLAGS) $(XML_LDFLAGS) $(MPI_LDFLAGS) LIBS = -lalps $(BOOST_LIBS) $(PYTHON_LIBS) $(HDF5_LIBS) $(LAPACK_LIBS) $(XML_LIBS) $(MPI_LIBS) $(BASE_LIBS) On Mar, 2 Novembre 2010 10:58 am, Matthias Troyer wrote:
In case it does not work in the link step, please try to change the top level CMakeLists.txt file in the following way:
add
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_CXX_FLAGS}")
just after the line saying
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
and then please try if it links correctly.
Matthias