mersenneforum.org Help needed to test Athlon64 code
 Register FAQ Search Today's Posts Mark Forums Read

 2006-07-30, 00:10 #1 geoff     Mar 2003 New Zealand 13×89 Posts Help needed to test Athlon64 code I am trying to implement 64 bit modular multiplication for the Athlon 64 but I don't have access to one for testing. If someone with gcc, make, etc. installed and running a 64 bit OS could compile and run this test program for me it would be a great help: k8test.zip Just unzip and type make', it will run two test programs, one in 32 bit mode and one in 64 bit mode, and print the results to a file k8.txt'. Post that file or any errors here, or send me a PM. Thanks, Geoff.
2006-07-30, 02:57   #2
jasonp
Tribal Bullet

Oct 2004

2·3·19·31 Posts

Quote:
 Originally Posted by geoff Just unzip and type make', it will run two test programs, one in 32 bit mode and one in 64 bit mode, and print the results to a file k8.txt'. Post that file or any errors here, or send me a PM.
You may want to use a higher-resolution timer...

jasonp
Code:
uint64

#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
uint32 lo, hi;
asm("rdtsc":"=d"(hi),"=a"(lo));
return (uint64)hi << 32 | lo;

#elif defined(_MSC_VER)
LARGE_INTEGER ret;
QueryPerformanceCounter(&ret);

#else
struct timeval thistime;
gettimeofday(&thistime, NULL);
return thistime.tv_sec * 1000000 + thistime.tv_usec;
#endif
}

 2006-07-31, 15:55 #3 dsouza123     Sep 2002 2·331 Posts Bochs might be a solution. Bochs emulates an x86 CPU and some other PC chips and uses hard drive images. Among the CPUs emulated are a Pentium Pro and an Athlon 64. I have used both emulated CPUs with good success. Used it to run Win98 SE with an emulated Athlon 64 (for SSE2 support) on top of Win XP Pro with a real Athlon (early 32 bit model no SSE2 ). There are various Linux images available. http://bochs.sourceforge.net/
 2006-08-01, 02:30 #4 geoff     Mar 2003 New Zealand 100100001012 Posts Thanks for the help everyone. From the looks of it in 64 bit mode the generic C mulmod using the FPU is much faster than the assembler for both 32 and 64 bit arguments, but in 32 bit mode the assembler integer version is a little faster for 32 bit arguments and the assembler FPU version for 64 bit arguments.
 2006-08-17, 21:11 #5 c00ler   Jul 2003 52 Posts Something strange with latest prime95 x64 under windows 2003 x64 (athlon 64 3200+, 2gb ram). 1) Start torture test or prime testing, then (maybe even after some time) start playing video (wmplayer x32, divx player x32) Exactly when video starts i get illegal sumout, or bad rounding (0.4993896484 or even 0.5) 2) VirtualDub x64 playing/compressing video doesn't crash prime95 x64 Maybe the reason is http://www.intel.com/support/perform.../cs-020438.htm ? But why x32 and not x64 codecs cause errors is a mystery to me =) Last fiddled with by c00ler on 2006-08-17 at 21:13
 2006-08-18, 02:26 #6 dsouza123     Sep 2002 2·331 Posts If the SSE2 registers aren't saved/restored correctly so they become corrupted, does it also affect the FPU ? In local.ini add CpuSupportsSSE=0 CpuSupportsSSE2=0 then it would simulate an earlier Athlon using only the FPU. Without disabling SSE/SSE2 support, does it also affect Prime95 x86-32 run under Windows 2003 x64 ?
 2006-08-18, 05:40 #7 c00ler   Jul 2003 52 Posts Tried CpuSupportsSSE=0 CpuSupportsSSE2=0 These options don't affect corruption, also there is not even a 1% difference in benchmark in both 32 bit and x64. 32 bit prime95 is not affected by corruption, with and without SSE/SSE2. P.S. maybe i can recompile prime95 with intel c++ 9.1, but i need instructions =) Last fiddled with by c00ler on 2006-08-18 at 05:42
2006-08-18, 12:16   #8
Prime95
P90 years forever!

Aug 2002
Yeehaw, FL

72·149 Posts

Quote:
 Originally Posted by dsouza123 In local.ini add CpuSupportsSSE=0 CpuSupportsSSE2=0 then it would simulate an earlier Athlon using only the FPU.
Nice try, but this won't work on the 64-bit prime95 version. It assumes (and requires) SSE2 support.

 Similar Threads Thread Thread Starter Forum Replies Last Post science_man_88 Lounge 20 2018-08-23 23:06 jinydu Math 19 2005-02-07 02:52 phrater phil Hardware 6 2004-10-21 11:20 JuanTutors Software 1 2004-06-04 02:46 E_tron Hardware 7 2004-01-07 04:20

All times are UTC. The time now is 05:57.

Tue Jan 19 05:57:21 UTC 2021 up 47 days, 2:08, 0 users, load averages: 1.53, 1.36, 1.30