1
1

orte mpi tests: fix a bunch of compiler warnings

Этот коммит содержится в:
Jeff Squyres 2015-02-11 12:26:17 -05:00
родитель 07179ef669
Коммит c9e3f22933
9 изменённых файлов: 17 добавлений и 7 удалений

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

@ -8,6 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "mpi.h"
int main(int argc, char* argv[])

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

@ -1,10 +1,11 @@
#include <stdio.h>
#include <stdlib.h>
#include "mpi.h"
main(int argc, char **argv) {
int main(int argc, char **argv) {
int debugme = 1;
MPI_Init(&argc, argv);
MPI_Init(&argc, &argv);
printf("init...\n");
fflush(0);
MPI_Finalize();

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

@ -69,7 +69,7 @@ main(int argc, char* argv[])
printf(" number of PE's in x direction: %3d\n",npx);
printf(" number of PE's in y direction: %3d\n",npy);
printf(" number of PE's in z direction: %3d\n",npz);
printf(" global grid size: %dx%dx%d 4 byte integers (total %lld)\n",X,Y,Z,(unsigned long)X*Y*Z);
printf(" global grid size: %dx%dx%d 4 byte integers (total %lu)\n",X,Y,Z,(unsigned long)X*Y*Z);
printf(" local grid size: %dx%dx%d 4 byte integers (total %d)\n",nx,ny,nz,ng);
}
else
@ -85,7 +85,7 @@ main(int argc, char* argv[])
}
if ( MPI_Get_processor_name(process_name, &count) != MPI_SUCCESS)
{
sprintf(process_name, rr_empty);
sprintf(process_name, "%s", rr_empty);
}
else
{

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

@ -69,7 +69,7 @@ main(int argc, char* argv[])
printf(" number of PE's in x direction: %3d\n",npx);
printf(" number of PE's in y direction: %3d\n",npy);
printf(" number of PE's in z direction: %3d\n",npz);
printf(" global grid size: %dx%dx%d 4 byte integers (total %lld)\n",X,Y,Z,(unsigned long)X*Y*Z);
printf(" global grid size: %dx%dx%d 4 byte integers (total %lu)\n",X,Y,Z,(unsigned long)X*Y*Z);
printf(" local grid size: %dx%dx%d 4 byte integers (total %d)\n",nx,ny,nz,ng);
}
else
@ -85,7 +85,7 @@ main(int argc, char* argv[])
}
if ( MPI_Get_processor_name(process_name, &count) != MPI_SUCCESS)
{
sprintf(process_name, rr_empty);
sprintf(process_name, "%s", rr_empty);
}
else
{

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

@ -7,6 +7,7 @@
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include "mpi.h"
int main(int argc, char* argv[])

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

@ -6,6 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <mpi.h>

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

@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <unistd.h>
#include <mpi.h>
int main(int argc, char ** argv){

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

@ -2,6 +2,7 @@
*
* Copyright (c) 2008 Los Alamos National Security, LLC. All rights reserved.
*
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -15,6 +16,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <mpi.h>

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

@ -2,6 +2,7 @@
*
* Copyright (c) 2008 Los Alamos National Security, LLC. All rights reserved.
*
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -15,6 +16,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <mpi.h>
@ -38,7 +40,8 @@ int main(int argc, char* argv[])
gettimeofday(&tv, NULL);
/* form the command */
asprintf(&cmd, "mpirun -npernode %d ./ziaprobe %d %d", nppn, tv.tv_sec, tv.tv_usec);
asprintf(&cmd, "mpirun -npernode %d ./ziaprobe %ld %d",
nppn, (long) tv.tv_sec, tv.tv_usec);
/* execute it */
system(cmd);