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
On Nov 2, 2010, at 10:54 AM, Matthias Troyer wrote:
Hi Jessica,
This should actually work. If you turn ALPS_ENABLE_OPENMP on it should automatically add -fopenmp to the compilation flags.
Matthias
On Nov 2, 2010, at 10:47 AM, jessica.alfonsi@unipd.it wrote:
Hi again Matthias, this mail is about a different issue, maybe with the Cmake Build system, which I have found both with GCC, Intel and Visual Age compilers when compiling ALPS 2 (any beta) with OpenMP support turned on. I should expect in the include.mk file to find the related compiler flag for multithreading (-fopenmp with GCC, etc) as it happened with ALPS 1.3.5, but it doesn't appear anywhere and I have to add it by hand when I have to compile my codes using OpenMP. Since ALPS 1.3.5 worked right, I think that should be fixed in ALPS 2.
Best regards,
Jessica