Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exact representation of contour #87

Open
hamdav opened this issue Apr 16, 2024 · 7 comments
Open

Exact representation of contour #87

hamdav opened this issue Apr 16, 2024 · 7 comments

Comments

@hamdav
Copy link

hamdav commented Apr 16, 2024

Hi!

When computing the distances to the 0 contour using this package, the returned array does not have exactly the same 0 contour. I am using it to keep track of an evolving interface, and so for me it is imperative that the contour is not moved when reinitializing. Trying to fix this might make the distances ever so slightly worse, however, they are not exact to begin with so I think that this is a reasonable tradeoff. It would also increase the complexity of the call to initializeFrozen, but probably not very significantly. Would you be open to a pull request for this? Maybe adding an option on which algorithm to use so as to not change the defaults? I have some ideas on how to compute the initialFrozen values...

import skfmm
import matplotlib.pyplot as plt
import numpy as np

n = 3
dx = 1
X, Y = np.meshgrid(np.linspace(0, (n-1)*dx, n),np.linspace(0, (n-1)*dx, n))

phi = np.array([
    [1, 0.9, -0.1],
    [1, 1.0, -10.0],
    [0.1, -0.1, -10.1],
])

phi2 = skfmm.distance(phi, dx=dx)

plt.contour(phi, levels=[0], colors='k')
plt.contour(phi2, levels=[0], colors='g')

plt.show()

image

@jkfurtney
Copy link
Member

Hi David, thanks for getting in touch with this. I need some time to digest this and do some testing to better understand what is going on. What you describe seems reasonable, let me have a look and comment back here soon. Thanks again

@hamdav
Copy link
Author

hamdav commented Apr 17, 2024

Made a fork that makes it work: https://github.com/hamdav/scikit-fmm. I just did the algorithm part and renamed the previous initializeFrozen -> intializeFrozen2. So no option on which algorithm to use yet. I know python and I know c++, but I've never interfaced them before so I don't know how to do that. I'm sure it's not too hard though :) However, running the tests makes some of them fail, not sure if this is just because the distances changed or because they got worse...

@jkfurtney
Copy link
Member

Thanks for this, is there a quick way I can see a diff of initializeFrozen and initializeFrozen2? I will be able to do a deeper dive on this soon.

@hamdav
Copy link
Author

hamdav commented Apr 17, 2024

I don't think you would get much out of it. The conceptual diff is: First for loop (where i is marked frozen if phi[i]==0) is the same, the rest is different. There are of course similarities, both loop over the far values, both loop over the dimensions. The previous version also loop over the directions, though I skipped that loop and only go in one direction, so I only loop over each edge once. But I think the similarities are few enough that it's easier to just read it on it's own.

I'd be happy to explain something in more detail if you want.

@hamdav
Copy link
Author

hamdav commented Apr 23, 2024

Hey again!

I am trying to compile skfmm on Windows, and I can't seem to get it to work. When I run python setup.py install I get a long printout, and it seemingly works well and installs the package. But when I start python and run import skfmm I get


>>> import skfmm
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\davham\Documents\Personal-Github-Code\scikit-fmm\skfmm\__init__.py", line 51, in <module>
    from .pfmm import distance, travel_time, extension_velocities
  File "C:\Users\davham\Documents\Personal-Github-Code\scikit-fmm\skfmm\pfmm.py", line 4, in <module>
    from .cfmm import cFastMarcher
ModuleNotFoundError: No module named 'skfmm.cfmm'

The output from the build is


            Note: if you need to uninstall you should `pip install scikit-fmm` instead of using `setup.py install`

C:\Users\davham\Documents\Personal-Github-Code\scikit-fmm\setup.py:115: 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
C:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\setuptools\dist.py:318: InformationOnly: Normalizing '2023.04.02' to '2023.4.2'
  self.metadata.version = self._normalize_version(self.metadata.version)
