Closed legordian closed 10 years ago
Commented by legordian on 2013-11-26 16:59 UTC This is fixed in [e26ce4]. However, this commit currently resides on a development branch ("unstableIsobarAmplitudes") which will not be merged into master for some time. Maybe a cherry-pick might be the right option?
Commented by bgrube on 2014-01-15 15:05 UTC Cherry-picked changes from [e26ce4] into master branch. The -match-native switch is disabled since [20a8f5]. Please confirm that [f5ff2e] fixes the issues.
Commented by sebastianuhl on 2014-01-15 15:25 UTC 1.) As far as I understand CMake (but I have only found this documented on the level of experience, not by the vendor) defining
set(CMAKE_CXX_FLAGS_DEBUG "... ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "... ${CMAKE_CXX_FLAGS}")
should not be necessary as the ${CMAKE_CXX_FLAGS} will be automatically appended.
2.) In the two pwa2000 directories I do not think the variable ${CMAKE_CXX_LDFLAGS} should be used, but ${CMAKE_CXX_FLAGS}.
Commented by bgrube on 2014-01-15 20:27 UTC Thanks for the info. Indeed cmake calls the compiler like
g++ ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} ...
[5eaf36] should fix 1) and 2). I also swapped the order in which values from command line are applied to what was proposed in original bug report, that is:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} <other flags>")
This way it is impossible to override the flags set in the CMakeLists.txt from the command line. Please confirm, that things work as expected. In particular it would be good to know, whether forcing 32bit compilation works now.
Commented by bgrube on 2014-01-16 18:28 UTC gcc 4.3 caused some extra headaches, but with [90924a] things should work now. Tests included 32bit compilation on 64bit SLC 5 machine at CERN. Please confirm.
Commented by sebastianuhl on 2014-01-16 18:58 UTC Compiles also for me.
One last question concerning the problem with gcc 4.3. Shouldn't it simply be possible to write
N += std::norm(_Vflat.amp())
std::norm should return a double, so this should also not affect the imaginary part.
Updated by sebastianuhl on 2014-01-16 18:59 UTC
Reported by sebastianuhl on 2013-11-05 01:07 UTC Currently there seem to be a number of (smaller) issues with the compiler options.
1.) It is not possible to add any compiler flags from the command line via environment variables or defines, in CMakeLists.txt line 99 should be replaced by
2.) The subdirectories pwa2000/gamp and pwa2000/libpp do not use the compiler flags used in the rest of the build. This is quite destructive if one for example has to compile a 32bit version on a system that by default builds 64bit. pwa2000/gamp/CMakeLists.txt and pwa2000/libpp/CMakeLists.txt should be changed in lines 38&39 (or probably it would be better to remove those lines):
3.) By default all optimizations available on the computer the software is compiled on are enabled (due to the compiler option march=native). This is bad if the software is compiled at a rather new computer, but also has to work on older hardware which do not have the same set of instructions available. ROOTPWA might then crash with