Consider the following example

I have 4 block diagonal matrices for 8 processors and I would like to factorize them at the same time.

So I am trying to create 4 contexts, each one with 2 processors.

But it doesn't work

I am calling

call blacs_gridinit(CONTXT,ORDER,NPROW,NPCOL)

call blacs_gridinfo(CONTXT,nprow,npcol,myrow,mycol)

with

ORDER='C'

NPROW=1

NPCOL=2

I do not know what to setup for CONTXT

If I setup CONTXT=0 on processor 0,1

CONTXT=2 on processor 2,3

CONTXT=4 on processor 4,5

and

CONTXT=6 on processors 6,7

it crashes

If I setup all CONTXT=0 on all processors it creates only one context on processors 0,1 but returns CONTXT=-1 and nprow=npcol=myrow=mycol=-1 on other processors

Any help would be appreciated, since I really would like to use several SCALAPCK solvers at the same time for many block diagonal matrices