Coder Social home page Coder Social logo

flatironinstitute / fmm2d Goto Github PK

View Code? Open in Web Editor NEW
21.0 8.0 10.0 1.19 MB

This codebase is a set of libraries to compute N-body interactions governed by the Laplace and Helmholtz equations, to a specified precision, in two dimensions, on a multi-core shared-memory machine.

License: Apache License 2.0

Fortran 66.95% Makefile 0.84% Shell 0.02% Gnuplot 0.04% C 14.81% Python 6.61% MATLAB 6.46% Jinja 3.36% Mathematica 0.82% Meson 0.09%

fmm2d's Introduction

Flatiron Institute Fast Multipole Libraries

This codebase is a set of libraries to compute N-body interactions governed by the Laplace and Helmholtz equations, to a specified precision, in two dimensions, on a multi-core shared-memory machine.

Please see the online documentation, or its equivalent user manual.

fmm2d's People

Contributors

ahbarnett avatar askhamwhat avatar lu1and10 avatar mrachh avatar oneilm avatar sampotter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fmm2d's Issues

openmp thread-parallel not working with Python?

Hi,

I am calling bhfmm2d from python to solve a quite large stokes2d boundary integral equation. It runs much slower than expected. For 10k points, even the dense mat_vec evaluation of numpy is much faster than bhfmm2d (more than 10 times faster).

I noticed that in the output of top command, the cpu usage of bhfmm2d call never went up to more than 100%, while NumPy's dense mat_vec evaluation can take more than 500% CPU usage. Does this mean that the openmp is not working with python and thus fmm is slow? Or is there some other bottlenecks?

I have problems of much larger scale, say about half a million points on the boundary, and this bottleneck is really making solving problem of this scale impossible.

Hope you have a nice day.

Best regards,
Haiyang

add topic n-body

I suggest adding the topic n-body and perhaps others you can think of the the About section.

docs: fix dipole source math definitions

The notation \nabla ( H_0 (k | x - x_j |) )
for a dipole source for Helmholtz is unclear, and implies \nabla_x which would be incorrect (the target-grad when we mean source-grad).
Suggest changing to defining G(x,y) = (i/4) H_0^{(1)} ( k |x-y|), where x,y in R^2, then being clear about \mathbf{d} \cdot \nabla_y G(x,y) as a source dipole, etc.

Also using G would unify the docs for Laplace and Helmholtz.

Missing documentation for everything not Helmholtz

Hello,

I am currently trying to implement a Julia-interface for this library (pretty much a copy-paste of the one for FMM3D). However, the documentation seem to only cover the Helmholtz problem. Is it safe to assume that the Laplace problem is defined similar to the Helmholtz problem, i.e. something like

$$ u(x) = \sum_{j=1}^{N} c_j\log(\|\mathbf{x} -\mathbf{x}_j\|) - v_j\mathbf{d}_j\cdot\nabla \log(\|\mathbf{x} -\mathbf{x}_j\|) \quad ? $$

Furthermore there is also implemented other kernels, but I have no experience working with these. As such I have no idea how their potential might look like and hence have problems implementing a possible interface.

Cheers,
Mikkel

Bug: Typo in allocating arrays in /src/laplace/rfmm2d.f

When trying to use the rfmm2d_t_c_g subroutine, I noticed that the program crashed when the number of target points is larger than the number of sources. This is due to a typo in routine rfmm2d. When arrays are allocated for targets, ns is used instead of nt and therefore, it is not possible to have more targets than sources (this happens in lines 116, 123, 126 and 127 of rfmm2d.f (in /src/laplace/rfmm2d.f)). ns must be changed to nt in those lines.. . It then works fine.
Same issue seems to be present in lfmm2d.f.
Hope you can fix it.
Sorry if this is not the right channel/way to tell you. I'm an astrophysicist and not very used to github
Cheers,
Jorge

Documentation for bhfmm in the python document is not correct

Hi,

I was just using the bhfmm today and it took me some time to figure out the correct constants of the formular

This is the correct version:
$$u(x) = \sum_{j=1}^{N}2 c_{j} \log(|x-x_{j}|) + \overline{c_{j}} (x-x_{j})/(\overline{x-x_{j}}) + d_{j,1}/(x-x_{j}) + d_{j,2}/(\overline{x-x_{j}}) - \overline{d_{j,1}} (x-x_{j})/(\overline{x-x_{j}})^2$$

versus the current formula in the documentation of the bhfmm2d function definition

$$
u(x) = \sum_{j=1}^{N} c_{j} * log(|x-x_{j}|) +
\overline{c}{j} (x-x{j})/(\overline{x-x_{j}}) + d_{j,1}/(x-x_{j}) - d_{j,2}/(\overline{x-x_{j}}) -
\overline{d_{j,1}} (x-x_{j})/(\overline{x-x_{j}})^2
$$

Best,
Haiyang

make python not working

Dear Manas,

