Giter Club home page Giter Club logo

flatironinstitute / fmm3d Goto Github PK

View Code? Open in Web Editor NEW
85.0 20.0 34.0 22.28 MB

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 three dimensions, on a multi-core shared-memory machine.

Home Page: https://fmm3d.readthedocs.io

License: Other

Fortran 73.54% Makefile 0.47% Python 1.37% C 5.91% C++ 15.23% Shell 0.01% MATLAB 1.69% Gnuplot 0.01% Julia 0.98% Jinja 0.79%

fmm3d's Introduction

Flatiron Institute Fast Multipole Libraries

Actions status

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

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

fmm3d's People

Contributors

ahbarnett avatar askhamwhat avatar coffee-addict avatar dmalhotra avatar guilhermebs avatar imanhosseini avatar lgreengard avatar lu1and10 avatar lulibin avatar magland avatar mrachh avatar oneilm avatar skailasa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fmm3d's Issues

ldc and nterms arguments used in Laplace translation operator

When we are implementing Laplace FMM mps, we may need to call L2L operator translating from high order local expansion to a low order local expansion if the input expansion order from the user is lower than the expansion order we used inside FMM algorithm. For example, in the local to center step as in,

The current l3dlocloc produces high error with the following test,

The above test passes if we make the following changes,

There are still some arguments differences between h3d translation operators and l3d translation operators when calling rotation subroutines, e.g., Lines

and

I may need @mrachh to confirm and help to make the l3d and h3d translation operators more consistent when calling rotation subroutines.

Helmholtz FMM inaccurate when Re(zk)<0

Hi folks,

I was in MATLAB testing hfmm3d with a negative wavenumber zk<0 (see code below), but keep getting only ~2 digits when using a moderate tolerance (e.g. 1e-6). (The original goal was to do fast adjoint mat-vec.)

Here is some more info:

  1. Tests would fail when Re(zk)<0
  2. However, can get full 15 digits once the number of sources ns is small enough (e.g. ns=1000)
  3. Can also get 15 digits once tolerance tol is small enough (e.g. tol=1e-12)

So I am getting either 2 digits or 15 digits. Could you confirm if this is a bug or am I doing something wrong here?

Thanks,
Bobbie

ns = 4000;
srcinfo.sources = rand(3,ns);
srcinfo.charges = rand(1,ns)+1i*rand(1,ns);
stmp = srcinfo.sources;
pg = 1;

zk = complex(-1.1);
tol = 1e-6;

fprintf('Re(zk) = %.1f\ntol = %.1e\n',real(zk),tol)

U1 = hfmm3d(tol,zk,srcinfo,pg);
U2 = h3ddir(zk,srcinfo,stmp,pg);
U2.pot = U2.pottarg;
err = norm(U1.pot-U2.pot)/norm(U2.pot);
if err<tol, fprintf('Test successful, '), 
else, fprintf('Test failed, '); end
fprintf('err = %.2e\n',err);

stack size linker options on MacOS

For larger multicore problems, my experience has been that the stack size needs to be set as a linker option on MacOS (since the stack size cannot be set to unlimited in the terminal on MacOS). For example, with the flag:

-Wl,-stack_size,0x40000000

This requires changing the macos .inc file, or adding an LDFLAGS variable. Or is this not necessary using the current make file configuration?

Inclusion of mex binaries?

Several mex binaries are under version control. A failed "make mex" causes them to be deleted, and not rebuilt. Suggestion: remove all binaries from version control.

Add option to compile package for Octave

Octave is able to compile mex files using the command mkoctfile --mex doc.
To use it you don't need to modify the makefile, simply change MEX=mex to mkoctfile --mex.
Tested on openSuse Tumbleweed, all the test pass runnin octave test_*.

Maybe a maintainer could add a comment to the user manual or a makefile option. I would do it myself, but I'm not familiar with the make syntax.
Dependancies:

  • octave
  • octave-devel

Problem with pypi repo

There seems to be a problem with pip installation since a short time.

I used to be able to install fmm3dpy in a conda environment without problem on any platform with the following commands:

conda create -n test
conda activate test
conda install pip
pip install fmm3dpy

Since last, week it seems like fmm3dpy is not available through PyPi anymore.
Indeed, I am now getting this message:

ERROR: Could not find a version that satisfies the requirement fmm3dpy (from versions: none)
ERROR: No matching distribution found for fmm3dpy

This happens on Windows PowerShell, Linux and MacOS terminals.

