[gmx-users] Patch for AMD Athlon

TAPO (Thomas Agersten Poulsen) tapo at novozymes.com
Mon Mar 1 16:45:01 CET 2004


Dear list,

	As many users, I have been experiencing unstability on my AMD
Athlon MP Linux cluster. Jobs die randomly with errors like
Fatal error: ci = -2147483648 should be in 0 .. 999 [FILE nsgrid.c, LINE
218]

Based on postings by Eric, I edited src/gmxlib/detectcpu.c to make mdrun
use 3DNow in stead for SSE.
It has now been running perfectly for some time, and the speed penalty
is null compared to jobs crashing.
To help others, I post a diff of src/gmxlib/detectcpu.c against
gromacs-3.2.
One only needs to recompile mdrun_mpi (see ./configure --help to learn
how to configure for mpi) by 'make mdrun'.

Many thanks to Erik for his postings on how to do this. This posting is
just meant as a help to less-experienced users (like myself), who think
that editing the source-code is not everyday work.

Best regards
Thomas

313,319c313,316
< 
<   /* Reorganize to check for 3DNOW fist
<    */
<   cpuflags=detect_3dnow(log);
<   if(cpuflags & X86_3DNOW_SUPPORT) {
<     fprintf(log,"CPU and OS support extended 3DNow.\n"
< 	    "Using Gromacs 3DNow single precision assembly
innerloops.\n\n");
---
>   cpuflags=detect_sse(log);
>   if(cpuflags & X86_SSE_SUPPORT) {
>     fprintf(log,"CPU and OS support SSE.\n"
> 	    "Using Gromacs SSE single precision assembly
innerloops.\n\n");
322,325c319,327
<     cpuflags=detect_sse(log);
<     if(cpuflags & X86_SSE_SUPPORT) {
<       fprintf(log,"CPU and OS support SSE.\n"
< 	      "Using Gromacs SSE single precision assembly
innerloops.\n\n");
---
>     if(cpuflags & CPU_SSE_SUPPORT)
>       fprintf(log,"Your processor supports SSE, but not your OS.\n"
> 	      "Checking for Extended 3DNow support instead...\n");
>     else /* No sse support at all */
>       fprintf(log,"No SSE support in CPU. Trying Extended
3DNow...\n");
>     cpuflags=detect_3dnow(log);
>     if(cpuflags & X86_3DNOW_SUPPORT) {
>       fprintf(log,"CPU and OS support extended 3DNow.\n"
> 	      "Using Gromacs 3DNow single precision assembly 
> innerloops.\n\n");
327,328c329
<     } 
<     
---
>     }
330,331d330
<   /* End of edition */
< 



More information about the gromacs.org_gmx-users mailing list