The LAPACK forum has moved to https://github.com/Reference-LAPACK/lapack/discussions.

blacs_gridinit/mpi_init, blacs_gridexit/mpi_finalize

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

blacs_gridinit/mpi_init, blacs_gridexit/mpi_finalize

Postby amolins » Mon Oct 19, 2009 4:40 pm

what is the correct way of starting BLACS? do I have to call mpi_init beforehand, or does it suffice with calling blacs_gridinit? what about closing blacs?

Thanks
amolins
 
Posts: 13
Joined: Mon Sep 29, 2008 11:49 am

Re: blacs_gridinit/mpi_init, blacs_gridexit/mpi_finalize

Postby Julie » Mon Oct 19, 2009 4:42 pm

You will find useful examples of how to use BLACS here.
http://www.netlib.org/blacs/BLACS/Examples.html

Julie
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado

Re: blacs_gridinit/mpi_init, blacs_gridexit/mpi_finalize

Postby amolins » Wed Dec 09, 2009 1:41 pm

what about in C? and what about the proper way of doing it with MPI_Init / MPI_Finalize? the link does not answer any of these questions.
amolins
 
Posts: 13
Joined: Mon Sep 29, 2008 11:49 am

Re: blacs_gridinit/mpi_init, blacs_gridexit/mpi_finalize

Postby gajjar » Thu Apr 22, 2010 11:12 am

Have a look at http://geco.mines.edu/software/mkl/linsolve.f90

The answer is
call MPI_INIT(code)

call MPI_COMM_SIZE(MPI_COMM_WORLD,nb_procs,code)
call MPI_COMM_RANK(MPI_COMM_WORLD,rank,code)
call MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN,code);
!**************************************
...
call blacs_get(icontxt,0,value)
call blacs_gridinit(icontxt,'R',nprow,npcol)
call blacs_gridinfo(icontxt,nprow,npcol,myrow,mycol)

call mpi_finalize(code)
gajjar
 
Posts: 2
Joined: Mon Mar 22, 2010 10:49 am


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 7 guests