After installing Intel oneapi, I rebuilt the fmm3d library. Intel oneapi also ships with its own optimized python distribution. "make python" failed under this distribution with the following output: (shown first is my make.inc file)
-
-
-
- make.inc - - - - -
FMM_INSTALL_DIR = /home/oneil/.local/lib
FAST_KER = ON
OMP = ON
set compilers
CC=icc
CXX=icpc
FC=ifort
set compiler flags for c and fortran
FFLAGS= -fPIC -O3 -march=native -funroll-loops -mkl
CFLAGS= -fPIC -O3 -march=native -funroll-loops -std=c99
CXXFLAGS= -std=c++11 -DSCTL_PROFILE=-1 -fPIC -O3 -march=native -funroll-loops
CLIBS = -lm -ldl -lifcore
#CLIBS = -lm -ldl
LIBS = -lm
extra flags for multithreaded: C/Fortran, MATLAB
OMPFLAGS = -qopenmp
OMPLIBS = -qopenmp
[oneil@legendre FMM3D]$ make python
ar rcs libfmm3d.a src/Common/besseljs3d.o src/Common/cdjseval3d.o src/Common/dfft.o src/Common/fmmcommon.o src/Common/legeexps.o src/Common/prini.o src/Common/rotgen.o src/Common/rotproj.o src/Common/rotviarecur.o src/Common/tree_routs3d.o src/Common/pts_tree3d.o src/Common/yrecursion.o src/Common/cumsum.o ./vec-kernels/src/libkernels.o src/Helmholtz/h3dcommon.o src/Helmholtz/h3dterms.o src/Helmholtz/h3dtrans.o src/Helmholtz/helmrouts3d.o src/Helmholtz/hfmm3d.o src/Helmholtz/hfmm3dwrap.o src/Helmholtz/hfmm3dwrap_legacy.o src/Helmholtz/hfmm3dwrap_vec.o src/Helmholtz/hpwrouts.o src/Helmholtz/hwts3e.o src/Helmholtz/hnumphys.o src/Helmholtz/hnumfour.o src/Helmholtz/projections.o src/Helmholtz/hfmm3d_mps.o src/Helmholtz/helmkernels_fast.o src/Helmholtz/hndiv_fast.o src/Laplace/lwtsexp_sep1.o src/Laplace/l3dterms.o src/Laplace/l3dtrans.o src/Laplace/laprouts3d.o src/Laplace/lfmm3d.o src/Laplace/lfmm3dwrap.o src/Laplace/lfmm3dwrap_legacy.o src/Laplace/lfmm3dwrap_vec.o src/Laplace/lwtsexp_sep2.o src/Laplace/lpwrouts.o src/Laplace/lapkernels_fast.o src/Laplace/lndiv_fast.o src/Stokes/stfmm3d.o src/Stokes/stokkernels.o src/Maxwell/emfmm3d.o
mv libfmm3d.a lib-static/
cd python &&
FMM_FLIBS='-lm -lstdc++ -qopenmp -qopenmp' python -m pip install -e . &&
python -m pytest test/ -s
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///home/oneil/codes/FMM3D/python
Requirement already satisfied: numpy in /opt/intel/oneapi/intelpython/python3.7/lib/python3.7/site-packages (from fmm3dpy==0.0.5) (1.19.2)
Collecting pytest
Using cached pytest-6.2.2-py3-none-any.whl (280 kB)
Collecting iniconfig
Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting importlib-metadata>=0.12; python_version < "3.8"
Downloading importlib_metadata-3.7.3-py3-none-any.whl (12 kB)
Collecting attrs>=19.2.0
Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
|████████████████████████████████| 49 kB 2.4 MB/s
Collecting toml
Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting packaging
Using cached packaging-20.9-py2.py3-none-any.whl (40 kB)
Collecting pluggy<1.0.0a1,>=0.12
Using cached pluggy-0.13.1-py2.py3-none-any.whl (18 kB)
Collecting py>=1.8.2
Using cached py-1.10.0-py2.py3-none-any.whl (97 kB)
Collecting typing-extensions>=3.6.4; python_version < "3.8"
Downloading typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting zipp>=0.5
Downloading zipp-3.4.1-py3-none-any.whl (5.2 kB)
Requirement already satisfied: pyparsing>=2.0.2 in /opt/intel/oneapi/intelpython/python3.7/lib/python3.7/site-packages (from packaging->pytest->fmm3dpy==0.0.5) (2.4.7)
Installing collected packages: iniconfig, typing-extensions, zipp, importlib-metadata, attrs, toml, packaging, pluggy, py, pytest, fmm3dpy
Running setup.py develop for fmm3dpy
ERROR: Command errored out with exit status 1:
command: /opt/intel/oneapi/intelpython/latest/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/oneil/codes/FMM3D/python/setup.py'"'"'; file='"'"'/home/oneil/codes/FMM3D/python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps --user --prefix=
cwd: /home/oneil/codes/FMM3D/python/
Complete output (82 lines):
running develop
running build_scripts
running egg_info
running build_src
build_src
building extension "fmm3dpy.hfmm3d_fortran" sources
f2py options: ['only:', 'hfmm3d_s_c_p', 'hfmm3d_s_c_g', 'hfmm3d_s_d_p', 'hfmm3d_s_d_g', 'hfmm3d_s_cd_p', 'hfmm3d_s_cd_g', 'hfmm3d_t_c_p', 'hfmm3d_t_c_g', 'hfmm3d_t_d_p', 'hfmm3d_t_d_g', 'hfmm3d_t_cd_p', 'hfmm3d_t_cd_g', 'hfmm3d_st_c_p', 'hfmm3d_st_c_g', 'hfmm3d_st_d_p', 'hfmm3d_st_d_g', 'hfmm3d_st_cd_p', 'hfmm3d_st_cd_g', 'hfmm3d_s_c_p_vec', 'hfmm3d_s_c_g_vec', 'hfmm3d_s_d_p_vec', 'hfmm3d_s_d_g_vec', 'hfmm3d_s_cd_p_vec', 'hfmm3d_s_cd_g_vec', 'hfmm3d_t_c_p_vec', 'hfmm3d_t_c_g_vec', 'hfmm3d_t_d_p_vec', 'hfmm3d_t_d_g_vec', 'hfmm3d_t_cd_p_vec', 'hfmm3d_t_cd_g_vec', 'hfmm3d_st_c_p_vec', 'hfmm3d_st_c_g_vec', 'hfmm3d_st_d_p_vec', 'hfmm3d_st_d_g_vec', 'hfmm3d_st_cd_p_vec', 'hfmm3d_st_cd_g_vec', 'h3ddirectcp', 'h3ddirectcg', 'h3ddirectdp', 'h3ddirectdg', 'h3ddirectcdp', 'h3ddirectcdg', ':']
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy' to include_dirs.
building extension "fmm3dpy.lfmm3d_fortran" sources
f2py options: ['only:', 'lfmm3d_s_c_p', 'lfmm3d_s_c_g', 'lfmm3d_s_c_h', 'lfmm3d_s_d_p', 'lfmm3d_s_d_g', 'lfmm3d_s_d_h', 'lfmm3d_s_cd_p', 'lfmm3d_s_cd_g', 'lfmm3d_s_cd_h', 'lfmm3d_t_c_p', 'lfmm3d_t_c_g', 'lfmm3d_t_c_h', 'lfmm3d_t_d_p', 'lfmm3d_t_d_g', 'lfmm3d_t_d_h', 'lfmm3d_t_cd_p', 'lfmm3d_t_cd_g', 'lfmm3d_t_cd_h', 'lfmm3d_st_c_p', 'lfmm3d_st_c_g', 'lfmm3d_st_c_h', 'lfmm3d_st_d_p', 'lfmm3d_st_d_g', 'lfmm3d_st_d_h', 'lfmm3d_st_cd_p', 'lfmm3d_st_cd_g', 'lfmm3d_st_cd_h', 'lfmm3d_s_c_p_vec', 'lfmm3d_s_c_g_vec', 'lfmm3d_s_c_h_vec', 'lfmm3d_s_d_p_vec', 'lfmm3d_s_d_g_vec', 'lfmm3d_s_d_h_vec', 'lfmm3d_s_cd_p_vec', 'lfmm3d_s_cd_g_vec', 'lfmm3d_s_cd_h_vec', 'lfmm3d_t_c_p_vec', 'lfmm3d_t_c_g_vec', 'lfmm3d_t_c_h_vec', 'lfmm3d_t_d_p_vec', 'lfmm3d_t_d_g_vec', 'lfmm3d_t_d_h_vec', 'lfmm3d_t_cd_p_vec', 'lfmm3d_t_cd_g_vec', 'lfmm3d_t_cd_h_vec', 'lfmm3d_st_c_p_vec', 'lfmm3d_st_c_g_vec', 'lfmm3d_st_c_h_vec', 'lfmm3d_st_d_p_vec', 'lfmm3d_st_d_g_vec', 'lfmm3d_st_d_h_vec', 'lfmm3d_st_cd_p_vec', 'lfmm3d_st_cd_g_vec', 'lfmm3d_st_cd_h_vec', 'l3ddirectcp', 'l3ddirectcg', 'l3ddirectch', 'l3ddirectdp', 'l3ddirectdg', 'l3ddirectdh', 'l3ddirectcdp', 'l3ddirectcdg', 'l3ddirectcdh', ':']
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy/fortranobject.c' to sources.
adding 'build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy' to include_dirs.
build_src: building npy-pkg config files
creating fmm3dpy.egg-info
writing fmm3dpy.egg-info/PKG-INFO
writing dependency_links to fmm3dpy.egg-info/dependency_links.txt
writing requirements to fmm3dpy.egg-info/requires.txt
writing top-level names to fmm3dpy.egg-info/top_level.txt
writing manifest file 'fmm3dpy.egg-info/SOURCES.txt'
reading manifest file 'fmm3dpy.egg-info/SOURCES.txt'
writing manifest file 'fmm3dpy.egg-info/SOURCES.txt'
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']'
customize Gnu95FCompiler
Found executable /usr/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using build_ext
building 'fmm3dpy.hfmm3d_fortran' extension
compiling C sources
C compiler: gcc -pthread -B /opt/intel/oneapi/intelpython/latest/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
creating build/temp.linux-x86_64-3.7/build
creating build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy
creating build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build
creating build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy
compile options: '-Ibuild/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy -I/opt/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/include -I/opt/intel/oneapi/intelpython/latest/include/python3.7m -I/opt/intel/oneapi/intelpython/latest/include/python3.7m -c'
gcc: build/src.linux-x86_64-3.7/fmm3dpy/hfmm3d_fortranmodule.c
gcc: build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy/fortranobject.c
In file included from /opt/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
from /opt/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /opt/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy/fortranobject.h:13,
from build/src.linux-x86_64-3.7/fmm3dpy/hfmm3d_fortranmodule.c:16:
/opt/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~~~~~
In file included from /opt/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
from /opt/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /opt/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy/fortranobject.h:13,
from build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy/fortranobject.c:2:
/opt/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~~~~~
build/src.linux-x86_64-3.7/fmm3dpy/hfmm3d_fortranmodule.c:110:12: warning: ‘f2py_size’ defined but not used [-Wunused-function]
110 | static int f2py_size(PyArrayObject* var, ...)
| ^~~~~~~~~
compiling Fortran sources
Fortran f77 compiler: /usr/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops
Fortran f90 compiler: /usr/bin/gfortran -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops
Fortran fix compiler: /usr/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops
creating build/temp.linux-x86_64-3.7/FMM3D
creating build/temp.linux-x86_64-3.7/FMM3D/src
creating build/temp.linux-x86_64-3.7/FMM3D/src/Helmholtz
compile options: '-Ibuild/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy -I/opt/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/include -I/opt/intel/oneapi/intelpython/latest/include/python3.7m -I/opt/intel/oneapi/intelpython/latest/include/python3.7m -c'
gfortran:f77: ../src/Helmholtz/hfmm3dwrap.f
gfortran:f77: ../src/Helmholtz/hfmm3dwrap_vec.f
gfortran:f77: ../src/Helmholtz/helmkernels.f
../src/Helmholtz/helmkernels.f:179:39:
179 | complex *16 zkeye,eye,cd,cd1,ztmp
| 1
Warning: Unused variable ‘ztmp’ declared at (1) [-Wunused-variable]
/usr/bin/gfortran -Wall -g -Wall -g -shared build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy/hfmm3d_fortranmodule.o build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy/fortranobject.o build/temp.linux-x86_64-3.7/FMM3D/src/Helmholtz/hfmm3dwrap.o build/temp.linux-x86_64-3.7/FMM3D/src/Helmholtz/hfmm3dwrap_vec.o build/temp.linux-x86_64-3.7/FMM3D/src/Helmholtz/helmkernels.o -L/usr/lib/gcc/x86_64-redhat-linux/10 -L/usr/lib/gcc/x86_64-redhat-linux/10 -lgfortran -o fmm3dpy/hfmm3d_fortran.cpython-37m-x86_64-linux-gnu.so -lm -lstdc++ -qopenmp -qopenmp ../lib-static/libfmm3d.a
gfortran: error: unrecognized command-line option ‘-qopenmp’; did you mean ‘-fopenmp’?
gfortran: error: unrecognized command-line option ‘-qopenmp’; did you mean ‘-fopenmp’?
error: Command "/usr/bin/gfortran -Wall -g -Wall -g -shared build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy/hfmm3d_fortranmodule.o build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/fmm3dpy/fortranobject.o build/temp.linux-x86_64-3.7/FMM3D/src/Helmholtz/hfmm3dwrap.o build/temp.linux-x86_64-3.7/FMM3D/src/Helmholtz/hfmm3dwrap_vec.o build/temp.linux-x86_64-3.7/FMM3D/src/Helmholtz/helmkernels.o -L/usr/lib/gcc/x86_64-redhat-linux/10 -L/usr/lib/gcc/x86_64-redhat-linux/10 -lgfortran -o fmm3dpy/hfmm3d_fortran.cpython-37m-x86_64-linux-gnu.so -lm -lstdc++ -qopenmp -qopenmp ../lib-static/libfmm3d.a" failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/intel/oneapi/intelpython/latest/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/oneil/codes/FMM3D/python/setup.py'"'"'; file='"'"'/home/oneil/codes/FMM3D/python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.