When testing the PLASMA-2.0.0 package for the first time (Linux + GCC-4.4.1),
I just updated the variables in the make.inc file.
Examples works fine without optimization (with 2 cores because my machine
is a INTEL Dual Core 2), but there is a problem when the library is compiled with
optimization (-On, whatever the value of n, greater than 1): all programs
never terminate ! Actually, they enter an infinite loop, and a debugger showed
that it is inside the 'core_lapack/dlamch.f' file.
These files contain some routines which are used to detect the floating-point
characteristics of the machine, and it is well known that they must be compiled
WITHOUT optimization.
For example, in the legacy LAPACK-3.2.1, the 'make.inc' configuration file
makes the difference between OPTS and NOOPT variable, and in the INSTALL
directory, the files 'dlamch.f' and 'slamch.f' are compiled using the NOOPT
variable.
So, a work around for this bug (in the build process) is to define another
variable in the make.inc file:
FNOOPTS = <whatever except optimization flag> <-O0 is also possible>
and to add the following lines:
# WARNING: 'slamch.f' and 'dlamch.f' must be compiled WITHOUT optimisation
slamch.o : slamch.f
$(FC) $(FNOOPTS) -c $< -o $@
dlamch.o : dlamch.f
$(FC) $(FNOOPTS) -c $< -o $@
at the end of 'plasma_2.0.0/core_lapack/Makefile'
Hope it will be useful.
Regards,
Edouard
