int success = 1;
#define MAXLEN 10000
- int root, i, j, k;
+ int root = 0, i, j, k;
int out[MAXLEN];
int in[MAXLEN];
MPI_Barrier(MPI_COMM_WORLD);
if(myself==0) printf("TEST COMPLETE\n");
MPI_Finalize();
+ return EXIT_SUCCESS;
}
int i;
int *sb;
int *rb;
- int status, gstatus;
+ int status;
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
if (rank == 0) {
- if (gstatus != 0) {
- printf("all_to_all returned %d\n",gstatus);fflush(stdout);
+ if (status != 0) {
+ printf("all_to_all returned %d\n",status);fflush(stdout);
}
}
free(sb);
*/
-void print_buffer_int(void *buf, int len, char *msg, int rank)
+static void print_buffer_int(void *buf, int len, char *msg, int rank)
{
int tmp, *v;
printf("**<%d> %s (#%d): ", rank, msg,len);
{
int size, rank;
- int N, I;
+ int N;
struct timeval *start_time, *stop_time;
double seconds;
- int i, j, k;
+ int i, j;
char *buffer;
int check;
#include <stdio.h>
#include <stdlib.h>
+#include <ctype.h>
#include <mpi.h>
#define ITERATIONS 10
#include <stdio.h>
#include <mpi.h>
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
const int tag1 = 42, tag2= 43; /* Message tag */
int rank;
* ENHANCEMENTS, OR MODIFICATIONS.
* ***************************************************************************
**/
-int ibm_test(int rank, int size)
+static int ibm_test(int rank, int size)
{
int success = 1;
#define MAXLEN 10000
*/
#include <stdio.h>
-#include "mpi.h"
+#include <unistd.h>
+#include <mpi.h>
int main(int argc, char *argv[])
{
#include <stdio.h>
#include <mpi.h>
-int ibm_test(int rank, int size) {
+static int ibm_test(int rank, int size) {
#define MAXLEN 10000
/**
* small test: the root sends a single distinct double to other processes
**/
-int small_test( int rank, int size ) {
+static int small_test( int rank, int size ) {
int success=1;
int retval;
int sendcount=1; // one double to each process
/* your hostfile, do 'mpirun -machinefile hostfile -np 4 first */
#include <stdio.h>
+#include <unistd.h>
#include <mpi.h>
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
const int tag = 42; /* Message tag */
int id, ntasks, source_id, dest_id, err, i;
#include "mpi.h"
#include <stdio.h>
-int test(int myid, int numprocs) {
+static int test(int myid, int numprocs) {
// The tags should match on the sender and receiver side.
// The distinction between sendtag and recvtag is mainly
// useful to make some other Recv or Send calls match the sendrecv.
int left, right;
int buffer[BUFLEN], buffer2[BUFLEN];
int i;
- MPI_Request request;
MPI_Status status;
for (i=0;i<BUFLEN;i++) {
int main(int argc, char *argv[])
{
- int worldrank, localrank;
- MPI_Comm localcomm;
+ int worldrank;
+// int localrank;
+// MPI_Comm localcomm;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &worldrank);
printf("MPI_Comm_split is not implemented\n");