1
1

-- To work more on debugging, e.g, mca_ptl_elan_putget_desc_construct ()

This commit was SVN r2444.
Этот коммит содержится в:
Weikuan Yu 2004-09-02 06:25:52 +00:00
родитель 15d6462bb1
Коммит b70e1b05d0
6 изменённых файлов: 40 добавлений и 32 удалений

Просмотреть файл

@ -267,6 +267,11 @@ mca_ptl_elan_isend (struct mca_ptl_base_module_t *ptl,
}
}
#if OMPI_PTL_ELAN_ZERO_FFRAG
if (size > (OMPI_PTL_ELAN_MAX_QSIZE - sizeof(mca_ptl_base_header_t)))
size = 0;
#endif
((struct mca_ptl_elan_send_request_t *)sendreq)->req_frag = desc;
rc = mca_ptl_elan_start_desc(desc,
(struct mca_ptl_elan_peer_t *)ptl_peer,

Просмотреть файл

@ -101,8 +101,7 @@ mca_ptl_elan_component_open (void)
mca_ptl_elan_module.super.ptl_exclusivity =
mca_ptl_elan_param_register_int ("exclusivity", 0);
/*length = OMPI_PTL_ELAN_MAX_QSIZE - sizeof(mca_ptl_base_header_t);*/
length = 128 - sizeof(mca_ptl_base_header_t);
length = OMPI_PTL_ELAN_MAX_QSIZE - sizeof(mca_ptl_base_header_t);
param1 = mca_ptl_elan_param_register_int ("first_frag_size", length);
param2 = mca_ptl_elan_param_register_int ("min_frag_size", length);
param3 = mca_ptl_elan_param_register_int ("max_frag_size", (1<<31));

Просмотреть файл

@ -100,9 +100,10 @@ do { \
/* XXX: Potentially configurable parameters */
#define OMPI_PTL_ELAN_NUM_QDESCS (16)
#define OMPI_PTL_ELAN_NUM_PUTGET (8)
#define OMPI_PTL_ELAN_ZERO_FFRAG (0)
#define OMPI_PTL_ELAN_ENABLE_GET (1)
#define OMPI_PTL_ELAN_COMP_QUEUE (0)
#define OMPI_PTL_ELAN_ENABLE_GET (0)
#define OMPI_PTL_ELAN_COMP_QUEUE (1)
#define OMPI_PTL_ELAN_THREADING \
(OMPI_PTL_ELAN_COMP_QUEUE && OMPI_HAVE_POSIX_THREADS)

Просмотреть файл

@ -12,7 +12,7 @@ AM_CPPFLAGS = -I$(top_ompi_builddir)/src/include \
LDFLAGS += -L$(prefix)/lib -L../src/.libs
EXECS = qsnet_init qsnet_qdma qsnet_rdma mpitest lat
EXECS = qsnet_init qsnet_qdma qsnet_rdma mpitest lat check
units: $(EXECS)

Просмотреть файл

@ -9,7 +9,7 @@
#define MYBUFSIZE (4*1024*1024)
#define CHECK 1
#define PONG 1
#define PONG 0
char s_buf[MYBUFSIZE];
char r_buf[MYBUFSIZE];

Просмотреть файл

@ -16,23 +16,22 @@ int skip = 40;
int
main (int argc, char *argv[])
{
MPI_Status stat;
int myid, numprocs, i, j;
double startwtime = 0.0, endwtime;
int namelen;
int size;
MPI_Status stat;
int min, max, size;
int loop = 1;
int sleep = 1;
struct timeval t_start, t_end;
if (argc < 2) {
fprintf (stderr, "Usage: %s msg_size\n", argv[0]);
if (argc < 4) {
fprintf (stderr, "Usage: %s min max loop_size\n", argv[0]);
return 0;
} else {
size = atoi (argv[1]);
if (argc > 2)
loop = atoi (argv[2]);
min = atoi (argv[1]);
max = atoi (argv[2]);
loop = atoi (argv[3]);
}
/* Get some environmental variables set for Open MPI, OOB */
@ -42,25 +41,29 @@ main (int argc, char *argv[])
MPI_Comm_size (MPI_COMM_WORLD, &numprocs);
MPI_Comm_rank (MPI_COMM_WORLD, &myid);
for (i = 0; i < loop + skip; i++) {
if (i == skip)
gettimeofday (&t_start, 0);
if (myid == 0) {
MPI_Send (s_buf, size, MPI_CHAR, 1, i, MPI_COMM_WORLD);
MPI_Recv (r_buf, size, MPI_CHAR, 1, i, MPI_COMM_WORLD, &stat);
} else {
MPI_Recv (r_buf, size, MPI_CHAR, 0, i, MPI_COMM_WORLD, &stat);
MPI_Send (s_buf, size, MPI_CHAR, 0, i, MPI_COMM_WORLD);
}
}
gettimeofday (&t_end, 0);
if (myid == 0)
fprintf(stdout, "%10s %10s \n", "# length", "latency(us)");
if (myid == 0) {
double latency;
latency = ((1.0e6 * t_end.tv_sec + t_end.tv_usec)
- (1.0e6 * t_start.tv_sec + t_start.tv_usec)) / (2.0 * loop);
fprintf(stdout, "length %d latency %8f\n",
size, latency);
for (size = min; size <= max; size = (size == 0) ? 1 : 2*size) {
for (i = 0; i < loop + skip; i++) {
if (i == skip)
gettimeofday (&t_start, 0);
if (myid == 0) {
MPI_Send (s_buf, size, MPI_CHAR, 1, i, MPI_COMM_WORLD);
MPI_Recv (r_buf, size, MPI_CHAR, 1, i, MPI_COMM_WORLD, &stat);
} else {
MPI_Recv (r_buf, size, MPI_CHAR, 0, i, MPI_COMM_WORLD, &stat);
MPI_Send (s_buf, size, MPI_CHAR, 0, i, MPI_COMM_WORLD);
}
}
gettimeofday (&t_end, 0);
if (myid == 0) {
double latency;
latency = ((1.0e6 * t_end.tv_sec + t_end.tv_usec)
- (1.0e6 * t_start.tv_sec + t_start.tv_usec))
/ (2.0 * loop);
fprintf(stdout, " %8d %10.2f \n", size, latency);
}
fflush(stdout);
}