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

BLACS Initialisation Error

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

BLACS Initialisation Error

Postby RostauGuardian » Tue Jul 24, 2007 9:35 am

Hi all,

I am getting the following warning from each process when initialising a BLACS context/grid in my F90 code:

BLACS ERROR 'Users with C main programs must explicitly call MPI_Init'
from {-1,-1}, pnum=0, Contxt=-1, on line -1 of file 'SRC/MPI/blacs_pinfo_.c'.

I am getting this warning with both MPICH and MPICH2 on two different compilers (Portland and Pathscale).

These are the offending lines in the code with appropriately initialised variables (the error occurs after execution of the first line):

call blacs_get(0,0,context)
call blacs_gridinit(context,'Row',grid_rows,grid_columns)
call blacs_gridinfo(context,grid_rows,grid_columns,process_row,process_column)

Would love if someone can comment on what may be causing this problem.

Thanks in advance.....
RostauGuardian
 
Posts: 3
Joined: Tue Jul 24, 2007 9:28 am
Location: Ireland

Postby Julie » Tue Jul 24, 2007 11:03 am

RostauGuardian

Here is an example (hello world) that can help you understand what's wrong in your code: http://www.netlib.org/blacs/BLACS/Examples.html
It uses the same piece of code than you.

To compile it, just run the following command:
Code: Select all
mpif77 hello.f   %PATH TO BLACS LIB%/blacsF77init_MPI-LINUX-0.a  %PATH TO BLACS LIB%/blacs_MPI-LINUX-0.a %PATH TO BLACS LIB%/blacsF77init_MPI-LINUX-0.a

let me know if it helps
Julie
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado

Postby RostauGuardian » Tue Jul 24, 2007 6:30 pm

Julie,

Thanks for the link. What I did notice was that in your compile line you don't refer to blacsCinit.a. For some reason in my link line I had this library. I got no warning at the linking stage but obviously this was the problem.

When I removed it and kept the blacsF77init.a solely then the orginal error went away. The reference to C program in the error now seems significant based on the link library I was using even though my code was an F90 code.

Thanks indirectly for your help.

Best Wishes.
RostauGuardian
 
Posts: 3
Joined: Tue Jul 24, 2007 9:28 am
Location: Ireland


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 4 guests