MPI_Init(&argc, &argv);
+ int rank;
+ MPI_Comm_rank(MPI_COMM_WORLD,&rank);
+
double *a = malloc(sizeof(double) * M);
double *b = malloc(sizeof(double) * N);
// Commenting out this barrier fixes it!!
MPI_Barrier(MPI_COMM_WORLD);
+ if(rank==0) {
+ printf("Walltime = %g\n",MPI_Wtime());
+ }
+
MPI_Finalize();
free(a);
free(b);
$ ../../smpi_script/bin/smpirun -np 16 -platform ${srcdir:=.}/small_platform.xml -hostfile ${srcdir:=.}/hostfile.txt ./bug-17132 --cfg=smpi/cpu_threshold:-1 --log=smpi_kernel.thres:warning
> You requested to use 16 processes, but there is only 2 processes in your hostfile...
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
-> (some sensible output)
+> Walltime = 0.00212779