From 5ada492313aa191d694236301dfd38077984e657 Mon Sep 17 00:00:00 2001 From: Adiv Paradise Date: Thu, 19 Aug 2021 02:42:11 -0400 Subject: [PATCH] Fixing platform compatibility problems with platforms that may have a) old versions of numpy and/or b) multiple different compiler options; GNU is now hard-coded. --- docs/conf.py | 2 +- exoplasim/configure.sh | 17 ++++++++++++++--- setup.py | 4 ++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index df0b847..5ffcafa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,7 +27,7 @@ copyright = '2020, Adiv Paradise' author = 'Adiv Paradise' # The full version, including alpha/beta/rc tags -release = '3.0.0a20' +release = '3.0.0a22' # -- General configuration --------------------------------------------------- diff --git a/exoplasim/configure.sh b/exoplasim/configure.sh index ac295c2..5b9fff2 100755 --- a/exoplasim/configure.sh +++ b/exoplasim/configure.sh @@ -344,13 +344,24 @@ echo >> most_info.txt "C Compiler: $MOST_CC" cat most_info.txt make +#On Sunnyvale, the Python/NumPy stack was built with gcc/g++. Even if we would *like* to use +#Intel compilers, on this machine we can't. This is likely going to be true on most systems, +#so we'll hard-code this, because there probably isn't a way to check this. + +#If you're reading this and that's a problem, I'm so sorry. Blame compiler programmers who don't +#talk to each other. Or blame the NumPy devs for having zero cross-version compatibility in f2py. +oldcc=$CC +oldcpp=$CXX +export CC=gcc +export CXX=g++ #Compile pyfft libraries for Python 2 -f2py2 -c -m --f90exec=$MOST_F90 --f90flags="-O3" pyfft2 pyfft.f90 +f2py2 -c -m --f90exec=gfortran --f77exec=gfortran --f90flags="-O3" pyfft2 pyfft.f90 || f2py -c -m --f90exec=gfortran --f77exec=gfortran --f90flags="-O3" pyfft2 pyfft.f90 #Compile pyfft libraries for Python 3 -f2py$pyversion -c -m --f90exec=$MOST_F90 --f90flags="-O3" pyfft pyfft.f90 && mv pyfft.cpython*.so pyfft.so +f2py$pyversion -c -m --f90exec=gfortran --f77exec=gfortran --f90flags="-O3" pyfft pyfft.f90 && mv pyfft.cpython*.so pyfft.so - +export CC=$oldcc +export CXX=$oldcpp echo diff --git a/setup.py b/setup.py index 12b1e28..9bb3c23 100644 --- a/setup.py +++ b/setup.py @@ -3,10 +3,10 @@ import os setup( name='exoplasim', - version='3.0.0a20', + version='3.0.0a22', packages=['exoplasim',], zip_safe=False, - install_requires=["numpy","matplotlib","scipy"], + install_requires=["numpy>=1.16","matplotlib","scipy"], extras_require = {"netCDF4": ["netCDF4"], "HDF5": ["h5py"]}, include_package_data=True,