Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <stdlib.h>
- # include <stdio.h>
- # include <math.h>
- # include "mpi.h"
- int main ( int argc, char *argv[] );
- void heat_part ( int n, int p, int id, double x_min, double x_max );
- /******************************************************************************/
- int main ( int argc, char *argv[] )
- {
- double a = 0.0; // lewy brzeg przedzialu
- double b = 1.0; // prawy brzeg przedzialu
- int i;
- int id; // rank
- int n; // liczba punktow dla kazdego wezla
- int p; // size
- double x_max;
- double x_min;
- MPI_Init ( &argc, &argv );
- MPI_Comm comm;
- MPI_Status status;
- int nt;
- printf("Podaj liczbe watkow: \n");
- scanf("%d",&nt);
- MPI_Comm_spawn("heat", MPI_ARGV_NULL, nt,
- MPI_INFO_NULL, 0, MPI_COMM_SELF,
- &comm, MPI_ERRCODES_IGNORE);
- int size = 14;
- double tab[size];
- MPI_Finalize ( );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement