PLASMA  2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
timing.c File Reference
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <cblas.h>
#include <lapacke.h>
#include <plasma.h>
#include <core_blas.h>
#include "flops.h"
#include "timing.h"
#include "auxiliary.h"
Include dependency graph for timing.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

real_Double_t cWtime (void)
int main (int argc, char *argv[])

Variables

int ISEED [4] = {0,0,0,1}

Function Documentation

real_Double_t cWtime ( void  )

Definition at line 102 of file timing.c.

{
struct timeval tp;
gettimeofday( &tp, NULL );
return tp.tv_sec + 1e-6 * tp.tv_usec;
}
int main ( int  argc,
char *  argv[] 
)

Definition at line 342 of file timing.c.

References IPARAM_ASYNC, IPARAM_AUTOTUNING, IPARAM_CHECK, IPARAM_DAG, IPARAM_IB, IPARAM_INPUTFMT, IPARAM_K, IPARAM_LDA, IPARAM_LDB, IPARAM_LDC, IPARAM_M, IPARAM_MB, IPARAM_MX, IPARAM_N, IPARAM_NB, IPARAM_NITER, IPARAM_NX, IPARAM_OUTPUTFMT, IPARAM_RHBLK, IPARAM_SCHEDULER, IPARAM_SIZEOF, IPARAM_THRDNBR, IPARAM_THRDNBR_SUBGRP, IPARAM_TRACE, IPARAM_VERBOSE, IPARAM_WARMUP, max, PLASMA_AUTOTUNING, PLASMA_Disable(), PLASMA_DYNAMIC_SCHEDULING, PLASMA_Finalize(), PLASMA_FLAT_HOUSEHOLDER, PLASMA_HOUSEHOLDER_MODE, PLASMA_HOUSEHOLDER_SIZE, PLASMA_Init(), PLASMA_INNER_BLOCK_SIZE, PLASMA_SCHEDULING_MODE, PLASMA_Set(), PLASMA_STATIC_SCHEDULING, PLASMA_TILE_SIZE, and PLASMA_TREE_HOUSEHOLDER.

