ScaLAPACK Archives

[Scalapack] error from Cblacs2sys_handle

Hello Nichols,

I can personnally not really help you. You have done everything right as 
far as I can tell, it is possible there is a problem somewhere in the 
BLACS, or as you suggest the lack of BLACS grid exit is screwing 
everything up. If you can find the problem, please let us know. That'll be 

I have the same kind of driver that maps an MPI communicator to a BLACS 
context. My code looks about the same as yours. But I do not exerce it 
that much. Most of the time, my MPI communicator is mpi_comm_world.


On Wed, 30 Jun 2010, naromero@Domain.Removed wrote:


I am trying to extra the system context from the BLACS context as follows:

 ConTxt = Csys2blacs_handle_(comm);
 Cblacs_gridinit_(&ConTxt, &order, nprow, npcol);

 if (ConTxt != -1) {
   bg_comm = Cblacs2sys_handle_(ConTxt);

Here comm is a subcommunicator of MPI_COMM_WORLD. I wrote a simple 
self-standing C
program where comm = MPI_COMM_WORLD and the code works. However, in the 
middle of my
large application, I get the following error:

BLACS ERROR 'No system context corresponding to BLACS system context handle 3
from {-1,-1}, pnum=0, Contxt=-1, on line 22 of file 'blacs2sys_handle_.c'.

Which looking at the BLACS source code, it is triggered because the 
on pnum=0 = MPI_COMM_NULL. Does anyone know how this is even possible?

A couple of ideas:
1. Frequently my application will have comm equal to a duplicate of 
could this be a problem?
2. My object oriented code may have failed to call blacsgrid_exit on the 
BLACS context at some point during its execution.

Nichols A. Romero, Ph.D.
Argonne Leadership Computing Facility
Argonne National Laboratory
Building 240 Room 2-127
9700 South Cass Avenue
Argonne, IL 60490
(630) 252-3441

Scalapack mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Scalapack] error from Cblacs2sys_handle, Julien Langou <=

For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or