running install
C:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
running build
running config_cc
INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
INFO: build_src
INFO: building extension "skfmm.cfmm" sources
INFO: building extension "skfmm.pheap" sources
INFO: build_src: building npy-pkg config files
running build_py
copying skfmm\heap.py -> build\lib.win-amd64-cpython-311\skfmm
copying skfmm\pfmm.py -> build\lib.win-amd64-cpython-311\skfmm
copying skfmm\setup.py -> build\lib.win-amd64-cpython-311\skfmm
copying skfmm\__init__.py -> build\lib.win-amd64-cpython-311\skfmm
running build_ext
INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
INFO: customize MSVCCompiler
INFO: customize MSVCCompiler using build_ext
INFO: CCompilerOpt.__init__[820] : load cache from file -> C:\Users\davham\Documents\Personal-Github-Code\scikit-fmm\build\temp.win-amd64-cpython-311\Release\ccompiler_opt_cache_ext.py
INFO: CCompilerOpt.__init__[836] : miss the file cache
INFO: CCompilerOpt.cc_test_flags[1086] : testing flags (/O2)
creating C:\Users\davham\AppData\Local\Temp\tmptrm0x_z_\Users
creating C:\Users\davham\AppData\Local\Temp\tmptrm0x_z_\Users\davham
creating C:\Users\davham\AppData\Local\Temp\tmptrm0x_z_\Users\davham\AppData
creating C:\Users\davham\AppData\Local\Temp\tmptrm0x_z_\Users\davham\AppData\Local
creating C:\Users\davham\AppData\Local\Temp\tmptrm0x_z_\Users\davham\AppData\Local\miniconda3
creating C:\Users\davham\AppData\Local\Temp\tmptrm0x_z_\Users\davham\AppData\Local\miniconda3\envs
creating C:\Users\davham\AppData\Local\Temp\tmptrm0x_z_\Users\davham\AppData\Local\miniconda3\envs\tmp
creating C:\Users\davham\AppData\Local\Temp\tmptrm0x_z_\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib
creating C:\Users\davham\AppData\Local\Temp\tmptrm0x_z_\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages
creating C:\Users\davham\AppData\Local\Temp\tmptrm0x_z_\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\numpy
creating C:\Users\davham\AppData\Local\Temp\tmptrm0x_z_\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\numpy\distutils
creating C:\Users\davham\AppData\Local\Temp\tmptrm0x_z_\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\numpy\distutils\checks
INFO: CCompilerOpt.cc_test_flags[1086] : testing flags (/WX)
WARN: CCompilerOpt.__init__[1253] : feature 'AVX512_KNL' is disabled, MSVC compiler doesn't support it
WARN: CCompilerOpt.__init__[1253] : feature 'AVX512_KNM' is disabled, MSVC compiler doesn't support it
WARN: CCompilerOpt.__init__[1253] : feature 'AVX512_SPR' is disabled, MSVC compiler doesn't support it
INFO: CCompilerOpt.__init__[1795] : check requested baseline
INFO: CCompilerOpt.feature_test[1560] : testing feature 'SSE' with flags ()
INFO: CCompilerOpt.feature_test[1560] : testing feature 'SSE2' with flags ()
INFO: CCompilerOpt.feature_test[1560] : testing feature 'SSE3' with flags ()
INFO: CCompilerOpt.__init__[1804] : check requested dispatch-able features
INFO: CCompilerOpt.feature_test[1560] : testing feature 'SSE41' with flags ()
INFO: CCompilerOpt.cc_test_flags[1086] : testing flags (/arch:AVX)
INFO: CCompilerOpt.cc_test_flags[1086] : testing flags (/arch:AVX2)
INFO: CCompilerOpt.cc_test_flags[1086] : testing flags (/arch:AVX512)
INFO: CCompilerOpt.feature_test[1560] : testing feature 'AVX512CD' with flags (/arch:AVX512)
INFO: CCompilerOpt.feature_test[1560] : testing feature 'AVX2' with flags (/arch:AVX2)
INFO: CCompilerOpt.feature_test[1560] : testing feature 'POPCNT' with flags ()
INFO: CCompilerOpt.feature_test[1560] : testing feature 'F16C' with flags (/arch:AVX)
INFO: CCompilerOpt.feature_test[1560] : testing feature 'SSE42' with flags ()
INFO: CCompilerOpt.feature_test[1560] : testing feature 'FMA3' with flags (/arch:AVX2)
INFO: CCompilerOpt.feature_test[1560] : testing feature 'AVX512_SKX' with flags (/arch:AVX512)
INFO: CCompilerOpt.feature_test[1560] : testing feature 'AVX' with flags (/arch:AVX)
INFO: CCompilerOpt.feature_test[1560] : testing feature 'SSSE3' with flags ()
INFO: CCompilerOpt.feature_test[1560] : testing feature 'AVX512F' with flags (/arch:AVX512)
INFO: CCompilerOpt.feature_test[1560] : testing feature 'AVX512_CLX' with flags (/arch:AVX512)
INFO: CCompilerOpt.feature_test[1560] : testing feature 'AVX512_CNL' with flags (/arch:AVX512)
INFO: CCompilerOpt.feature_test[1560] : testing feature 'AVX512_ICL' with flags (/arch:AVX512)
INFO: CCompilerOpt.__init__[1816] : skip features (SSE2 SSE SSE3) since its part of baseline
INFO: CCompilerOpt.__init__[1820] : initialize targets groups
INFO: CCompilerOpt.__init__[1822] : parse target group simd_test
INFO: CCompilerOpt._parse_target_tokens[2033] : skip targets (ASIMD VSX2 NEON FMA4 VX VXE2 VXE XOP VSX4 VSX3 VSX) not part of baseline or dispatch-able features
INFO: CCompilerOpt._parse_policy_not_keepbase[2145] : skip baseline features (SSE2)
INFO: CCompilerOpt.generate_dispatch_header[2366] : generate CPU dispatch header: (build\src.win-amd64-3.11\numpy\distutils\include\npy_cpu_dispatch_config.h)
INFO: CCompilerOpt.feature_extra_checks[1640] : Testing extra checks for feature 'AVX512F' (AVX512F_REDUCE)
INFO: CCompilerOpt.feature_extra_checks[1640] : Testing extra checks for feature 'AVX512_SKX' (AVX512BW_MASK AVX512DQ_MASK)
INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
INFO: customize MSVCCompiler
WARN: Missing compiler_cxx fix for MSVCCompiler
INFO: customize MSVCCompiler using build_ext
INFO: building 'skfmm.cfmm' extension
INFO: compiling C sources
INFO: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iskfmm -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\numpy\core\include -Ibuild\src.win-amd64-3.11\numpy\distutils\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt /EHsc /Tpskfmm\fmm.cpp /Fobuild\temp.win-amd64-cpython-311\Release\skfmm\fmm.obj /Zm1000
INFO: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iskfmm -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\numpy\core\include -Ibuild\src.win-amd64-3.11\numpy\distutils\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt /EHsc /Tpskfmm\heap.cpp /Fobuild\temp.win-amd64-cpython-311\Release\skfmm\heap.obj /Zm1000
INFO: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iskfmm -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\numpy\core\include -Ibuild\src.win-amd64-3.11\numpy\distutils\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt /EHsc /Tpskfmm\base_marcher.cpp /Fobuild\temp.win-amd64-cpython-311\Release\skfmm\base_marcher.obj /Zm1000
INFO: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iskfmm -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\numpy\core\include -Ibuild\src.win-amd64-3.11\numpy\distutils\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt /EHsc /Tpskfmm\distance_marcher.cpp /Fobuild\temp.win-amd64-cpython-311\Release\skfmm\distance_marcher.obj /Zm1000
INFO: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iskfmm -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\numpy\core\include -Ibuild\src.win-amd64-3.11\numpy\distutils\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt /EHsc /Tpskfmm\travel_time_marcher.cpp /Fobuild\temp.win-amd64-cpython-311\Release\skfmm\travel_time_marcher.obj /Zm1000
INFO: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iskfmm -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\numpy\core\include -Ibuild\src.win-amd64-3.11\numpy\distutils\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include -IC:\Program Files (x86)\Microsoft VisuWindows Kits\10\\include\10.0.22621.0\\winrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt /EHsc /Tpskfmm\extension_velocity_marcher.cpp /Fobuild\temp.win-amd64-cpython-311\Release\skfmm\extension_velocity_marcher.obj /Zm1000
INFO: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\davham\AppData\Local\miniconda3\envs\tmp\libs /LIBPATH:C:\Users\davham\AppData\Local\miniconda3\envs\tmp /LIBPATH:C:\Users\davham\AppData\Local\miniconda3\envs\tmp\PCbuild\amd64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x64 /EXPORT:PyInit_cfmm build\temp.win-amd64-cpython-311\Release\skfmm\fmm.obj build\temp.win-amd64-cpython-311\Release\skfmm\heap.obj build\temp.win-amd64-cpython-311\Release\skfmm\base_marcher.obj build\temp.win-amd64-cpython-311\Release\skfmm\distance_marcher.obj build\temp.win-amd64-cpython-311\Release\skfmm\travel_time_marcher.obj build\temp.win-amd64-cpython-311\Release\skfmm\extension_velocity_marcher.obj /OUT:build\lib.win-amd64-cpython-311\skfmm\cfmm.cp311-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-311\Release\skfmm\cfmm.cp311-win_amd64.lib
INFO: building 'skfmm.pheap' extension
INFO: compiling C sources
INFO: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\numpy\core\include -Ibuild\src.win-amd64-3.11\numpy\distutils\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include -IC:\Program Files (x86)\Microsoft Visual StudiINFO: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\numpy\core\include -Ibuild\src.win-amd64-3.11\numpy\distutils\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\include -IC:\Users\davham\AppData\Local\miniconda3\envs\tmp\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt /EHsc /Tpskfmm\heap.cpp /Fobuild\temp.win-amd64-cpython-311\Release\skfmm\heap.obj /Zm1000
INFO: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\davham\AppData\Local\miniconda3\envs\tmp\libs /LIBPATH:C:\Users\davham\AppData\Local\miniconda3\envs\tmp /LIBPATH:C:\Users\davham\AppData\Local\miniconda3\envs\tmp\PCbuild\amd64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x64 /EXPORT:PyInit_pheap build\temp.win-amd64-cpython-311\Release\skfmm\pheap.obj build\temp.win-amd64-cpython-311\Release\skfmm\heap.obj /OUT:build\lib.win-amd64-cpython-311\skfmm\pheap.cp311-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-311\Release\skfmm\pheap.cp311-win_amd64.lib
running install_lib
copying build\lib.win-amd64-cpython-311\skfmm\cfmm.cp311-win_amd64.pyd -> C:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\skfmm
copying build\lib.win-amd64-cpython-311\skfmm\pheap.cp311-win_amd64.pyd -> C:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\skfmm
running install_egg_info
running egg_info
writing scikit_fmm.egg-info\PKG-INFO
writing dependency_links to scikit_fmm.egg-info\dependency_links.txt
writing requirements to scikit_fmm.egg-info\requires.txt
writing top-level names to scikit_fmm.egg-info\top_level.txt
C:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\setuptools\command\sdist.py:115: SetuptoolsDeprecationWarning: `build_py` command does not inherit from setuptools' `build_py`.
!!

        ********************************************************************************
        Custom 'build_py' does not implement 'get_data_files_without_manifest'.
        Please extend command classes from setuptools instead of distutils.

        See https://peps.python.org/pep-0632/ for details.
        ********************************************************************************