Did anything happen with the PyPi repo in the last few weeks or months?

I can still see the project here.

Small typo in makefile io

Hi everybody,

I have compiled the library myself for the first time this week. Great work!

I am not sure, not a native English speaker, but I think this information to the user about the use of the makefile:

FMM3D/makefile

Line 177 in e42473a

@echo " 'make [task] FAST_KER=ON' for using vectorized kernel evaluation and multi-threaded (needs c++)"

should say something like:

"...for using vectorized kernel and multi-threaded evaluation"
"...for using vectorized kernel evaluation and multi-threading"

Best regards from Germany,
Paul

Wheel for python 3.9

Would it be possible to publish a wheel for python 3.9? at the moment it errors out with

ERROR: Could not find a version that satisfies the requirement fmm3dpy (from versions: none)

when trying to pip install.

Thank you

Plans on GPU implementations?

Hello
I was curious if there are any roadmap or plans on a GPU implementation of this algorithm?
Thank you for the wonderful project!

Issue running Python code in Windows

Upon attempting to run "lfmm3d_example.py", I am presented with the error "ImportError: cannot import name 'hfmm3d_fortran' from partially initialized module 'fmm3dpy'". ('lfmm3d_fortran', etc., also have errors).

However, the tests during installation functioned as intended, and both "lfmm_test.py" and "hfmm_test.py" ran without this error and displayed "all lfmm/hfmm tests succeeded".

I am confused about what the issue is with running "lfmm3d_example.py" (and other programs that import fmm3dpy), because "lfmm_test.py" imports the same modules but does not encounter any issues. Could you please help me figure out what is wrong?

Package does not work with Python >3.10

I have tried to pip install this package on different virtual envs and I have no problem for Python 3.6, 3.8 or 3.9 but I can't get it to work with Python 3.10 or 3.11.

No matching distribution is found for it.

My pip version is 22.3.1

I have cloned the git repo on my machine and ran the tests with 'make test' and everything worked very well (6/6 tests worked), even with Python 3.10. It seems to me that only getting the package from pipy is the issue.

Thank you very much.

Periodic BC

Is it possible to use this library to calculate short-ranged potentials in periodic geometries or is it aimed primarily towards open systems? According to the description in this thesis the FMM can be modified also for periodic BCs.

Updating Julia binaries

Hello,

Is there any plan to update the Julia binaries to run on the M1 chip?

Cheers,
Mikkel

windows issue

cp: 'lib/libfmm3d_dll.lib' and 'C:lib/libfmm3d_dll.lib' are the same file
make: *** [makefile:214: install] Error 1

make python and pip install fail on MacOS

Hi

I am unable to install python wrappers. I have tried several things

  • pip install:

Running the command pip install fmm3dpy gives

ERROR: Could not find a version that satisfies the requirement fmm3dpy (from versions: none)
ERROR: No matching distribution found for fmm3dpy
  • make python:

Following the instructions on the website, I ran make install and successfully installed FMM3D. I then tried make python but i get the following

