mersenneforum.org Mlucas problems on Linux Alpha
 Register FAQ Search Today's Posts Mark Forums Read

 2006-01-15, 16:57 #1 shackan   Jan 2006 5 Posts Mlucas problems on Linux Alpha Hi, this is my first post here. I was trying to run the Mlucas software on a dual Alpha machine running linux pd@shell bin $uname -a Linux shell 2.4.31 #10 SMP Thu Jul 21 14:49:25 CEST 2005 alpha EV67 GNU/Linux the first thing I did was downloading the precompiled alpha binary from Ernst Mayer's site: http://www.hogranch.com/mayer/README.html. Here's where the problems begin: pd@shell bin$ ls -al Mlucas_alfa -rwxr-xr-x 1 pd users 1462864 Jan 15 14:10 Mlucas_alfa pd@shell bin $Mlucas_alfa -bash: /home/pd/bin/Mlucas_alfa: cannot execute binary file even if the file appears to be a regular linux executable pd@shell bin$ file Mlucas_alfa Mlucas_alfa: COFF format alpha executable paged not stripped - version 3.13-14 so I tried to compile from source instead, and the following errors arose (I'm using the latest sources from the aforementioned site) pd@shell Mlucas_src $gcc -O3 *.c -o Mlucas -lm radix24_ditN_cy_dif1.c:1376:3: warning: no newline at end of file /tmp/ccIeycj4.o(.text+0x1898): In function qfmul': : undefined reference to __UMULH' /tmp/ccIeycj4.o(.text+0x18b8): In function qfmul': : undefined reference to __UMULH' collect2: ld returned 1 exit status ps: I don't have the compaq C compiler on this machine. hopefully somebody here knows what I'm missing (and why the binary refuses to run). regards, Paul 2006-01-15, 18:25 #2 xilman Bamboozled! "𒉺𒌌𒇷𒆷𒀭" May 2003 Down not across 1165410 Posts Quote:  Originally Posted by shackan Hi, this is my first post here. I was trying to run the Mlucas software on a dual Alpha machine running linux pd@shell bin$ uname -a Linux shell 2.4.31 #10 SMP Thu Jul 21 14:49:25 CEST 2005 alpha EV67 GNU/Linux the first thing I did was downloading the precompiled alpha binary from Ernst Mayer's site: http://www.hogranch.com/mayer/README.html. Here's where the problems begin: pd@shell bin $ls -al Mlucas_alfa -rwxr-xr-x 1 pd users 1462864 Jan 15 14:10 Mlucas_alfa pd@shell bin$ Mlucas_alfa -bash: /home/pd/bin/Mlucas_alfa: cannot execute binary file even if the file appears to be a regular linux executable pd@shell bin $file Mlucas_alfa Mlucas_alfa: COFF format alpha executable paged not stripped - version 3.13-14 so I tried to compile from source instead, and the following errors arose (I'm using the latest sources from the aforementioned site) pd@shell Mlucas_src$ gcc -O3 *.c -o Mlucas -lm radix24_ditN_cy_dif1.c:1376:3: warning: no newline at end of file /tmp/ccIeycj4.o(.text+0x1898): In function qfmul': : undefined reference to __UMULH' /tmp/ccIeycj4.o(.text+0x18b8): In function qfmul': : undefined reference to __UMULH' collect2: ld returned 1 exit status ps: I don't have the compaq C compiler on this machine. hopefully somebody here knows what I'm missing (and why the binary refuses to run). regards, Paul
Is . in your $PATH ? What happens if you type "./Mlucas_alfa" Paul 2006-01-15, 18:54 #3 shackan Jan 2006 5 Posts Quote:  Is . in your$PATH ?
yes

Quote:
 What happens if you type "./Mlucas_alfa"

pd@shell pd $cd bin pd@shell bin$ ./Mlucas_alfa
-bash: ./Mlucas_alfa: cannot execute binary file

 2006-01-15, 19:30 #4 gribozavr     Mar 2005 Internet; Ukraine, Kiev 11×37 Posts Maybe, administrator has mounted /home with noexec? But on x86 I get "permission denied" in that case... maybe alpha is different?
 2006-01-15, 20:25 #5 akruppa     "Nancy" Aug 2002 Alexandria 2,467 Posts >Mlucas_alfa: COFF format alpha executable paged not stripped - version 3.13-14 Does Alpha linux use the COFF format for executables? I thought it'd use ELF... but maybe Tru64 uses COFF. Try the file command on a known good executable, i.e. /bin/ls. If that is ELF, you probably have to compile yourself. Alex Last fiddled with by akruppa on 2006-01-16 at 07:51
 2006-01-15, 20:54 #6 shackan   Jan 2006 5 Posts yes, probably the file format is at fault, but I can't compile it either (read first post).
 2006-01-15, 23:58 #7 shackan   Jan 2006 5 Posts I did it, it took me a minute to spot an (apparent) mistake in the code, the lines: #elif(defined(__GNUC__)) #define UMULH(x, y) \ (lines 166-167 of qfloat.c), had to be replaced by #elif(defined(__GNUC__)) #define __UMULH(x, y) \ I'm going to contact the author to see if the problem lies in my build enviroment or in Mlucas. happy number crunching to everybody!