{
int i, m, mx, nx;
int start = 500;
int stop = 5000;
int step = 500;
int iparam[IPARAM_SIZEOF];
iparam[IPARAM_THRDNBR ] = 1;
iparam[IPARAM_THRDNBR_SUBGRP] = 1;
iparam[IPARAM_SCHEDULER ] = 0;
iparam[IPARAM_M ] = -1;
iparam[IPARAM_N ] = 500;
iparam[IPARAM_K ] = 1;
iparam[IPARAM_LDA ] = 500;
iparam[IPARAM_LDB ] = 500;
iparam[IPARAM_LDC ] = 500;
iparam[IPARAM_MB ] = 128;
iparam[IPARAM_NB ] = 128;
iparam[IPARAM_IB ] = 32;
iparam[IPARAM_NITER ] = 1;
iparam[IPARAM_WARMUP ] = 1;
iparam[IPARAM_CHECK ] = 0;
iparam[IPARAM_VERBOSE ] = 0;
iparam[IPARAM_AUTOTUNING ] = 0;
iparam[IPARAM_INPUTFMT ] = 0;
iparam[IPARAM_OUTPUTFMT ] = 0;
iparam[IPARAM_TRACE ] = 0;
iparam[IPARAM_DAG ] = 0;
iparam[IPARAM_ASYNC ] = 1;
iparam[IPARAM_MX ] = -1;
iparam[IPARAM_NX ] = -1;
iparam[IPARAM_RHBLK ] = 0;
iparam[IPARAM_MX ] = -1;
iparam[IPARAM_NX ] = -1;
iparam[IPARAM_RHBLK ] = 0;
get_thread_count( &(iparam[IPARAM_THRDNBR]) );
for (i = 1; i < argc && argv[i]; ++i) {
if (startswith( argv[i], "--help" )) {
show_help( argv[0] );
return EXIT_SUCCESS;
} else if (startswith( argv[i], "--n_range=" )) {
get_range( strchr( argv[i], '=' ) + 1, &start, &stop, &step );
} else if (startswith( argv[i], "--threads=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_THRDNBR]) );
/* } else if (startswith( argv[i], "--gnuplot-png" )) { */
/* gnuplot = 2; */
/* } else if (startswith( argv[i], "--gnuplot" )) { */
/* gnuplot = 1; */
} else if (startswith( argv[i], "--check" )) {
iparam[IPARAM_CHECK] = 1;
} else if (startswith( argv[i], "--nocheck" )) {
iparam[IPARAM_CHECK] = 0;
} else if (startswith( argv[i], "--warmup" )) {
iparam[IPARAM_WARMUP] = 1;
} else if (startswith( argv[i], "--nowarmup" )) {
iparam[IPARAM_WARMUP] = 0;
} else if (startswith( argv[i], "--dyn" )) {
iparam[IPARAM_SCHEDULER] = 1;
} else if (startswith( argv[i], "--nodyn" )) {
iparam[IPARAM_SCHEDULER] = 0;
} else if (startswith( argv[i], "--atun" )) {
iparam[IPARAM_AUTOTUNING] = 1;
} else if (startswith( argv[i], "--noatun" )) {
iparam[IPARAM_AUTOTUNING] = 0;
} else if (startswith( argv[i], "--trace" )) {
iparam[IPARAM_TRACE] = 1;
} else if (startswith( argv[i], "--notrace" )) {
iparam[IPARAM_TRACE] = 0;
} else if (startswith( argv[i], "--dag" )) {
iparam[IPARAM_DAG] = 1;
} else if (startswith( argv[i], "--nodag" )) {
iparam[IPARAM_DAG] = 0;
} else if (startswith( argv[i], "--sync" )) {
iparam[IPARAM_ASYNC] = 0;
} else if (startswith( argv[i], "--async" )) {
iparam[IPARAM_ASYNC] = 1;
} else if (startswith( argv[i], "--m=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_M]) );
} else if (startswith( argv[i], "--nb=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_NB]) );
iparam[IPARAM_MB] = iparam[IPARAM_NB];
} else if (startswith( argv[i], "--nrhs=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_K]) );
} else if (startswith( argv[i], "--ib=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_IB]) );
} else if (startswith( argv[i], "--ifmt=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_INPUTFMT]) );
} else if (startswith( argv[i], "--ofmt=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_OUTPUTFMT]) );
} else if (startswith( argv[i], "--thrdbypb=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_THRDNBR_SUBGRP]) );
} else if (startswith( argv[i], "--niter=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &iparam[IPARAM_NITER] );
} else if (startswith( argv[i], "--mx=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_MX]) );
} else if (startswith( argv[i], "--nx=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_NX]) );
} else if (startswith( argv[i], "--rhblk=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_RHBLK]) );
} else if (startswith( argv[i], "--mx=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_MX]) );
} else if (startswith( argv[i], "--nx=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_NX]) );
} else if (startswith( argv[i], "--rhblk=" )) {
sscanf( strchr( argv[i], '=' ) + 1, "%d", &(iparam[IPARAM_RHBLK]) );
} else {
fprintf( stderr, "Unknown option: %s\n", argv[i] );
}
}
m = iparam[IPARAM_M];
mx = iparam[IPARAM_MX];
nx = iparam[IPARAM_NX];
/* Initialize Plasma */
if ( iparam[IPARAM_SCHEDULER] )
else
/* if ( !iparam[IPARAM_AUTOTUNING] ) { */
/* } else { */
/* PLASMA_Get(PLASMA_TILE_SIZE, &iparam[IPARAM_NB] ); */
/* PLASMA_Get(PLASMA_INNER_BLOCK_SIZE, &iparam[IPARAM_IB] ); */
/* } */
/* Householder mode */
if (iparam[IPARAM_RHBLK] < 1) {
} else {
}
if (step < 1) step = 1;
Test( -1, iparam ); /* print header */
for (i = start; i <= stop; i += step)
{
if ( nx > 0 ) {
iparam[IPARAM_M] = i;
iparam[IPARAM_N] = max(1, i/nx);
} else if ( mx > 0 ) {
iparam[IPARAM_M] = max(1, i/mx);
iparam[IPARAM_N] = i;
} else {
if ( m == -1 )
iparam[IPARAM_M] = i;
iparam[IPARAM_N] = i;
}
Test( iparam[IPARAM_N], iparam );
}
/* if (gnuplot) { */
/* printf( "%s\n%s\n", */
/* "e", */
/* gnuplot > 1 ? "" : "pause 10" ); */
/* } */
return EXIT_SUCCESS;
}

Here is the call graph for this function:


Variable Documentation

int ISEED[4] = {0,0,0,1}

Definition at line 97 of file timing.c.