Okay, last update.  I finally have got everything to work.

It turns out the problems that I had earlier with f2py were due to
intel's -ipo flag.  So the only place this flag works is with the C++
code, not fortran or c.

Also, I forgot to mention -- the qhull_a.h method has a workaround for
some aspect of intel's compiler that is no longer needed and in fact
causes an error.  It's for a macro that simply suppresses
unused variable warnings.  In my opinion, it could be removed, as it's
only used two places, and scipy spits out enough warnings that that is
hardly an issue.  Thus my change was around line 102 in qhul_a.h.
Replace

#if defined(__INTEL_COMPILER) && !defined(QHULL_OS_WIN)
template <typename T>
inline void qhullUnused(T &x) { (void)x; }
#  define QHULL_UNUSED(x) qhullUnused(x);
#else
#  define QHULL_UNUSED(x) (void)x;
#endif

with

#define QHULL_UNUSED(x)

Also, I could still not get the CloughTocher2DInterpolator to not
segfault.  Thus I had to disable it by raising an exception in the
init method.  With this in place, everything compiles and the unit
tests pretty much all run, with 5 failures mostly due to numerical
accuracy stuff and 9 errors due to the interpolator.

In summary, my final environment variables that give the flags for
compiling stuff are:

export FLAGS='-xHOST -static -fPIC -g -fltconsistency'

export CFLAGS="$FLAGS -O2 -fno-alias"
export CPPFLAGS="$FLAGS -fno-alias -ipo -O3"
export CXXFLAGS="$CPPFLAGS"

export FFLAGS="$FLAGS -O3"
export F77FLAGS="$FFLAGS"
export F90FLAGS="$FFLAGS"

export LDFLAGS="-xHOST -O1 -openmp -lpthread -fPIC"

And the arguments given to the fortran compiler in fcompiler/intel.py are:

compiler_opt_flags = '-static -xHOST -fPIC -DMKL_LP64 -mkl -g -O3'

I'd be happy to answer any more questions about the process as needed.
 Now, back to my real work.

-- Hoyt

++++++++++++++++++++++++++++++++++++++++++++++++
+ Hoyt Koepke
+ University of Washington Department of Statistics
+ http://www.stat.washington.edu/~hoytak/
+ hoy...@gmail.com
++++++++++++++++++++++++++++++++++++++++++
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to