Summary: | sci-chemistry/gromacs-4.5.1 fails to emerge because SSE2 instruction set is not enabled | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Juergen Rose <rose> |
Component: | Current packages | Assignee: | Gentoo Chemistry-Related Packages <sci-chemistry> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | junghans |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | /var/tmp/portage/sci-chemistry/gromacs-4.5.1/temp/build.log |
Description
Juergen Rose
2010-10-05 16:26:35 UTC
My CPU doesn not understand SSE2: -rw-r----- 1 nobody nobody 91059 2010-10-05 18:26 /home_moose/rose/build.log root@cheetah:/usr/src/linux(41)# cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 6 model name : AMD Athlon(tm) XP 1800+ stepping : 2 cpu MHz : 1534.123 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow bogomips : 3068.24 clflush size : 32 cache_alignment : 32 address sizes : 34 bits physical, 32 bits virtual power management: ts Created attachment 249651 [details]
/var/tmp/portage/sci-chemistry/gromacs-4.5.1/temp/build.log
This is some kind of CFLAGS problem within the ebuild or the Makefile I suspect. The configure *is* detecting the machine type and instruction set properly, e.g. checking whether i686-pc-linux-gnu-gcc accepts -msse2... yes It is also detecting that gcc accepts -O3. But *neither* of these appears to be making it into the CFLAGS for compiling "nb_kernel400_ia32_sse.c", "nb_kernel410_ia32_sse.c" or any other machine specific files. Looking back at the gromacs-4.0.7 log, these compile lines had my CFLAGS "-O2 -march=prescott" (presumably prescott picks up sse2) -- those flags are not present in the 4.5.1 build. So either the ebuild is removing the user CFLAGS or the configure/Makefile are suppressing them. It looks like at least part of the problem with building gromacs is the fact that the transition from Gromacs 3 to Gromacs 4 appears to have lost ebuild support for the USE="sse sse2" options in the ebuilds! (I have a package.use file from 2008 which *has* those options set but the current ebuilds do not use them). It would also appear that using CFLAGS (in make.conf) of "-march=Prescott" does not implicitly set sse/sse2. Interestingly, using "-march=amdfam10" (on a Phenom II X3 CPU) either sets sse/sse2 or the gromacs code does not use those instructions on amd64 CPUs. One solution, a poor one, is of the form: CFLAGS="-msse -msse2 -O2" emerge gromacs IMO, the ebuilds should be repaired to the pre-v4 state which incorporated the sse/sse2 flags and the USE flag documentation should be updated to reflect this. There may also be a bug in gcc with respect to whether the -march= flags do or do not enable all of the features of the CPUs with said architecture. Does the problem still persist in gromacs-4.5.3? Actually, it is a bug in gromacs's configure.ac. CFLAGS were overwrite with ones from the environment after adding -msse. I fixed it in gromacs-4.5.3-r2 (sci overlay). As gromacs is in the process of switching to cmake, it will not be fixed upstream. I will wait until gromacs-4.5.4 before adding it into the tree. |