Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
2153 Discussions

Debugger hanging due to Python mismatch problem in Intel Cluster Studio 2011

rfbmunb_br
Beginner
700 Views

Hi,

When I try to open the debugger of ICS 2011 using the command

mpiexec -idb -genv MPIEXEC_DEBUG 1 -n 2 -host dragon ./vat_2d_69_debug

I got the following warning message:

mpiexec:1219: RuntimeWarning: Python C API version mismatch for module mtv: This Python has API version 1013, module mtv has version 1012.

followed by the message

import mtv

and then the debugger hangs, not opening the gui or returning the command line prompt. The installed version of Python is 2.6.5-3.3.1-x86_64. Any help will be appreciated.

Regards,

Roboto

0 Kudos
10 Replies
Dmitry_K_Intel2
Employee
700 Views
Hi Roboto,

Looks like Python has got new API version. It means that either mtv.so need to be recompiled with new python.h or you can try to use old version of the python. At least python 2.4.3 has API version 1012 (didn't check other versions).
Could you also try to use '-gdb' instead of '-idb'. Since gdb uses another mechanism to start the debugger it may work, but I'm not sure.

Regards!
Dmitry
0 Kudos
rfbmunb_br
Beginner
700 Views
Hi Dimitry,

Using '-gdb' instead of '-idb' solves the problem. Thanks for your advice!

Best regards,

Roboto

0 Kudos
rfbmunb_br
Beginner
700 Views
Hi Dmitry,

As an alternative to use '-gdb' instead of '-idb', I installed python 2.4.3 using the 'make altinstall' command so both versions (2.6.5 and 2.4.3) are installed in the system. How do I tell the debugger to use API version 1012 that is available in python 2.4.3?

Regards,

Roboto
0 Kudos
Dmitry_K_Intel2
Employee
700 Views
Hi Roboto,

Well, you need to find where version 2.4.3 is located. It will be located it the directory specified by '--prefix. You may also check Makefile (created by ./configure).

Add needed path to the PATH env variable and check.

Don't forget to set IDB_HOME env variable. This document may help you tu start idb.

Pay attention that there is no GUI for IDB running with mpiexec.

Regards!
Dmitry
0 Kudos
rfbmunb_br
Beginner
700 Views
Hi Dmitry,

The path to the python 2.4.3 was allready set in the .bash_profile by:

export PATH=/usr/local/lib/python2.4/:$PATH

and the IDB_HOME variable was already set to:

export IDB_HOME=/opt/intel/composerxe-2011.0.084/bin/intel64

when IDB hanged. When I installed python 2.4.3, using 'make altinstall' instead of 'make install', a hard link to python2.4 instead of python was created. I did so in order to preserve the python used by the OS (2.6.5). Maybe the mpiexec wrapper is following the python link, since it is the default for the OS, instead of the python2.4 link. I am aware that there is no GUI for IDB running with mpiexec, but I want to use the idb mode since I am far more familiar with it, and if I use mpiexec with the '-gdb' option and I want to shift to the idb mode using the command

$cmdset = "idb"

I got the following error:

Undefined command: "$cmdset". Try "help".

Best regards,

Roboto



0 Kudos
Dmitry_K_Intel2
Employee
700 Views
Hi Roboto,

It might be worth to read this article.
It seems to me that mpiexec should use python from the $PATH.

Running 'mpiexec -gdb' GDB is starting for debugging purposes. To use IDB instead you need to use 'mpiexec -idb'.

Regards!
Dmitry
0 Kudos
rfbmunb_br
Beginner
700 Views
Hi Dmitry,

After reading the article above, I modified the file mpiexec.py in the following manner:

1) every reference to the interpreter python was substituted by python2.4

2) every link to /usr/bin/python was substituted by /usr/local/bin/python2.4

By doing these modifications, I was able to get rid of the warning message that I get when I use the original version of mpiexec.py:

'mpiexec:1219: RuntimeWarning: Python C API version mismatch for module mtv: This Python has API version 1013, module mtv has version 1012'

since python2.4 (version 2.4.3) has the same API (version 1012) than module mtv. But IDB still hangs with an odd behavior. After calling IDB with the command:

'mpiexec -idb -genv MPIEXEC_DEBUG 1 -n 2 -host dragon ./vat_2d_69_debug'

an xterm is opened and closed immediately, giving no time to read the message inside. Do you know if the xterm message is saved in any permanent file? Or any means of securing the xterm opened?

Best regards,

Roboto
0 Kudos
Dmitry_K_Intel2
Employee
700 Views
Hi Roboto,

It seems to me that idb worked for you according to this thread.
Do you have problems with new idb version only? Does idb from your previous installation work fine?

Might be you forgot to use some environment variable - e.g. set IDB_PARALL_SHELL=ssh?

Also, please remove '-genv MPIEXEC_DEBUG 1' from the command line.

Unfortunately I don't know how to save xterm message or to secure it opened.

Regards!
Dmitry
0 Kudos
Ricardo_M_2
Beginner
700 Views

Dmitry Kuzmin (Intel) wrote:

Hi Roboto,

Looks like Python has got new API version. It means that either mtv.so need to be recompiled with new python.h or you can try to use old version of the python. At least python 2.4.3 has API version 1012 (didn't check other versions).
Could you also try to use '-gdb' instead of '-idb'. Since gdb uses another mechanism to start the debugger it may work, but I'm not sure.

Regards!
Dmitry

I'm having the same issue as Roboto in ICS 2012  but I'd like to continue using the Python version I've installed (2.6.x). How can I recompile mtv.so with the newly installed Python?

- Ricardo

0 Kudos
James_T_Intel
Moderator
700 Views

Hi Ricardo,

At this point, we do not support using idb for MPI.  Please use -gdb instead to debug with GDB.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel® Cluster Tools

0 Kudos
Reply