ERROR: Exception:
Traceback (most recent call last):
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 377, in run
    requirement_set = resolver.resolve(
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 73, in resolve
    collected = self.factory.collect_root_requirements(root_reqs)
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 491, in collect_root_requirements
    req = self._make_requirement_from_install_req(
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 453, in _make_requirement_from_install_req
    cand = self._make_candidate_from_link(
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 185, in _make_candidate_from_link
    self._editable_candidate_cache[link] = EditableCandidate(
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 318, in __init__
    super().__init__(
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
    self.dist = self._prepare()
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare
    dist = self._prepare_distribution()
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 328, in _prepare_distribution
    return self._factory.preparer.prepare_editable_requirement(self._ireq)
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 709, in prepare_editable_requirement
    dist = _get_prepared_distribution(
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 69, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/distributions/sdist.py", line 46, in prepare_distribution_metadata
    self.req.isolated_editable_sanity_check()
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 528, in isolated_editable_sanity_check
    and not self.supports_pyproject_editable()
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 243, in supports_pyproject_editable
    return "build_editable" in self.pep517_backend._supported_features()
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 153, in _supported_features
    return self._call_hook('_supported_features', {})
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 321, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
  File "/Users/silves28/anaconda3/envs/sarkas/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'

However, setuptools is already installed, version 68.0.0

I am using Python 3.9.17 and pip 23.2.1,
System:
Chip: Apple M2 Max
MacOS: ventura 13.4

Thanks for your help

Issue making python on Windows

Hi,
I met the error that C:lib/ was not a directory and by running the make command through Git bash, it really worked.
When I execute make python in Git bash, the error is as follows:

    gfortran.exe:f77: ../src/Helmholtz/hfmm3dwrap.f
    gfortran.exe:f77: ../src/Helmholtz/helmkernels.f
    gfortran.exe:f77: ../src/Helmholtz/hfmm3dwrap_vec.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]
    C:\mingw64\bin\gfortran.exe -Wall -g -Wall -g -shared C:\FMM3D-1.0.1\python\build\temp.win-amd64-cpython-38\Release\FMM3D-1.0.1\src\Helmholtz\hfmm3dwrap.o C:\FMM3D-1.0.1\python\build\temp.win-amd64-cpython-38\Release\FMM3D-1.0.1\src\Helmholtz\hfmm3dwrap_vec.o C:\FMM3D-1.0.1\python\build\temp.win-amd64-cpython-38\Release\FMM3D-1.0.1\src\Helmholtz\helmkernels.o -LC:\mingw64\lib\gcc\x86_64-w64-mingw32\12.2.0 -LC:\Users\xuan\AppData\Local\Programs\Python\Python38\libs -LC:\Users\xuan\AppData\Local\Programs\Python\Python38 -LC:\Users\xuan\AppData\Local\Programs\Python\Python38\PCbuild\amd64 -o build\temp.win-amd64-cpython-38\Release\.libs\libhfmm3dwr.PO2ZSNX7KZ4UQFXKYK5DBGLRDOIUFSX5.gfortran-win_amd64.dll -Wl,--allow-multiple-definition -Wl,--output-def,build\temp.win-amd64-cpython-38\Release\libhfmm3dwr.PO2ZSNX7KZ4UQFXKYK5DBGLRDOIUFSX5.gfortran-win_amd64.def -Wl,--export-all-symbols -Wl,--enable-auto-import -static -mlong-double-64
    C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\FMM3D-1.0.1\python\build\temp.win-amd64-cpython-38\Release\FMM3D-1.0.1\src\Helmholtz\hfmm3dwrap.o: in function `hfmm3d_s_c_p_':
    C:\FMM3D-1.0.1\python/../src/Helmholtz/hfmm3dwrap.f:199: undefined reference to `hfmm3d_'
    C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\FMM3D-1.0.1\python\build\temp.win-amd64-cpython-38\Release\FMM3D-1.0.1\src\Helmholtz\hfmm3dwrap.o: in function `hfmm3d_s_c_g_':
    C:\FMM3D-1.0.1\python/../src/Helmholtz/hfmm3dwrap.f:281: undefined reference to `hfmm3d_'
    C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\FMM3D-1.0.1\python\build\temp.win-amd64-cpython-38\Release\FMM3D-1.0.1\src\Helmholtz\hfmm3dwrap.o: in function `hfmm3d_s_d_p_':
    C:\FMM3D-1.0.1\python/../src/Helmholtz/hfmm3dwrap.f:365: undefined reference to `hfmm3d_'
    C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\FMM3D-1.0.1\python\build\temp.win-amd64-cpython-38\Release\FMM3D-1.0.1\src\Helmholtz\hfmm3dwrap.o: in function `hfmm3d_s_d_g_':
    C:\FMM3D-1.0.1\python/../src/Helmholtz/hfmm3dwrap.f:449: undefined reference to `hfmm3d_'
    C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\FMM3D-1.0.1\python\build\temp.win-amd64-cpython-38\Release\FMM3D-1.0.1\src\Helmholtz\hfmm3dwrap.o: in function `hfmm3d_s_cd_p_':
    C:\FMM3D-1.0.1\python/../src/Helmholtz/hfmm3dwrap.f:534: undefined reference to `hfmm3d_'
    C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\FMM3D-1.0.1\python\build\temp.win-amd64-cpython-38\Release\FMM3D-1.0.1\src\Helmholtz\hfmm3dwrap.o:C:\FMM3D-1.0.1\python/../src/Helmholtz/hfmm3dwrap.f:625: more undefined references to `hfmm3d_' follow
    collect2.exe: error: ld returned 1 exit status
  ...
    error: Command "C:\mingw64\bin\gfortran.exe -Wall -g -Wall -g -shared C:\FMM3D-1.0.1\python\build\temp.win-amd64-cpython-38\Release\FMM3D-1.0.1\src\Helmholtz\hfmm3dwrap.o C:\FMM3D-1.0.1\python\build\temp.win-amd64-cpython-38\Release\FMM3D-1.0.1\src\Helmholtz\hfmm3dwrap_vec.o C:\FMM3D-1.0.1\python\build\temp.win-amd64-cpython-38\Release\FMM3D-1.0.1\src\Helmholtz\helmkernels.o -LC:\mingw64\lib\gcc\x86_64-w64-mingw32\12.2.0 -LC:\Users\xuan\AppData\Local\Programs\Python\Python38\libs -LC:\Users\xuan\AppData\Local\Programs\Python\Python38 -LC:\Users\xuan\AppData\Local\Programs\Python\Python38\PCbuild\amd64 -o build\temp.win-amd64-cpython-38\Release\.libs\libhfmm3dwr.PO2ZSNX7KZ4UQFXKYK5DBGLRDOIUFSX5.gfortran-win_amd64.dll -Wl,--allow-multiple-definition -Wl,--output-def,build\temp.win-amd64-cpython-38\Release\libhfmm3dwr.PO2ZSNX7KZ4UQFXKYK5DBGLRDOIUFSX5.gfortran-win_amd64.def -Wl,--export-all-symbols -Wl,--enable-auto-import -static -mlong-double-64" failed with exit status 1
    error: subprocess-exited-with-error
    python setup.py develop did not run successfully.
    exit code: 1
    See above for output.

And then, python setup.py develop did not run successfully.
I have tried on my two PC, but both returned the same error.
OS: Windows10
Python version: 3.8.10

Issue installing on Windows

My supervisor and I have been trying to install FMM3D on Windows, we both had the same issue on different computers:

Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar) gfortran -fPIC -O3 -funroll-loops -std=legacy -fopenmp -c -o src/Laplace/lapkernels.o src/Laplace/lapkernels.f gfortran -fPIC -O3 -funroll-loops -std=legacy -fopenmp -c -o src/Laplace/lndiv.o src/Laplace/lndiv.f gfortran -fPIC -O3 -funroll-loops -std=legacy -fopenmp -c -o src/Stokes/stfmm3d.o src/Stokes/stfmm3d.f gfortran -fPIC -O3 -funroll-loops -std=legacy -fopenmp -c -o src/Stokes/stokkernels.o src/Stokes/stokkernels.f gfortran -c -fPIC -O3 -funroll-loops -std=legacy -fopenmp src/Maxwell/emfmm3d.f90 -o src/Maxwell/emfmm3d.o 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 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/hfmm3d_memest.o src/Helmholtz/hfmm3d_ndiv.o src/Helmholtz/helmkernels.o src/Helmholtz/hndiv.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/lfmm3d_ndiv.o src/Laplace/lapkernels.o src/Laplace/lndiv.o src/Stokes/stfmm3d.o src/Stokes/stokkernels.o src/Maxwell/emfmm3d.o mv libfmm3d.a lib-static/ process_begin: CreateProcess(NULL, mv libfmm3d.a lib-static/, ...) failed. make (e=2): The system cannot find the file specified. make: *** [makefile:215: libfmm3d.a] Error 2

I have tried multiple times, tried reinstalling Mingw-64 using the specified options on the readthedocs website, tried with elevated privileges in Windows PS and Command Prompt. None of these worked for me.

Is there anything else I can try? Or might there be a bug in the installation?

Windows matlab compile issue

Dear all,

when I compile the fmm3d to the mex file in matlab, here is an issue:

I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x3614): undefined reference to hndiv_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x5d61): undefined reference to hfmm3d_ndiv__'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x694b): undefined reference to h3ddirectcp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x73bb): undefined reference to h3ddirectdp_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x7fbc): undefined reference to h3ddirectcdp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x8b62): undefined reference to h3ddirectcg_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x97a2): undefined reference to h3ddirectdg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xa5c3): undefined reference to h3ddirectcdg_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xaee4): undefined reference to lndiv_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xd1ed): undefined reference to lfmm3d_ndiv__'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xdbd4): undefined reference to l3ddirectcp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xe484): undefined reference to l3ddirectdp_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xee61): undefined reference to l3ddirectcdp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xf89c): undefined reference to l3ddirectcg_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x1030c): undefined reference to l3ddirectdg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x10ebe): undefined reference to l3ddirectcdg_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x11a69): undefined reference to l3ddirectch_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x12639): undefined reference to l3ddirectdh_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x13395): undefined reference to l3ddirectcdh_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x14fc4): undefined reference to emfmm3d_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x16b1f): undefined reference to em3ddirect_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x184e7): undefined reference to stfmm3d_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x19239): undefined reference to
st3ddirectstokg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x1a1e6): undefined reference to st3ddirectstokstrsg_'
collect2.exe: error: ld returned 1 exit status

image
image

Could anyone help me ?

make python failed while using Intel OneAPI python

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.

Should zkfmm be used for h3dterms?

In

call h3dterms(boxsize(i),zkfmm,eps,nterms(i))

zkfmm = zk * b0 is passed for the h3dterms routine which I believe expects zk instead of zkfmm.
I believe so because in the h3dterms routine, the parameter is named zk and that value is multiplied by the
boxsize of the level, i.e. z1 at
z1 = (zk*size)*1.5d0

is equivalent to zk * boxsize(0) * boxsize(ilev) * 1.5 which I found rather odd.

cc @inducer

make lib fails on macOS

With the following in make.inc:


CC=gcc-9
CXX=g++-9
FC=gfortran-9
CFLAGS += -I src

OpenMP with gcc on OSX needs the following

OMPFLAGS = -fopenmp
OMPLIBS = -lgomp


Running "make lib" fails with many errors, the first of which is:


Undefined symbols for architecture x86_64:
"std::ctype::_M_widen_init() const", referenced from:
sctl::SphericalHarmonics::WriteVTK(char const*, sctl::Vector const*, sctl::Vector const*, sctl::SHCArrange, long long, long long, double, sctl::Comm const&) in libkernels.o
...


Calling the vectorized versions from Julia

Hey there,

I am trying to solve a problem with multiple right-hand sides. In short this means that I need to evaluate the hfmm3d for many different setups of charge strengths (or dipole strengths). I see that there is a vectorized version, however it seems that there is no interface for the function in Julia. Before I go and implement my own I want to know if there is a specific reason why there is no interface (other than it takes time to implement) as well as if there is any computational speed to gain using the vectorized version (currently, I have around 100 rhs, but this could be increased in the future).

Cheers,
Mikkel

Fortran kills the python process

I am trying to use the code in a larger system and the problem I am experiencing is that in case of an error, the Fortran code calls "exit" or "stop" which in turn entirely kills the python process that calls the FMM. The FMM failing for certain inputs is not a problem as long as I can catch the exception being thrown.

Another issue I am experiencing is that for certain inputs, the FMM code simply segfaults. (I have saved the inputs that crashed the code if they can be of help). Again, the segfault kills the entire system.

I installed the code as described in the readthedocs. Am I doing something wrong?

Adding the Julia wrapper to the official registry of Julia packages

Hi,

First of all, thanks for developing and maintaining this library -- I have found it to be very useful!

For the Julia wrapper, I was wondering if it would be possible to register the module as an official Julia package, so that:

  1. Other registered packages can (officially) depend on it
  2. People can use the julia built-in package manager to add and version-control the FMM3D.jl module (e.g. ]add FMM3D)

I have never registered a package that lives in a subdirectory, but from the Registrator docs it seems to be as easy as writing

@JuliaRegistrator register subdir=path/to/my/package

on the commit.

Thanks!

Missing features from STFMMLIB3D

Hi,

I was wondering why this project seems to have "fewer" features than the old FMM3D project (from here). My understanding was that this project is a continuation. Why was the half-space with no-slip boundary condition removed and should I just use the old code in that case?

Cheers!

MATLAB code crashes with larger number of densities

Hi,

I run the code below in MATLAB and it crashes. The crash happens reliably whenever the number of densities nd is big enough. Also, it only happens if I compile the code with OpenMP, the single-threaded version works fine.

OS: macOS Catalina 10.15.6
MATLAB version: R2019b or R2020b
FMM3D library compiled with the default make.inc.macos.gnu options

Additionally, I also tried similar things on a Ubuntu system and modified the OMP_STACKSIZE variable as described here. This somewhat alleviates the issue, but still crashes when nd is big enough. (However, I am not too familiar with Linux, so I could have done something wrong here.)

ns = 4000;

nd = 200;
srcinfo.nd = nd;

pg = 1;

srcinfo.sources = rand(3,ns);
srcinfo.charges = rand(nd,ns);

eps = 1e-5;

U = lfmm3d(eps,srcinfo,pg);

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.