X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7a8cd62135619ad52e05ae1c929ef07e166e4260..301989b17111d6a39df60385a4c2e73fcff8cd86:/examples/smpi/MM/MM_mpi.c diff --git a/examples/smpi/MM/MM_mpi.c b/examples/smpi/MM/MM_mpi.c index d112cdea18..ecaab74e8d 100644 --- a/examples/smpi/MM/MM_mpi.c +++ b/examples/smpi/MM/MM_mpi.c @@ -1,12 +1,18 @@ +/* Copyright (c) 2012, 2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + /* * Block Matrix Multiplication example * */ - #include "Matrix_init.h" #include "2.5D_MM.h" #include "xbt/log.h" +#include /*int sched_setaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *mask); int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *mask); @@ -75,44 +81,44 @@ int main(int argc, char ** argv) case 'h': XBT_INFO( "Usage: mxm_cblas_test [options]\n" - " -M I M size (default: %zu)\n" - " -N I N size (default: %zu)\n" - " -K I K size (default: %zu)\n" - " -B I Block size on the k dimension(default: %zu)\n" - " -G I Number of processor groups(default: %zu)\n" - " -g I group index(default: %zu)\n" - " -k I group rank(default: %zu)\n" - " -r I processor row size (default: %zu)\n" - " -c I processor col size (default: %zu)\n" - " -h help\n", + " -M I M size (default: %zu)\n" + " -N I N size (default: %zu)\n" + " -K I K size (default: %zu)\n" + " -B I Block size on the k dimension (default: %zu)\n" + " -G I Number of processor groups (default: %zu)\n" + " -g I group index (default: %zu)\n" + " -k I group rank (default: %zu)\n" + " -r I processor row size (default: %zu)\n" + " -c I processor col size (default: %zu)\n" + " -h help\n", m, n, k, Block_size, NB_groups, group, key, row, col); return 0; case 'M': - m = atoi(optarg); + m = xbt_str_parse_int(optarg, "Invalid M size: %s"); break; case 'N': - n = atoi(optarg); + n = xbt_str_parse_int(optarg, "Invalid N size: %s"); break; case 'K': - k = atoi(optarg); + k = xbt_str_parse_int(optarg, "Invalid K size: %s"); break; case 'B': - Block_size = atoi(optarg); + Block_size = xbt_str_parse_int(optarg, "Invalid block size: %s"); break; case 'G': - NB_groups = atoi(optarg); + NB_groups = xbt_str_parse_int(optarg, "Invalid number of processor groups: %s"); break; case 'g': - group = atoi(optarg); + group = xbt_str_parse_int(optarg, "Invalid group index: %s"); break; case 'k': - key = atoi(optarg); + key = xbt_str_parse_int(optarg, "Invalid group rank: %s"); break; case 'r': - size_row = atoi(optarg); + size_row = xbt_str_parse_int(optarg, "Invalid processor row size: %s"); break; case 'c': - size_col = atoi(optarg); + size_col = xbt_str_parse_int(optarg, "Invalid processor col size: %s"); break; /*case 'P': str_mask = strdup(optarg);