By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,548 Members | 1,486 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,548 IT Pros & Developers. It's quick & easy.

Compiling Python using the Portland Group compiler

P: n/a
I am trying to install Python 2.4.3 on an AMD Opteron system using
the Portland Group's compiler (pgcc). Using

CC="pgcc -DNCURSES_ENABLE_STDBOOL_H=0" OPT="-O0" LINKFORSHARED="-Wl,-
export-dynamic" ./configure --without-cxx

I finally managed to obtain an executable that would start and work,
but it fails a couple of test cases:

1) test_coercion reports wrong results for operations with complex
numbers. For example,
2**(2.+0j) yields (1+0j).

2) test_compare reports some wrong results, such as

(2+0j) != (2+0j)

However, typing

(2+0j) == (2+0j)

into the interpreter yields "True". Perhaps the bug is in the
execution of the test suite.

3) test_compile reports wrong results as well:

test test_compile failed -- Traceback (most recent call last):
File "/work/experiences/biophys/hinsen/install/Python-2.4.3/Lib/
test/test_compile.py", line 164, in test_literals_with_leading_zeroes
self.assertEqual(eval("0777j"), 777j)
AssertionError: 777j != 777j

However,
eval("0777j") == 777j
yields "True".

4) test_cpickle crashes with a segmentation fault.
Has anyone encountered such failures before? Does anyone have useful
suggestions for analyzing them?

Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: hinsen ät cnrs-orleans.fr
---------------------------------------------------------------------
Jul 12 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Konrad,
I would try to find out if pgcc has any compatibility switches. I saw
you turned optimization "off" but sometimes there is more you can do
disable some of the advanced behind the scenes magic. So apply all
those switches, run the tests and then try them one by one to find out
how many you can enable before test fail again. If you compiled it as
64bit application, try to compile as a regular 32bit and see what
happens.
Nick V.
Konrad Hinsen wrote:
I am trying to install Python 2.4.3 on an AMD Opteron system using
the Portland Group's compiler (pgcc). Using

CC="pgcc -DNCURSES_ENABLE_STDBOOL_H=0" OPT="-O0" LINKFORSHARED="-Wl,-
export-dynamic" ./configure --without-cxx

I finally managed to obtain an executable that would start and work,
but it fails a couple of test cases:

1) test_coercion reports wrong results for operations with complex
numbers. For example,
2**(2.+0j) yields (1+0j).

2) test_compare reports some wrong results, such as

(2+0j) != (2+0j)

However, typing

(2+0j) == (2+0j)

into the interpreter yields "True". Perhaps the bug is in the
execution of the test suite.

3) test_compile reports wrong results as well:

test test_compile failed -- Traceback (most recent call last):
File "/work/experiences/biophys/hinsen/install/Python-2.4.3/Lib/
test/test_compile.py", line 164, in test_literals_with_leading_zeroes
self.assertEqual(eval("0777j"), 777j)
AssertionError: 777j != 777j

However,
eval("0777j") == 777j
yields "True".

4) test_cpickle crashes with a segmentation fault.
Has anyone encountered such failures before? Does anyone have useful
suggestions for analyzing them?

Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: hinsen ät cnrs-orleans.fr
---------------------------------------------------------------------
Jul 12 '06 #2

P: n/a
Nick,
I would try to find out if pgcc has any compatibility switches. I saw
you turned optimization "off" but sometimes there is more you can do
disable some of the advanced behind the scenes magic. So apply all
those switches, run the tests and then try them one by one to find out
how many you can enable before test fail again. If you compiled it as
64bit application, try to compile as a regular 32bit and see what
happens.
Thanks for your suggestions. I already looked for switches that could
possibly change the interpretation of the C code, but I found nothing
other than the usual ANSI and C9x compatibility switches, which only
change the amount of warnings.

However, I will take up your suggestion and see if I can compile a 32-
bit executable.

Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: hinsen ät cnrs-orleans.fr
---------------------------------------------------------------------
Jul 13 '06 #3

P: n/a
Konrad Hinsen wrote:
I am trying to install Python 2.4.3 on an AMD Opteron system using
the Portland Group's compiler (pgcc). Using

I finally managed to obtain an executable that would start and work,
but it fails a couple of test cases:
....
Has anyone encountered such failures before? Does anyone have useful
suggestions for analyzing them?
Try adding -Kieee to the compiler options. Python's complex math
requires strict IEEE conformance.

You'll have to debug the crash further.

n

Jul 15 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.