!!
  self._add_data_files(self._safe_data_files(build_py))
reading manifest file 'scikit_fmm.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README.txt'
adding license file 'LICENSE.txt'
writing manifest file 'scikit_fmm.egg-info\SOURCES.txt'
Copying scikit_fmm.egg-info to C:\Users\davham\AppData\Local\miniconda3\envs\tmp\Lib\site-packages\scikit_fmm-2023.4.2-py3.11.egg-info
running install_scripts
running install_clib
INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
INFO: customize MSVCCompiler
INFO:
########### EXT COMPILER OPTIMIZATION ###########
INFO: Platform      :
  Architecture: x64
  Compiler    : msvc

CPU baseline  :
  Requested   : 'min'
  Enabled     : SSE SSE2 SSE3
  Flags       : none
  Extra checks: none

CPU dispatch  :
  Requested   : 'max -xop -fma4'
  Enabled     : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL
  Generated   : none
INFO: CCompilerOpt.cache_flush[864] : write cache to path -> C:\Users\davham\Documents\Personal-Github-Code\scikit-fmm\build\temp.win-amd64-cpython-311\Release\ccompiler_opt_cache_ext.py

@jkfurtney
Copy link
Member

It looks like the build completed. You can get that error (ModuleNotFoundError: No module named 'skfmm.cfmm') if you try to run python and import skfmm from the scikit-fmm source folder. In this case, just change to a different folder and it should work. I think in this case Python searches the local directory first. If you want to do some experiments locally, I think you can do python setup.py develop, that does a build and copies the binaries to the source folder. If that does not work let me know, There is another branch for building with Python 3.12, it is working and all the test pass but I am stuck on getting the Windows build/test github workflow to work correctly. I will have a closer look at your patch soon. Thanks.

@hamdav
Copy link
Author

hamdav commented Apr 23, 2024

Ah, that's a silly mistake by me, I was indeed stood in the source folder. Thanks :) And good to know about setup.py develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants