Martin Albrecht wrote:
> On Wednesday 14 October 2009, Dr. David Kirkby wrote:
>> libm4ri has two issues that I am aware of as soon as one tries to use a
>> non-GNU or non-86 environment.
>>
>>
>> I believe the developers hang out here, so I'll put a bit of information
>> here, on the hope they see it.
>>
>> 1) Despite the fact Sun's C compiler can compile thousands of lines of
>> Sage without any problem, libm4ri's configure script says the compiler
>> can't create executables:
>>
>> http://sagetrac.org/sage_trac/ticket/7037
>>
>> This is clearly is a bug that needs fixing. Plenty of other configure
>> scripts have checked the compiler and decides it works.
> 
> I am the maintainer of this package and I am interested in fixing this. 
> However, since I think the configure.in is quite standard I am not sure how.


I'll take a look. libm4ri is to my knowledge the only program which 
thinks the Sun compiler is broken.

>> 2) On HP-UX, the configure script can't work out how many CPUs I have,
>> what sort they are, but then tries to determine the cache size. This
>> causes the configure script to break.
>>
>> The macro for determining the number of CPUs
>>
>> http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m
>> 4/ax_count_cpus.m4
>>
>> is clearly only designed to work on linux and Mac. So it will fail on
>> other platforms, including Solaris which is supported, and HP-UX which
>> is not.
> 
> It should fail gracefully, doesn't it?


The configure script does fail gracefully on HP-UX when it tries to 
determine the number of CPUs.

checking the number of available CPUs... unable to detect (assuming 1)
checking the number of available CPUs... unable to detect (assuming 1)

It should not take too much effort to actually get a number, so it does 
not have to assume 1.

There is a question about what do you want - is it physical processors, 
cores or hardware threads? I'm not really sure the best way to do this. 
On the Sun T5240 (t2.math), there are two physical processors, 16 cores 
and 128 threads. So what number do we want - 2, 16 or 128?  I suspect 
cores is the most useful one, to have, but I'm not sure how to get that 
information.


>> The macro for determining cache sizes will only work on x86 CPUs.
> 
> It should fail gracefully?

I agree it should fail gracefully, but it does not on HP-UX 11.11, as it 
appears to be multiplying 'unknown' by 1024. This machine does have 1 CPU.

checking the number of available CPUs... unable to detect (assuming 1)
checking the number of available CPUs... unable to detect (assuming 1)
checking for x86 cpuid 0x0 output... unknown
checking for the processor vendor... Unknown
checking the L1 cache size... ./configure[12992]: unknown*1024: The 
specified number is not valid for this command.
Make: No arguments or description file.  Stop.
Error building libm4ri

real    0m18.971s
user    0m10.570s
sys     0m5.790s
sage: An error occurred while installing libm4ri-20090617

On a dual processor machine running Solaris 10, the data is not gathered 
properly, but at least it does not exit.

checking the number of available CPUs... unable to detect (assuming 1)
checking the number of available CPUs... unable to detect (assuming 1)
checking for x86 cpuid 0x0 output... unknown
checking for the processor vendor... Unknown
checking the L1 cache size... 0 Bytes
checking the L2 cache size... 0 Bytes

Why it should fail on HP-UX but not on Solaris I do not know. But the 
failure on HP-UX has highlighted the fact the code only works on x86, so 
we can address that.

>> I don't mind having a go at refining the macro for computing the number
>> of CPUs, so it at least work on Solaris, AIX and HP-UX.
> 
> Great, that would be very much appreciated!

Leave that bit with me.

I've just asked on relevant newsgroups on how to get the data on AIX and 
HP-UX. Solaris I know anyway. Once I get that, I'll do it.

I would add there is some pretty negative comments about that macro for 
determining the number of CPUs in the autoconf macro archive. Clearly it 
is badly written. I think the way to approach it will be me re-write it, 
then get some of the experts there to go over it.

Dave

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to