Cypress CSC-1200T Guía de usuario Pagina 107

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 124
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 106
Chapter 10. Miscellaneous notes 107
after = cpused();
utime = after - before;
printf("ct[10][10] is %.6f\n", ct[10][10]);
printf("CPU time in user space = %ld clock ticks\n",
utime);
exit(0);
}
See Section 6.3 on page 54 for more details on calling Fortran routines
(here SGEMM) from C.
Here is an example of compiling and executing this program:
t3e% cc matmul.c
t3e% timex mpprun -n 2 ./a.out
ct[10][10] is -345.015608
ct[10][10] is -345.015608
CPU time in user space = 371395739 clock ticks
CPU time in user space = 371379536 clock ticks
seconds "clocks"
real 3.979838 (1193951546)
user 2.063669 (619100700)
sys 0.254990 (76497000)
Here we executed the program identically on two processors.
10.2 Parallel performance prediction
Several different models can be used to measure the scalability of a
parallel program. Depending on your application and preferences, you
may want to use parallelism to decrease execution time, to run bigger
models or to optimize the speedup of parallel processing.
The so-called Amdahl’s law applies to a fixed model size when you are
using different numbers of processors. This model supposes that you
can split the program in two parts, sequential and parallel. The sequen-
tial part takes W
1
seconds in all cases. The parallel part takes W
p
/p
seconds, where the W
p
is the size of the parallel task and p is the num-
ber of parallel processors.
Speedup S
p
is defined as the ratio of the time on one processor divided
by the time on p processors:
S
p
=
W
1
+ W
p
W
1
+ W
p
/p
.
Vista de pagina 106
1 2 ... 102 103 104 105 106 107 108 109 110 111 112 ... 123 124

Comentarios a estos manuales

Sin comentarios