Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 2d32f27b authored by BOUCHERIE Raphael's avatar BOUCHERIE Raphael
Browse files

adding getopt for timing

parent 6a21f331
No related branches found
No related tags found
1 merge request!53Timing/options
...@@ -952,6 +952,14 @@ if( CHAMELEON_SCHED_QUARK ) ...@@ -952,6 +952,14 @@ if( CHAMELEON_SCHED_QUARK )
endif() endif()
# getopt
unset(CMAKE_REQUIRED_FLAGS)
unset(CMAKE_REQUIRED_DEFINITIONS)
unset(CMAKE_REQUIRED_INCLUDES)
unset(CMAKE_REQUIRED_LIBRARIES)
check_include_files(getopt.h CHAMELEON_HAVE_GETOPT_H)
check_function_exists(getopt_long CHAMELEON_HAVE_GETOPT_LONG)
# Add option to exploit cublas API v2 # Add option to exploit cublas API v2
# ----------------------------------- # -----------------------------------
cmake_dependent_option(CHAMELEON_USE_CUBLAS_V2 cmake_dependent_option(CHAMELEON_USE_CUBLAS_V2
...@@ -1084,7 +1092,7 @@ endif() ...@@ -1084,7 +1092,7 @@ endif()
# Config files (pkg_config) # # Config files (pkg_config) #
############################# #############################
# Create .pc file # Create .pc file
# --------------- # ---------------
generate_pkgconfig_file() generate_pkgconfig_file()
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
......
...@@ -48,4 +48,8 @@ ...@@ -48,4 +48,8 @@
/* Tracing support */ /* Tracing support */
#cmakedefine CHAMELEON_ENABLE_TRACING #cmakedefine CHAMELEON_ENABLE_TRACING
/* getopt */
#cmakedefine CHAMELEON_HAVE_GETOPT_H
#cmakedefine CHAMELEON_HAVE_GETOPT_LONG
#endif /* CHAMELEON_CONFIG_H_HAS_BEEN_INCLUDED */ #endif /* CHAMELEON_CONFIG_H_HAS_BEEN_INCLUDED */
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
* *
* @version 0.9.0 * @version 0.9.0
* @author Mathieu Faverge * @author Mathieu Faverge
* @author Raphael Boucherie
* @author Dulceneia Becker * @author Dulceneia Becker
* @author Cedric Castagnede * @author Cedric Castagnede
* @date 2010-11-15 * @date 2010-11-15
...@@ -62,9 +63,9 @@ ...@@ -62,9 +63,9 @@
#endif /* defined(CHAMELEON_SCHED_STARPU) */ #endif /* defined(CHAMELEON_SCHED_STARPU) */
#if defined(HAVE_GETOPT_H) #if defined(CHAMELEON_HAVE_GETOPT_H)
#include <getopt.h> #include <getopt.h>
#endif /* defined(HAVE_GETOPT_H) */ #endif /* defined(CHAMELEON_HAVE_GETOPT_H) */
static int RunTest(int *iparam, _PREC *dparam, double *t_); static int RunTest(int *iparam, _PREC *dparam, double *t_);
static inline void* morse_getaddr_null(const MORSE_desc_t *A, int m, int n) static inline void* morse_getaddr_null(const MORSE_desc_t *A, int m, int n)
...@@ -361,20 +362,21 @@ show_help(char *prog_name) { ...@@ -361,20 +362,21 @@ show_help(char *prog_name) {
"\n" "\n"
" -t x\n" " -t x\n"
" --threads x Number of CPU workers (default: _SC_NPROCESSORS_ONLN)\n" " --threads x Number of CPU workers (default: _SC_NPROCESSORS_ONLN)\n"
" -g x\n"
" --gpus X Number of GPU workers (default: 0)\n" " --gpus X Number of GPU workers (default: 0)\n"
"\n" "\n"
" --sync Enable synchronous calls in wrapper function such as POTRI\n" " -s --sync Enable synchronous calls in wrapper function such as POTRI\n"
" --nobigmat Allocating one big mat or plenty of small (default: bigmat)\n" " -b --nobigmat Allocating one big mat or plenty of small (default: bigmat)\n"
" --check Check result\n" " -c --check Check result\n"
" --progress Display progress indicator\n" " -P --progress Display progress indicator\n"
" --gemm3m Use gemm3m complex method\n" " -G --gemm3m Use gemm3m complex method\n"
" --inv Check on inverse\n" " -i --inv Check on inverse\n"
" --nowarmup Perform a warmup run to pre-load libraries (default: warmup)\n" " -w --nowarmup Perform a warmup run to pre-load libraries (default: warmup)\n"
" --trace Enable trace generation\n" " -T --trace Enable trace generation\n"
" --dag Enable DAG generation\n" " -d --dag Enable DAG generation\n"
" Generates a dot_dag_file.dot.\n" " Generates a dot_dag_file.dot.\n"
" --profile Print profiling informations (default: noprofile)\n" " --profile Print profiling informations (default: noprofile)\n"
" --nocpu All GPU kernels are exclusively executed on GPUs (default: 0)\n" " -C --nocpu All GPU kernels are exclusively executed on GPUs (default: 0)\n"
/* " --inplace Enable layout conversion inplace for lapack interface timers (default: enable)\n" */ /* " --inplace Enable layout conversion inplace for lapack interface timers (default: enable)\n" */
/* " --outplace Enable layout conversion out of place for lapack interface timers (default: disable)\n" */ /* " --outplace Enable layout conversion out of place for lapack interface timers (default: disable)\n" */
/* " --[no]atun Activate autotuning (default: noatun)\n" */ /* " --[no]atun Activate autotuning (default: noatun)\n" */
...@@ -451,7 +453,7 @@ print_header(char *prog_name, int * iparam) { ...@@ -451,7 +453,7 @@ print_header(char *prog_name, int * iparam) {
} }
#define GETOPT_STRING "cbiwTGPds045WC123th:g:M:n:k:I:N:x:X:r:p:m:6:" #define GETOPT_STRING "cbiwTGPds045WC123th:g:M:n:k:I:N:x:X:r:p:m:6:"
#if defined(HAVE_GETOPT_LONG) #if defined(CHAMELEON_HAVE_GETOPT_LONG)
static struct option long_options[] = static struct option long_options[] =
{ {
{"check", no_argument, 0, 'c'}, {"check", no_argument, 0, 'c'},
...@@ -486,7 +488,7 @@ static struct option long_options[] = ...@@ -486,7 +488,7 @@ static struct option long_options[] =
{"nb", required_argument, 0, '6'}, {"nb", required_argument, 0, '6'},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
#endif /* defined(HAVE_GETOPT_LONG) */ #endif /* defined(CHAMELEON_HAVE_GETOPT_LONG) */
static void static void
set_iparam_default(int *iparam){ set_iparam_default(int *iparam){
...@@ -529,13 +531,13 @@ parse_arguments(int *_argc, char ***_argv, int *iparam, int *start, int *stop, i ...@@ -529,13 +531,13 @@ parse_arguments(int *_argc, char ***_argv, int *iparam, int *start, int *stop, i
char **argv = *_argv; char **argv = *_argv;
do { do {
#if defined(HAVE_GETOPT_LONG) #if defined(CHAMELEON_HAVE_GETOPT_LONG)
c = getopt_long(argc, argv, GETOPT_STRING, c = getopt_long(argc, argv, GETOPT_STRING,
long_options, &opt); long_options, &opt);
#else #else
c = getopt(argc, argv, GETOPT_STRING); c = getopt(argc, argv, GETOPT_STRING);
(void) opt; (void) opt;
#endif /* defined(HAVE_GETOPT_LONG) */ #endif /* defined(CHAMELEON_HAVE_GETOPT_LONG) */
switch(c) switch(c)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment