scalapack+C+mpi beginner

Open discussion regarding features, bugs, issues, vendors, etc.

scalapack+C+mpi beginner

Postby Raimondas » Thu Dec 02, 2010 5:44 am


1. I have some knowledge in C/C++ programming, because i am electronic engineering student.
2. I have created Mpich 2 cluster and installed scalapack.
3. And most important I need to calculate Ax=b, where A is N by N matrix and b is N row.
4. From google i found some examples, but they are without comments and difficult to understood.
5. Please help me !!

my simplest code is bellow:
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include "mpi.h"

int main(int argc, char **argv)

   int rank, size;

   MPI_Init( &argc, &argv);
      MPI_Comm_rank(MPI_COMM_WORLD, &rank);
      MPI_Comm_size(MPI_COMM_WORLD, &size);
   int N;

   //2D matrix converted to 1D by row
   double *A=(double*)malloc(N*N*sizeof(double));

   double *B=(double*)malloc(N*sizeof(double));

   //=============RESULT MUST BE=============//
   //0.8      0.9      0.8
   //0.7      1      0.7
   //0         0      0

Posts: 1
Joined: Wed Dec 01, 2010 12:04 pm

Re: scalapack+C+mpi beginner

Postby admin » Tue Feb 08, 2011 9:20 am

we have a User's guide available online.
Site Admin
Posts: 522
Joined: Wed Dec 08, 2004 7:07 pm

Return to User Discussion

Who is online

Users browsing this forum: Exabot [Bot] and 1 guest