online c compiler with mpi
#include
int main()
{
int p,i,j,n,c=0;
float d[20],b[20],a[20][20],e[20][20],output;
printf("\n Enter the DIMENSION of the MATRIX A : ");
scanf("%d",&n);
printf("\n|----- NOTE : Enter the elements of matrix ROW-WISE* -----|\n");
printf("\nEnter elements of MATRIX A :\n");
for(p=0;p=0;p--)
{
output = 0.0;
for(i=p+1;i
online c compiler with mpi
#include
#include
#include
int main(int argc, char* argv[])
{
{
printf("Hello World... from thread = %d\n",
omp_get_thread_num());
}
}
online c compiler with mpi
#include
int main()
{
int p,i,j,n,c=0;
float d[20],b[20],a[20][20],e[20][20],output;
printf("\n Enter the DIMENSION of the MATRIX A : ");
scanf("%d",&n);
printf("\n|----- NOTE : Enter the elements of matrix ROW-WISE* -----|\n");
printf("\nEnter elements of MATRIX A :\n");
for(p=0;p=0;p--)
{
output = 0.0;
for(i=p+1;i
online c compiler with mpi
#include
#include
using namespace std;
int main( int argc, char ** argv)
{
int rank, size;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
char message[255];
char nadawanie[255];
if(rank==0)
{
cin>>nadawanie;
MPI_Send(&nadawanie, 255, MPI_CHAR, 1, 0, MPI_COMM_WORLD);
}
else if(rank == 1)
{
MPI_Recv(&message, 255, MPI_CHAR, MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD_ MPI_STATUS_IGNORE);
cout << message << endl;
}
}
online c compiler with mpi
#include
int main()
{
int p,i,j,n,c=0;
float d[20],b[20],a[20][20],e[20][20],output;
printf("\n Enter the DIMENSION of the MATRIX A : ");
scanf("%d",&n);
printf("\n|----- NOTE : Enter the elements of matrix ROW-WISE* -----|\n");
printf("\nEnter elements of MATRIX A :\n");
for(p=0;p=0;p--)
{
output = 0.0;
for(i=p+1;i
|