flatironinstitute / FMM3D

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.
https://fmm3d.readthedocs.io
Other
101 stars 39 forks source link

Issue installing on Windows #27

Open MrGooss opened 2 years ago

MrGooss commented 2 years ago

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?

mrachh commented 2 years ago

Hi, Apologies for the delay in reply. Have you also installed command line tools through git? Is it an issue of the command mv not being recognized? You could try running mv on the command prompt to see if that works. In case you don't have them installed, you can get it by installing git as mentioned on the installation page for example.

An alternative would be to use the makefile.windows instead of the direct make install and run make -f makefile.windows install instead. You will have to update the mingw path on line 42 to point to the correct location.

If neither of those work, could you provide which version of mingw, and Windows operating system y'all have on your machine, and what language do you wish to be using the FMM libraries eventually in?

MrGooss commented 2 years ago

Hi,

Thank you for the reply. This led me to try running the make command through Git bash, which got further and copied the files to the lib directory. I think there might be an issue with permission as later the command output gave the error that C:lib/ was not a directory, I could still find the .dll and .a file and copy it to our project, so my problem is resolved.

We are using the libraries in Java through JNA for tracking particles in simulations of a particle accelerator, we are still at an early stage of the project, but this library has been very useful for us. If it interests you the project can be found at https://simpa-project.web.cern.ch

Thank you for the help.