From: luke@navo.hpc.mil (Luke Lonergan)
Subject: Re: MFlops Comparison using g77 (bad news)
Date: 1997/09/22 [thread overview]
Message-ID: <604dqh$caf@bgtnsc03.worldnet.att.net> (raw)
In-Reply-To: slrn6252ph.66e.jlnance@volt.ece.ncsu.edu
On 19 Sep 1997 14:23:35 GMT, jlnance@volt.ece.ncsu.edu (James Lewis
Nance) wrote:
>GNU C compiler, C kernel:
> 5 235064.4
> Time to calculate solution: 0.55 seconds.
>MFlops/Second = 111.24
The DEC Fortran number (>160 MFlops) was outstanding! The GNU C
compiler result presented here is also dramatically better than what I
get under Linux (RedHat 4.2 for Alpha). Can you tell me what version
of GNU C you are using and what options you gave to the compiler?
BTW, here is a better version of the C code:
void jacobi_(float *psi_new,float *psi,float *f,
float *a1, float *a2, float *a3, float *a4, float *a5,
int *nx,int *ny,int *nx_max,int *ny_max) {
int i,j;
int indij,indip1j,indim1j,indijp1,indijm1;
float *p_ij_psi_new,*p_ij_psi,*p_ij_f;
float *p_ip1j_psi,*p_im1j_psi;
float *p_ijp1_psi,*p_ijm1_psi;
/* Critical performance benefit here! The value of nx is used in the
memory offset calculations and needs to be local to avoid
frequent
reloading and stalls. */
int nx_r=(*nx);
/* Copy the floating point values of constants into local memory for
the same reason as above. */
float aa1=(*a1),aa2=(*a2),aa3=(*a3),aa4=(*a4),aa5=(*a5);
i = 1; j = 1;
indij = i+(nx_r)*(j);
indim1j = indij-1;
indip1j = indij+1;
indijm1 = indij-(nx_r);
indijp1 = indij+(nx_r);
/* Create the starting locations of the pointers */
p_ij_psi_new = psi_new + indij;
p_ij_f = f + indij;
p_ij_psi = psi + indij;
p_im1j_psi = psi + indim1j;
p_ip1j_psi = psi + indip1j;
p_ijm1_psi = psi + indijm1;
p_ijp1_psi = psi + indijp1;
for (j=1;j<(*ny)-1;j++) {
for (i=1;i<(nx_r)-1;i++) {
*p_ij_psi_new++ = aa1*(*p_ip1j_psi++)+aa2*(*p_im1j_psi++)+
aa3*(*p_ijp1_psi++)+aa4*(*p_ijm1_psi++)+
aa5*(*p_ij_f++);
}
/* Fixup for the two skipped I locations */
p_ij_psi_new+=2;
p_ip1j_psi+=2;
p_im1j_psi+=2;
p_ijp1_psi+=2;
p_ijm1_psi+=2;
p_ij_f+=2;
}
}
next prev parent reply other threads:[~1997-09-22 4:00 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-16 4:00 MFlops Comparison using g77 (bad news) Luke Lonergan
1997-09-16 4:00 ` Craig Burley
1997-09-16 4:00 ` H.W. Stockman
1997-09-16 4:00 ` Greg Lindahl
1997-09-16 4:00 ` Ulrich Ruede
1997-09-16 4:00 ` Toon Moene
1997-09-16 4:00 ` MFlops Comparison using g77 (bad news) - bench.tgz (1/1) Luke Lonergan
1997-09-16 4:00 ` MFlops Comparison using g77 (bad news) - bench.tgz (0/1) Luke Lonergan
1997-09-18 4:00 ` H.W. Stockman
1997-09-18 4:00 ` Thomas Leitner
1997-09-18 4:00 ` Andrew G. Morgan
1997-09-16 4:00 ` MFlops Comparison using g77 (bad news) Greg Lindahl
1997-09-16 4:00 ` Luke Lonergan
1997-09-17 4:00 ` Linus Torvalds
1997-09-17 4:00 ` Luke Lonergan
1997-09-17 4:00 ` MFlops Comparison using g77 (bad news) - dpkernel.tgz (0/1) Luke Lonergan
1997-09-17 4:00 ` MFlops Comparison using g77 (bad news) - dpkernel.tgz (0/1) " Luke Lonergan
1997-09-17 4:00 ` MFlops Comparison using g77 (bad news) - dpkernel.tgz (0/1) - dpkernel.tgz (1/1) Luke Lonergan
1997-09-17 4:00 ` MFlops Comparison using g77 (bad news) " Luke Lonergan
1997-09-17 4:00 ` MFlops Comparison using g77 (bad news) Greg Lindahl
1997-09-17 4:00 ` Rowan D. Hughes
1997-09-17 4:00 ` Xiaoguang Zhang
1997-09-19 4:00 ` James Lewis Nance
1997-09-22 4:00 ` Luke Lonergan [this message]
1997-09-18 4:00 ` Greg Lindahl
1997-09-19 4:00 ` Burkhard Neidecker-Lutz
1997-09-20 4:00 ` Toon Moene
1997-09-22 4:00 ` Luke Lonergan
-- strict thread matches above, loose matches on Subject: below --
1997-09-17 4:00 Robert Harley
1997-09-22 4:00 ` Luke Lonergan
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox