Hi,

when compiling numpy-1.40 with the Sun Studio Compilers (v12 Update 1) on Linux 
(an OpenSUSE 11.1 in my case), about 30 tests in numpy.test() fail; all 
failures are related to the arctan2 function. 

I've found that in r7732 a patch was applied to 
trunk/numpy/core/src/private/npy_config.h in response to #1201, #1202, and 
#1203, #undef'ing the HAVE_ATAN2 variable in order to fix a broken atan2() 
implementation on Solaris. It seems that this does no good with the most recent 
Sun compiler on Linux...

The attached patch ensures that the original patch is only applied on Solaris 
platforms; with this applied, all tests are completed successfully under Linux. 
BTW, I did not observe #1204 or #1205... As I have no access to a Solaris 
machine, I also don't know if the original patch is required with Sun Studio 
12.1 at all.


Something different - I would've loved to enter this in the numpy-Trac, but 
registration didn't work (I was asked for another username/password at 
scipy.org during the registration process) :-((

Thanks,

  Christian.
diff -r -C5 numpy-1.4.0.orig/numpy/core/src/private/npy_config.h numpy-1.4.0/numpy/core/src/private/npy_config.h
*** numpy-1.4.0.orig/numpy/core/src/private/npy_config.h	2009-12-22 11:59:52.000000000 +0000
--- numpy-1.4.0/numpy/core/src/private/npy_config.h	2010-02-17 17:47:12.080101518 +0000
***************
*** 7,18 ****
  #if defined(_MSC_VER) || defined(__MINGW32_VERSION)
  #undef HAVE_ATAN2
  #undef HAVE_HYPOT
  #endif
  
! /* Disable broken Sun Workshop Pro math functions */
! #ifdef __SUNPRO_C
  #undef HAVE_ATAN2
  #endif
  
  /* 
   * On Mac OS X, because there is only one configuration stage for all the archs
--- 7,18 ----
  #if defined(_MSC_VER) || defined(__MINGW32_VERSION)
  #undef HAVE_ATAN2
  #undef HAVE_HYPOT
  #endif
  
! /* Disable broken Sun Workshop Pro math functions on Solaris */
! #if defined(__SUNPRO_C) && defined(__sun)
  #undef HAVE_ATAN2
  #endif
  
  /* 
   * On Mac OS X, because there is only one configuration stage for all the archs
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to