2006-01-16, 22:29   #8
ewmayer
2ω=0

Sep 2002
República de California

5×2,351 Posts

Quote:
 Originally Posted by shackan I did it, it took me a minute to spot an (apparent) mistake in the code, the lines: #elif(defined(__GNUC__)) #define UMULH(x, y) \ (lines 166-167 of qfloat.c), had to be replaced by #elif(defined(__GNUC__)) #define __UMULH(x, y) \ I'm going to contact the author to see if the problem lies in my build enviroment or in Mlucas.
Indeed, it's a bug in the source - I didn't do a gcc build on Alpha/Linux prior to the last source release, since I've never found gcc to do a decent job at generating optimized code. I've made sure the above bug is not present in the code that will go into the Mlucas 3.0 release.

As for your situation, did the code build and run through self-tests (Mlucas -s m) successfully once you patched the above problem? If so, could you post the resulting mlucas.cfg file (just the FFT-length/timing lines at bottom) and your basic system specs? You can compare those data to the ones I give for Alpha on the README page to gauge how much performance gcc may be leaving on the table, as it were.

Lastly, if you have any way of getting a 30-day trial license for the DEC/Compaq/HP C compiler I would recommend that, since you're likely to get a much better-performing binary from it.

People more versed in the issue of exe-file formats will have to address that - the prebuilt binaries I posted for Alpha seem to run on most of the major linux distribs, but there are some (BSD, and yours - which distrib are you running, BTW? Your uname -a output doesn't tell me anything about the precise flavor of Linux) that apparently expect a different binary file format.

2006-01-17, 19:07   #9
shackan

Jan 2006

5 Posts

self tests worked fine, here are the timings

Quote:
and comparing with your results, the gcc's binary seems TWICE as slow?! Heck I knew gcc wasn't the best at optimizing (caveat: maybe some compiler switch could have helped a bit, I just used a plain '-O3'), but this is really bad, especially considering the hardware setup seems similar..

Code:
pd@shell mlucas \$ cat /proc/cpuinfo
cpu                     : Alpha
cpu model               : EV67
cpu variation           : 7
cpu revision            : 0
cpu serial number       :
system type             : Tsunami
system variation        : Catamaran
system revision         : 0
system serial number    : AY12214322
cycle frequency [Hz]    : 666666666
timer frequency [Hz]    : 1024.00
page size [bytes]       : 8192
max. addr. space #      : 255
BogoMIPS                : 1204.44
kernel unaligned acc    : 0 (pc=0,va=0)
user unaligned acc      : 6 (pc=12001b358,va=11fffbef4)
platform string         : COMPAQ AlphaServer DS20E 666 MHz
cpus detected           : 2
cpus active             : 2
cpu active mask         : 0000000000000003
Maybe your version is using _both_ cpus (and therefore the twofold speed improvement) ? But since Mlucas is not a multithreaded application (afaik), I highly doubt this is the case...

As for the last question this machine runs Gentoo (well, not the best choice if you ask me...) and apparently it refuses to run every executable but ELF-format files. Since it's unlikely for me to get a copy of ccc, what about shipping the binary as an ELF file along with the COFF executable for TruUnix ?

thanks again,
regards

Last fiddled with by shackan on 2006-01-17 at 19:08

 Similar Threads Thread Thread Starter Forum Replies Last Post Uncwilly Lounge 66 2012-10-24 17:36 Prime95 Linux 6 2010-12-20 19:39 TimSorbet Lounge 25 2009-05-23 11:03 defendmyname Linux 2 2008-12-16 12:03 MartinHvidberg Mlucas 9 2003-07-21 18:58

All times are UTC. The time now is 10:38.

Tue Jan 31 10:38:14 UTC 2023 up 166 days, 8:06, 0 users, load averages: 0.46, 0.88, 0.97