make python works fine on my laptops. But it failed on the CIMS compute servers. Would you help me with this? Thanks!

Here's the terminal output:

[hw1927@access1]~/pkg/fmm2d% make python
ar rcs libfmm2d.a src/common/cdjseval2d.o src/common/dfft.o src/common/fmmcommon2d.o src/common/next235.o src/common/prini.o src/common/tree_routs2d.o src/common/pts_tree2d.o src/common/cumsum.o src/common/hank103.o src/helmholtz/h2dcommon.o src/helmholtz/h2dterms.o src/helmholtz/helmrouts2d.o src/helmholtz/hfmm2d.o src/helmholtz/hfmm2dwrap.o src/helmholtz/wideband2d.o src/helmholtz/hfmm2dwrap_vec.o src/helmholtz/hndiv2d.o src/helmholtz/hfmm2d_ndiv.o src/helmholtz/hfmm2d_mps.o src/helmholtz/hfmm2d_mps_ndiv.o src/helmholtz/helmkernels2d.o src/laplace/l2dterms.o src/laplace/laprouts2d.o src/laplace/lfmm2d.o src/laplace/lfmm2dwrap.o src/laplace/lfmm2dwrap_vec.o src/laplace/cfmm2d.o src/laplace/cfmm2dwrap.o src/laplace/cfmm2dwrap_vec.o src/laplace/rfmm2d.o src/laplace/rfmm2dwrap.o src/laplace/rfmm2dwrap_vec.o src/laplace/lndiv2d.o src/laplace/rfmm2d_ndiv.o src/laplace/lfmm2d_ndiv.o src/laplace/cfmm2d_ndiv.o  src/laplace/lapkernels2d.o src/laplace/rlapkernels2d.o src/laplace/cauchykernels2d.o src/biharmonic/bh2dterms.o src/biharmonic/bhrouts2d.o src/biharmonic/bhfmm2d.o src/biharmonic/bhndiv2d.o  src/biharmonic/bhkernels2d.o src/stokes/stfmm2d.o  src/stokes/stokkernels2d.o 
mv libfmm2d.a lib-static/
cd python && \
FMM_FLIBS='-lm -lgomp  -fopenmp' python -m pip install -e .
Obtaining file:///home/hw1927/pkg/fmm2d/python
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages (from fmm2dpy==0.0.5) (1.23.3)
Requirement already satisfied: pytest in /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages (from fmm2dpy==0.0.5) (7.1.3)
Requirement already satisfied: attrs>=19.2.0 in /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages (from pytest->fmm2dpy==0.0.5) (22.1.0)
Requirement already satisfied: iniconfig in /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages (from pytest->fmm2dpy==0.0.5) (1.1.1)
Requirement already satisfied: packaging in /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages (from pytest->fmm2dpy==0.0.5) (21.3)
Requirement already satisfied: pluggy<2.0,>=0.12 in /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages (from pytest->fmm2dpy==0.0.5) (1.0.0)
Requirement already satisfied: py>=1.8.2 in /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages (from pytest->fmm2dpy==0.0.5) (1.11.0)
Requirement already satisfied: tomli>=1.0.0 in /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages (from pytest->fmm2dpy==0.0.5) (2.0.1)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages (from packaging->pytest->fmm2dpy==0.0.5) (3.0.9)
Installing collected packages: fmm2dpy
  Running setup.py develop for fmm2dpy
    error: subprocess-exited-with-error
    
    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [97 lines of output]
        /home/hw1927/pkg/fmm2d/python/setup.py:4: DeprecationWarning:
        
          `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
          of the deprecation of `distutils` itself. It will be removed for
          Python >= 3.12. For older Python versions it will remain present.
          It is recommended to use `setuptools < 60.0` for those Python versions.
          For more details, see:
            https://numpy.org/devdocs/reference/distutils_status_migration.html
        
        
          from numpy.distutils.core import setup
        running develop
        /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        running build_scripts
        running egg_info
        running build_src
        INFO: build_src
        INFO: building extension "fmm2dpy.hfmm2d_fortran" sources
        INFO: f2py options: ['only:', 'hfmm2d_s_c_p', 'hfmm2d_s_c_g', 'hfmm2d_s_d_p', 'hfmm2d_s_d_g', 'hfmm2d_s_cd_p', 'hfmm2d_s_cd_g', 'hfmm2d_t_c_p', 'hfmm2d_t_c_g', 'hfmm2d_t_d_p', 'hfmm2d_t_d_g', 'hfmm2d_t_cd_p', 'hfmm2d_t_cd_g', 'hfmm2d_st_c_p', 'hfmm2d_st_c_g', 'hfmm2d_st_d_p', 'hfmm2d_st_d_g', 'hfmm2d_st_cd_p', 'hfmm2d_st_cd_g', 'hfmm2d_s_c_p_vec', 'hfmm2d_s_c_g_vec', 'hfmm2d_s_d_p_vec', 'hfmm2d_s_d_g_vec', 'hfmm2d_s_cd_p_vec', 'hfmm2d_s_cd_g_vec', 'hfmm2d_t_c_p_vec', 'hfmm2d_t_c_g_vec', 'hfmm2d_t_d_p_vec', 'hfmm2d_t_d_g_vec', 'hfmm2d_t_cd_p_vec', 'hfmm2d_t_cd_g_vec', 'hfmm2d_st_c_p_vec', 'hfmm2d_st_c_g_vec', 'hfmm2d_st_d_p_vec', 'hfmm2d_st_d_g_vec', 'hfmm2d_st_cd_p_vec', 'hfmm2d_st_cd_g_vec', 'h2d_directcp', 'h2d_directcg', 'h2d_directdp', 'h2d_directdg', 'h2d_directcdp', 'h2d_directcdg', ':']
        INFO:   adding 'build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c' to sources.
        INFO:   adding 'build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy' to include_dirs.
        INFO:   adding 'build/src.linux-x86_64-3.10/fmm2dpy/hfmm2d_fortran-f2pywrappers.f' to sources.
        INFO: building extension "fmm2dpy.lfmm2d_fortran" sources
        INFO: f2py options: ['only:', 'rfmm2d_s_c_p', 'lfmm2d_s_c_p', 'cfmm2d_s_c_p', 'rfmm2d_s_c_g', 'lfmm2d_s_c_g', 'cfmm2d_s_c_g', 'rfmm2d_s_c_h', 'lfmm2d_s_c_h', 'cfmm2d_s_c_h', 'rfmm2d_s_d_p', 'lfmm2d_s_d_p', 'cfmm2d_s_d_p', 'rfmm2d_s_d_g', 'lfmm2d_s_d_g', 'cfmm2d_s_d_g', 'rfmm2d_s_d_h', 'lfmm2d_s_d_h', 'cfmm2d_s_d_h', 'rfmm2d_s_cd_p', 'lfmm2d_s_cd_p', 'cfmm2d_s_cd_p', 'rfmm2d_s_cd_g', 'lfmm2d_s_cd_g', 'cfmm2d_s_cd_g', 'rfmm2d_s_cd_h', 'lfmm2d_s_cd_h', 'cfmm2d_s_cd_h', 'rfmm2d_t_c_p', 'lfmm2d_t_c_p', 'cfmm2d_t_c_p', 'rfmm2d_t_c_g', 'lfmm2d_t_c_g', 'cfmm2d_t_c_g', 'rfmm2d_t_c_h', 'lfmm2d_t_c_h', 'cfmm2d_t_c_h', 'rfmm2d_t_d_p', 'lfmm2d_t_d_p', 'cfmm2d_t_d_p', 'rfmm2d_t_d_g', 'lfmm2d_t_d_g', 'cfmm2d_t_d_g', 'rfmm2d_t_d_h', 'lfmm2d_t_d_h', 'cfmm2d_t_d_h', 'rfmm2d_t_cd_p', 'lfmm2d_t_cd_p', 'cfmm2d_t_cd_p', 'rfmm2d_t_cd_g', 'lfmm2d_t_cd_g', 'cfmm2d_t_cd_g', 'rfmm2d_t_cd_h', 'lfmm2d_t_cd_h', 'cfmm2d_t_cd_h', 'rfmm2d_st_c_p', 'lfmm2d_st_c_p', 'cfmm2d_st_c_p', 'rfmm2d_st_c_g', 'lfmm2d_st_c_g', 'cfmm2d_st_c_g', 'rfmm2d_st_c_h', 'lfmm2d_st_c_h', 'cfmm2d_st_c_h', 'rfmm2d_st_d_p', 'lfmm2d_st_d_p', 'cfmm2d_st_d_p', 'rfmm2d_st_d_g', 'lfmm2d_st_d_g', 'cfmm2d_st_d_g', 'rfmm2d_st_d_h', 'lfmm2d_st_d_h', 'cfmm2d_st_d_h', 'rfmm2d_st_cd_p', 'lfmm2d_st_cd_p', 'cfmm2d_st_cd_p', 'rfmm2d_st_cd_g', 'lfmm2d_st_cd_g', 'cfmm2d_st_cd_g', 'rfmm2d_st_cd_h', 'lfmm2d_st_cd_h', 'cfmm2d_st_cd_h', 'rfmm2d_s_c_p_vec', 'lfmm2d_s_c_p_vec', 'cfmm2d_s_c_p_vec', 'rfmm2d_s_c_g_vec', 'lfmm2d_s_c_g_vec', 'cfmm2d_s_c_g_vec', 'rfmm2d_s_c_h_vec', 'lfmm2d_s_c_h_vec', 'cfmm2d_s_c_h_vec', 'rfmm2d_s_d_p_vec', 'lfmm2d_s_d_p_vec', 'cfmm2d_s_d_p_vec', 'rfmm2d_s_d_g_vec', 'lfmm2d_s_d_g_vec', 'cfmm2d_s_d_g_vec', 'rfmm2d_s_d_h_vec', 'lfmm2d_s_d_h_vec', 'cfmm2d_s_d_h_vec', 'rfmm2d_s_cd_p_vec', 'lfmm2d_s_cd_p_vec', 'cfmm2d_s_cd_p_vec', 'rfmm2d_s_cd_g_vec', 'lfmm2d_s_cd_g_vec', 'cfmm2d_s_cd_g_vec', 'rfmm2d_s_cd_h_vec', 'lfmm2d_s_cd_h_vec', 'cfmm2d_s_cd_h_vec', 'rfmm2d_t_c_p_vec', 'lfmm2d_t_c_p_vec', 'cfmm2d_t_c_p_vec', 'rfmm2d_t_c_g_vec', 'lfmm2d_t_c_g_vec', 'cfmm2d_t_c_g_vec', 'rfmm2d_t_c_h_vec', 'lfmm2d_t_c_h_vec', 'cfmm2d_t_c_h_vec', 'rfmm2d_t_d_p_vec', 'lfmm2d_t_d_p_vec', 'cfmm2d_t_d_p_vec', 'rfmm2d_t_d_g_vec', 'lfmm2d_t_d_g_vec', 'cfmm2d_t_d_g_vec', 'rfmm2d_t_d_h_vec', 'lfmm2d_t_d_h_vec', 'cfmm2d_t_d_h_vec', 'rfmm2d_t_cd_p_vec', 'lfmm2d_t_cd_p_vec', 'cfmm2d_t_cd_p_vec', 'rfmm2d_t_cd_g_vec', 'lfmm2d_t_cd_g_vec', 'cfmm2d_t_cd_g_vec', 'rfmm2d_t_cd_h_vec', 'lfmm2d_t_cd_h_vec', 'cfmm2d_t_cd_h_vec', 'rfmm2d_st_c_p_vec', 'lfmm2d_st_c_p_vec', 'cfmm2d_st_c_p_vec', 'rfmm2d_st_c_g_vec', 'lfmm2d_st_c_g_vec', 'cfmm2d_st_c_g_vec', 'rfmm2d_st_c_h_vec', 'lfmm2d_st_c_h_vec', 'cfmm2d_st_c_h_vec', 'rfmm2d_st_d_p_vec', 'lfmm2d_st_d_p_vec', 'cfmm2d_st_d_p_vec', 'rfmm2d_st_d_g_vec', 'lfmm2d_st_d_g_vec', 'cfmm2d_st_d_g_vec', 'rfmm2d_st_d_h_vec', 'lfmm2d_st_d_h_vec', 'cfmm2d_st_d_h_vec', 'rfmm2d_st_cd_p_vec', 'lfmm2d_st_cd_p_vec', 'cfmm2d_st_cd_p_vec', 'rfmm2d_st_cd_g_vec', 'lfmm2d_st_cd_g_vec', 'cfmm2d_st_cd_g_vec', 'rfmm2d_st_cd_h_vec', 'lfmm2d_st_cd_h_vec', 'cfmm2d_st_cd_h_vec', 'r2d_directcp', 'l2d_directcp', 'c2d_directcp', 'r2d_directcg', 'l2d_directcg', 'c2d_directcg', 'r2d_directch', 'l2d_directch', 'c2d_directch', 'r2d_directdp', 'l2d_directdp', 'c2d_directdp', 'r2d_directdg', 'l2d_directdg', 'c2d_directdg', 'r2d_directdh', 'l2d_directdh', 'c2d_directdh', 'r2d_directcdp', 'l2d_directcdp', 'c2d_directcdp', 'r2d_directcdg', 'l2d_directcdg', 'c2d_directcdg', 'r2d_directcdh', 'l2d_directcdh', 'c2d_directcdh', ':']
        INFO:   adding 'build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c' to sources.
        INFO:   adding 'build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy' to include_dirs.
        INFO:   adding 'build/src.linux-x86_64-3.10/fmm2dpy/lfmm2d_fortran-f2pywrappers.f' to sources.
        INFO: building extension "fmm2dpy.bhfmm2d_fortran" sources
        INFO: f2py options: ['only:', 'bhfmm2d', 'bh2d_directcp', 'bh2d_directcg', 'bh2d_directdp', 'bh2d_directdg', 'bh2d_directcdp', 'bh2d_directcdg', ':']
        INFO:   adding 'build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c' to sources.
        INFO:   adding 'build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy' to include_dirs.
        INFO:   adding 'build/src.linux-x86_64-3.10/fmm2dpy/bhfmm2d_fortran-f2pywrappers.f' to sources.
        INFO: build_src: building npy-pkg config files
        writing fmm2dpy.egg-info/PKG-INFO
        writing dependency_links to fmm2dpy.egg-info/dependency_links.txt
        writing requirements to fmm2dpy.egg-info/requires.txt
        writing top-level names to fmm2dpy.egg-info/top_level.txt
        /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/setuptools/command/egg_info.py:643: SetuptoolsDeprecationWarning: Custom 'build_py' does not implement 'get_data_files_without_manifest'.
        Please extend command classes from setuptools instead of distutils.
          warnings.warn(
        INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
        INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options
        reading manifest file 'fmm2dpy.egg-info/SOURCES.txt'
        writing manifest file 'fmm2dpy.egg-info/SOURCES.txt'
        running build_ext
        INFO: customize UnixCCompiler
        INFO: customize UnixCCompiler using build_ext
        INFO: CCompilerOpt.__init__[813] : load cache from file -> /home/hw1927/pkg/fmm2d/python/build/temp.linux-x86_64-cpython-310/ccompiler_opt_cache_ext.py
        INFO: CCompilerOpt.__init__[824] : hit the file cache
        INFO: get_default_fcompiler: matching types: '['arm', 'gnu95', 'intel', 'lahey', 'pg', 'nv', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor', 'fujitsu']'
        INFO: customize ArmFlangCompiler
        WARN: Could not locate executable armflang
        INFO: customize Gnu95FCompiler
        INFO: Found executable /usr/bin/gfortran
        INFO: customize Gnu95FCompiler
        INFO: customize Gnu95FCompiler using build_ext
        INFO: building 'fmm2dpy.hfmm2d_fortran' extension
        INFO: compiling C sources
        INFO: C compiler: gcc -pthread -B /home/hw1927/miniconda3/envs/bim/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/hw1927/miniconda3/envs/bim/include -fPIC -O2 -isystem /home/hw1927/miniconda3/envs/bim/include -fPIC
        
        INFO: compile options: '-Ibuild/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy -I/home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.10/numpy/distutils/include -I/home/hw1927/miniconda3/envs/bim/include/python3.10 -I/home/hw1927/miniconda3/envs/bim/include/python3.10 -c'
        extra options: '-msse -msse2 -msse3'
        INFO: gcc: build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c
        In file included from /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948:0,
                         from /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                         from /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                         from build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.h:13,
                         from build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c:2:
        /home/hw1927/miniconda3/envs/bim/lib/python3.10/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]
         #warning "Using deprecated NumPy API, disable it with " \
          ^
        build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c: In function ‘find_first_negative_dimension’:
        build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c:707:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
             for (int i = 0; i < rank; ++i) {
             ^
        build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c:707:5: note: use option -std=c99 or -std=gnu99 to compile your code
        error: Command "gcc -pthread -B /home/hw1927/miniconda3/envs/bim/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/hw1927/miniconda3/envs/bim/include -fPIC -O2 -isystem /home/hw1927/miniconda3/envs/bim/include -fPIC -Ibuild/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy -I/home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.10/numpy/distutils/include -I/home/hw1927/miniconda3/envs/bim/include/python3.10 -I/home/hw1927/miniconda3/envs/bim/include/python3.10 -c build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c -o build/temp.linux-x86_64-cpython-310/build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.o -MMD -MF build/temp.linux-x86_64-cpython-310/build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.o.d -msse -msse2 -msse3" failed with exit status 1
        INFO:
        ########### EXT COMPILER OPTIMIZATION ###########
        INFO: Platform      :
          Architecture: x64
          Compiler    : gcc
        
        CPU baseline  :
          Requested   : 'min'
          Enabled     : SSE SSE2 SSE3
          Flags       : -msse -msse2 -msse3
          Extra checks: none
        
        CPU dispatch  :
          Requested   : 'max -xop -fma4'
          Enabled     : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2
          Generated   : none
        INFO: CCompilerOpt.cache_flush[857] : write cache to path -> /home/hw1927/pkg/fmm2d/python/build/temp.linux-x86_64-cpython-310/ccompiler_opt_cache_ext.py
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [97 lines of output]
    /home/hw1927/pkg/fmm2d/python/setup.py:4: DeprecationWarning:
    
      `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
      of the deprecation of `distutils` itself. It will be removed for
      Python >= 3.12. For older Python versions it will remain present.
      It is recommended to use `setuptools < 60.0` for those Python versions.
      For more details, see:
        https://numpy.org/devdocs/reference/distutils_status_migration.html
    
    
      from numpy.distutils.core import setup
    running develop
    /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running build_scripts
    running egg_info
    running build_src
    INFO: build_src
    INFO: building extension "fmm2dpy.hfmm2d_fortran" sources
    INFO: f2py options: ['only:', 'hfmm2d_s_c_p', 'hfmm2d_s_c_g', 'hfmm2d_s_d_p', 'hfmm2d_s_d_g', 'hfmm2d_s_cd_p', 'hfmm2d_s_cd_g', 'hfmm2d_t_c_p', 'hfmm2d_t_c_g', 'hfmm2d_t_d_p', 'hfmm2d_t_d_g', 'hfmm2d_t_cd_p', 'hfmm2d_t_cd_g', 'hfmm2d_st_c_p', 'hfmm2d_st_c_g', 'hfmm2d_st_d_p', 'hfmm2d_st_d_g', 'hfmm2d_st_cd_p', 'hfmm2d_st_cd_g', 'hfmm2d_s_c_p_vec', 'hfmm2d_s_c_g_vec', 'hfmm2d_s_d_p_vec', 'hfmm2d_s_d_g_vec', 'hfmm2d_s_cd_p_vec', 'hfmm2d_s_cd_g_vec', 'hfmm2d_t_c_p_vec', 'hfmm2d_t_c_g_vec', 'hfmm2d_t_d_p_vec', 'hfmm2d_t_d_g_vec', 'hfmm2d_t_cd_p_vec', 'hfmm2d_t_cd_g_vec', 'hfmm2d_st_c_p_vec', 'hfmm2d_st_c_g_vec', 'hfmm2d_st_d_p_vec', 'hfmm2d_st_d_g_vec', 'hfmm2d_st_cd_p_vec', 'hfmm2d_st_cd_g_vec', 'h2d_directcp', 'h2d_directcg', 'h2d_directdp', 'h2d_directdg', 'h2d_directcdp', 'h2d_directcdg', ':']
    INFO:   adding 'build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c' to sources.
    INFO:   adding 'build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy' to include_dirs.
    INFO:   adding 'build/src.linux-x86_64-3.10/fmm2dpy/hfmm2d_fortran-f2pywrappers.f' to sources.
    INFO: building extension "fmm2dpy.lfmm2d_fortran" sources
    INFO: f2py options: ['only:', 'rfmm2d_s_c_p', 'lfmm2d_s_c_p', 'cfmm2d_s_c_p', 'rfmm2d_s_c_g', 'lfmm2d_s_c_g', 'cfmm2d_s_c_g', 'rfmm2d_s_c_h', 'lfmm2d_s_c_h', 'cfmm2d_s_c_h', 'rfmm2d_s_d_p', 'lfmm2d_s_d_p', 'cfmm2d_s_d_p', 'rfmm2d_s_d_g', 'lfmm2d_s_d_g', 'cfmm2d_s_d_g', 'rfmm2d_s_d_h', 'lfmm2d_s_d_h', 'cfmm2d_s_d_h', 'rfmm2d_s_cd_p', 'lfmm2d_s_cd_p', 'cfmm2d_s_cd_p', 'rfmm2d_s_cd_g', 'lfmm2d_s_cd_g', 'cfmm2d_s_cd_g', 'rfmm2d_s_cd_h', 'lfmm2d_s_cd_h', 'cfmm2d_s_cd_h', 'rfmm2d_t_c_p', 'lfmm2d_t_c_p', 'cfmm2d_t_c_p', 'rfmm2d_t_c_g', 'lfmm2d_t_c_g', 'cfmm2d_t_c_g', 'rfmm2d_t_c_h', 'lfmm2d_t_c_h', 'cfmm2d_t_c_h', 'rfmm2d_t_d_p', 'lfmm2d_t_d_p', 'cfmm2d_t_d_p', 'rfmm2d_t_d_g', 'lfmm2d_t_d_g', 'cfmm2d_t_d_g', 'rfmm2d_t_d_h', 'lfmm2d_t_d_h', 'cfmm2d_t_d_h', 'rfmm2d_t_cd_p', 'lfmm2d_t_cd_p', 'cfmm2d_t_cd_p', 'rfmm2d_t_cd_g', 'lfmm2d_t_cd_g', 'cfmm2d_t_cd_g', 'rfmm2d_t_cd_h', 'lfmm2d_t_cd_h', 'cfmm2d_t_cd_h', 'rfmm2d_st_c_p', 'lfmm2d_st_c_p', 'cfmm2d_st_c_p', 'rfmm2d_st_c_g', 'lfmm2d_st_c_g', 'cfmm2d_st_c_g', 'rfmm2d_st_c_h', 'lfmm2d_st_c_h', 'cfmm2d_st_c_h', 'rfmm2d_st_d_p', 'lfmm2d_st_d_p', 'cfmm2d_st_d_p', 'rfmm2d_st_d_g', 'lfmm2d_st_d_g', 'cfmm2d_st_d_g', 'rfmm2d_st_d_h', 'lfmm2d_st_d_h', 'cfmm2d_st_d_h', 'rfmm2d_st_cd_p', 'lfmm2d_st_cd_p', 'cfmm2d_st_cd_p', 'rfmm2d_st_cd_g', 'lfmm2d_st_cd_g', 'cfmm2d_st_cd_g', 'rfmm2d_st_cd_h', 'lfmm2d_st_cd_h', 'cfmm2d_st_cd_h', 'rfmm2d_s_c_p_vec', 'lfmm2d_s_c_p_vec', 'cfmm2d_s_c_p_vec', 'rfmm2d_s_c_g_vec', 'lfmm2d_s_c_g_vec', 'cfmm2d_s_c_g_vec', 'rfmm2d_s_c_h_vec', 'lfmm2d_s_c_h_vec', 'cfmm2d_s_c_h_vec', 'rfmm2d_s_d_p_vec', 'lfmm2d_s_d_p_vec', 'cfmm2d_s_d_p_vec', 'rfmm2d_s_d_g_vec', 'lfmm2d_s_d_g_vec', 'cfmm2d_s_d_g_vec', 'rfmm2d_s_d_h_vec', 'lfmm2d_s_d_h_vec', 'cfmm2d_s_d_h_vec', 'rfmm2d_s_cd_p_vec', 'lfmm2d_s_cd_p_vec', 'cfmm2d_s_cd_p_vec', 'rfmm2d_s_cd_g_vec', 'lfmm2d_s_cd_g_vec', 'cfmm2d_s_cd_g_vec', 'rfmm2d_s_cd_h_vec', 'lfmm2d_s_cd_h_vec', 'cfmm2d_s_cd_h_vec', 'rfmm2d_t_c_p_vec', 'lfmm2d_t_c_p_vec', 'cfmm2d_t_c_p_vec', 'rfmm2d_t_c_g_vec', 'lfmm2d_t_c_g_vec', 'cfmm2d_t_c_g_vec', 'rfmm2d_t_c_h_vec', 'lfmm2d_t_c_h_vec', 'cfmm2d_t_c_h_vec', 'rfmm2d_t_d_p_vec', 'lfmm2d_t_d_p_vec', 'cfmm2d_t_d_p_vec', 'rfmm2d_t_d_g_vec', 'lfmm2d_t_d_g_vec', 'cfmm2d_t_d_g_vec', 'rfmm2d_t_d_h_vec', 'lfmm2d_t_d_h_vec', 'cfmm2d_t_d_h_vec', 'rfmm2d_t_cd_p_vec', 'lfmm2d_t_cd_p_vec', 'cfmm2d_t_cd_p_vec', 'rfmm2d_t_cd_g_vec', 'lfmm2d_t_cd_g_vec', 'cfmm2d_t_cd_g_vec', 'rfmm2d_t_cd_h_vec', 'lfmm2d_t_cd_h_vec', 'cfmm2d_t_cd_h_vec', 'rfmm2d_st_c_p_vec', 'lfmm2d_st_c_p_vec', 'cfmm2d_st_c_p_vec', 'rfmm2d_st_c_g_vec', 'lfmm2d_st_c_g_vec', 'cfmm2d_st_c_g_vec', 'rfmm2d_st_c_h_vec', 'lfmm2d_st_c_h_vec', 'cfmm2d_st_c_h_vec', 'rfmm2d_st_d_p_vec', 'lfmm2d_st_d_p_vec', 'cfmm2d_st_d_p_vec', 'rfmm2d_st_d_g_vec', 'lfmm2d_st_d_g_vec', 'cfmm2d_st_d_g_vec', 'rfmm2d_st_d_h_vec', 'lfmm2d_st_d_h_vec', 'cfmm2d_st_d_h_vec', 'rfmm2d_st_cd_p_vec', 'lfmm2d_st_cd_p_vec', 'cfmm2d_st_cd_p_vec', 'rfmm2d_st_cd_g_vec', 'lfmm2d_st_cd_g_vec', 'cfmm2d_st_cd_g_vec', 'rfmm2d_st_cd_h_vec', 'lfmm2d_st_cd_h_vec', 'cfmm2d_st_cd_h_vec', 'r2d_directcp', 'l2d_directcp', 'c2d_directcp', 'r2d_directcg', 'l2d_directcg', 'c2d_directcg', 'r2d_directch', 'l2d_directch', 'c2d_directch', 'r2d_directdp', 'l2d_directdp', 'c2d_directdp', 'r2d_directdg', 'l2d_directdg', 'c2d_directdg', 'r2d_directdh', 'l2d_directdh', 'c2d_directdh', 'r2d_directcdp', 'l2d_directcdp', 'c2d_directcdp', 'r2d_directcdg', 'l2d_directcdg', 'c2d_directcdg', 'r2d_directcdh', 'l2d_directcdh', 'c2d_directcdh', ':']
    INFO:   adding 'build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c' to sources.
    INFO:   adding 'build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy' to include_dirs.
    INFO:   adding 'build/src.linux-x86_64-3.10/fmm2dpy/lfmm2d_fortran-f2pywrappers.f' to sources.
    INFO: building extension "fmm2dpy.bhfmm2d_fortran" sources
    INFO: f2py options: ['only:', 'bhfmm2d', 'bh2d_directcp', 'bh2d_directcg', 'bh2d_directdp', 'bh2d_directdg', 'bh2d_directcdp', 'bh2d_directcdg', ':']
    INFO:   adding 'build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c' to sources.
    INFO:   adding 'build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy' to include_dirs.
    INFO:   adding 'build/src.linux-x86_64-3.10/fmm2dpy/bhfmm2d_fortran-f2pywrappers.f' to sources.
    INFO: build_src: building npy-pkg config files
    writing fmm2dpy.egg-info/PKG-INFO
    writing dependency_links to fmm2dpy.egg-info/dependency_links.txt
    writing requirements to fmm2dpy.egg-info/requires.txt
    writing top-level names to fmm2dpy.egg-info/top_level.txt
    /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/setuptools/command/egg_info.py:643: SetuptoolsDeprecationWarning: Custom 'build_py' does not implement 'get_data_files_without_manifest'.
    Please extend command classes from setuptools instead of distutils.
      warnings.warn(
    INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
    INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options
    reading manifest file 'fmm2dpy.egg-info/SOURCES.txt'
    writing manifest file 'fmm2dpy.egg-info/SOURCES.txt'
    running build_ext
    INFO: customize UnixCCompiler
    INFO: customize UnixCCompiler using build_ext
    INFO: CCompilerOpt.__init__[813] : load cache from file -> /home/hw1927/pkg/fmm2d/python/build/temp.linux-x86_64-cpython-310/ccompiler_opt_cache_ext.py
    INFO: CCompilerOpt.__init__[824] : hit the file cache
    INFO: get_default_fcompiler: matching types: '['arm', 'gnu95', 'intel', 'lahey', 'pg', 'nv', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor', 'fujitsu']'
    INFO: customize ArmFlangCompiler
    WARN: Could not locate executable armflang
    INFO: customize Gnu95FCompiler
    INFO: Found executable /usr/bin/gfortran
    INFO: customize Gnu95FCompiler
    INFO: customize Gnu95FCompiler using build_ext
    INFO: building 'fmm2dpy.hfmm2d_fortran' extension
    INFO: compiling C sources
    INFO: C compiler: gcc -pthread -B /home/hw1927/miniconda3/envs/bim/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/hw1927/miniconda3/envs/bim/include -fPIC -O2 -isystem /home/hw1927/miniconda3/envs/bim/include -fPIC
    
    INFO: compile options: '-Ibuild/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy -I/home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.10/numpy/distutils/include -I/home/hw1927/miniconda3/envs/bim/include/python3.10 -I/home/hw1927/miniconda3/envs/bim/include/python3.10 -c'
    extra options: '-msse -msse2 -msse3'
    INFO: gcc: build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c
    In file included from /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948:0,
                     from /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                     from build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.h:13,
                     from build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c:2:
    /home/hw1927/miniconda3/envs/bim/lib/python3.10/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]
     #warning "Using deprecated NumPy API, disable it with " \
      ^
    build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c: In function ‘find_first_negative_dimension’:
    build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c:707:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
         for (int i = 0; i < rank; ++i) {
         ^
    build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c:707:5: note: use option -std=c99 or -std=gnu99 to compile your code
    error: Command "gcc -pthread -B /home/hw1927/miniconda3/envs/bim/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/hw1927/miniconda3/envs/bim/include -fPIC -O2 -isystem /home/hw1927/miniconda3/envs/bim/include -fPIC -Ibuild/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy -I/home/hw1927/miniconda3/envs/bim/lib/python3.10/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.10/numpy/distutils/include -I/home/hw1927/miniconda3/envs/bim/include/python3.10 -I/home/hw1927/miniconda3/envs/bim/include/python3.10 -c build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.c -o build/temp.linux-x86_64-cpython-310/build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.o -MMD -MF build/temp.linux-x86_64-cpython-310/build/src.linux-x86_64-3.10/build/src.linux-x86_64-3.10/fmm2dpy/fortranobject.o.d -msse -msse2 -msse3" failed with exit status 1
    INFO:
    ########### EXT COMPILER OPTIMIZATION ###########
    INFO: Platform      :
      Architecture: x64
      Compiler    : gcc
    
    CPU baseline  :
      Requested   : 'min'
      Enabled     : SSE SSE2 SSE3
      Flags       : -msse -msse2 -msse3
      Extra checks: none
    
    CPU dispatch  :
      Requested   : 'max -xop -fma4'
      Enabled     : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2
      Generated   : none
    INFO: CCompilerOpt.cache_flush[857] : write cache to path -> /home/hw1927/pkg/fmm2d/python/build/temp.linux-x86_64-cpython-310/ccompiler_opt_cache_ext.py
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
make: *** [python] Error 1

"make python" is broken

The Python interface fails to build with make python. This can be fixed by deleting the pyproject.toml file, or by adding setuptools to pyproject.toml and removing the -e flag from pip install in the Makefile.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.