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

WarpX: Finalize Windows Support #1776

Closed
ax3l opened this issue Mar 10, 2021 · 5 comments
Closed

WarpX: Finalize Windows Support #1776

ax3l opened this issue Mar 10, 2021 · 5 comments
Assignees
Labels
component: Python Python layer component: third party Changes in WarpX that reflect a change in a third-party library install

Comments

@ax3l
Copy link
Member

ax3l commented Mar 10, 2021

WarpX 21.03 on Windows works (executables) and we ship via conda-forge.

Details to Fix

PICMI import

(warpx) C:\Users\diana\conda_folder\WarpX\Examples\Physics_applications\laser_acceleration>python PICMI_inputs_laser_acceleration.py
Traceback (most recent call last):
  File "PICMI_inputs_laser_acceleration.py", line 142, in <module>
    sim.step(max_steps)
  File "C:\Users\diana\anaconda3\envs\warpx\lib\site-packages\pywarpx\picmi.py", line 773, in step
    self.initialize_warpx()
  File "C:\Users\diana\anaconda3\envs\warpx\lib\site-packages\pywarpx\picmi.py", line 760, in initialize_warpx
    pywarpx.warpx.init()
  File "C:\Users\diana\anaconda3\envs\warpx\lib\site-packages\pywarpx\WarpX.py", line 70, in init
    from . import wx
  File "C:\Users\diana\anaconda3\envs\warpx\lib\site-packages\pywarpx\wx.py", line 7, in <module>
    from ._libwarpx import *
  File "C:\Users\diana\anaconda3\envs\warpx\lib\site-packages\pywarpx\_libwarpx.py", line 60, in <module>
    _libc = ctypes.CDLL(_find_library('c'))
  File "C:\Users\diana\anaconda3\envs\warpx\lib\ctypes\__init__.py", line 363, in __init__
    if '/' in name or '\\' in name:
TypeError: argument of type 'NoneType' is not iterable

openPMD write (laser-ion)

segfaults in fields

@ax3l ax3l added install component: third party Changes in WarpX that reflect a change in a third-party library component: Python Python layer labels Mar 10, 2021
@ax3l ax3l self-assigned this Mar 10, 2021
@ax3l
Copy link
Member Author

ax3l commented Mar 16, 2021

Related (.dll builds): AMReX-Codes/amrex#1847

@ax3l
Copy link
Member Author

ax3l commented Oct 12, 2021

Segfault in write from mixing OpenMP runtimes in conda (blosc & WarpX): conda-forge/warpx-feedstock#29

@ax3l
Copy link
Member Author

ax3l commented Oct 13, 2021

Segfault w/o OpenMP points on conda-forge to:

lldb warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe
(lldb) target create "warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe"
Current executable set to 'warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe' (x86_64).
(lldb) r warpx_inputs amrex.throw_exception=1 amrex.signal_handling=0
Process 6612 launched: 'C:\Users\turne\.conda\envs\warpx\Library\bin\warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe' (x86_64)
Process 6612 stopped
* thread #1, stop reason = Exception 0xc0000005 encountered at address 0x7ff9fbd28986: Access violation reading location 0x7fffd1506200
    frame #0: 0x00007ff9fbd28986 openPMD.dll`class openPMD::Attribute openPMD::AttributableInterface::getAttribute(class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> const &) const + 198
openPMD.dll`class openPMD::Attribute openPMD::AttributableInterface::getAttribute(class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> const &) const:
->  0x7ff9fbd28986 <+198>: callq  *(%r9,%rax,8)
    0x7ff9fbd2898a <+202>: movl   0x80(%rdi), %eax
    0x7ff9fbd28990 <+208>: movl   %eax, 0x38(%rbx)
    0x7ff9fbd28993 <+211>: movq   %r14, %rax
(lldb) bt
* thread #1, stop reason = Exception 0xc0000005 encountered at address 0x7ff9fbd28986: Access violation reading location 0x7fffd1506200
  * frame #0: 0x00007ff9fbd28986 openPMD.dll`class openPMD::Attribute openPMD::AttributableInterface::getAttribute(class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> const &) const + 198
    frame #1: 0x00007ff9fbd28602 openPMD.dll`void openPMD::AttributableInterface::flushAttributes(void) + 242
    frame #2: 0x00007ff759adc410 warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe`class openPMD::IOTask & openPMD::IOTask::operator=(class openPMD::IOTask const &) + 814400
    frame #3: 0x00007ff9fbc6eb92 openPMD.dll`void openPMD::Iteration::flush(void) + 818
    frame #4: 0x00007ff9fbc6f8fa openPMD.dll`void openPMD::Iteration::flushFileBased(class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> const &, unsigned __int64) + 2442
    frame #5: 0x00007ff9fbcc82e7 openPMD.dll`void openPMD::SeriesInterface::flushFileBased(class std::_Tree_iterator<class std::_Tree_val<struct std::_Tree_simple_types<struct std::pair<unsigned __int64 const, class openPMD::Iteration>>>>, class std::_Tree_iterator<class std::_Tree_val<struct std::_Tree_simple_types<struct std::pair<unsigned __int64 const, class openPMD::Iteration>>>>) + 1543
    frame #6: 0x00007ff9fbcc985e openPMD.dll`class std::future<void> openPMD::SeriesInterface::flush_impl(class std::_Tree_iterator<class std::_Tree_val<struct std::_Tree_simple_types<struct std::pair<unsigned __int64 const, class openPMD::Iteration>>>>, class std::_Tree_iterator<class std::_Tree_val<struct std::_Tree_simple_types<struct std::pair<unsigned __int64 const, class openPMD::Iteration>>>>, enum openPMD::FlushLevel, bool) + 142
    frame #7: 0x00007ff9fbcc7c71 openPMD.dll`void openPMD::SeriesInterface::flush(void) + 65
    frame #8: 0x00007ff759ac114f warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe`class openPMD::IOTask & openPMD::IOTask::operator=(class openPMD::IOTask const &) + 703103
    frame #9: 0x00007ff759b27ff9 warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe`class openPMD::IOTask & openPMD::IOTask::operator=(class openPMD::IOTask const &) + 1124649
    frame #10: 0x00007ff759aef0b4 warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe`class openPMD::IOTask & openPMD::IOTask::operator=(class openPMD::IOTask const &) + 891364
    frame #11: 0x00007ff759a6d2cb warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe`class openPMD::IOTask & openPMD::IOTask::operator=(class openPMD::IOTask const &) + 359419
    frame #12: 0x00007ff759a7599d warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe`class openPMD::IOTask & openPMD::IOTask::operator=(class openPMD::IOTask const &) + 393933
    frame #13: 0x00007ff759b80f71 warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe`class openPMD::IOTask & openPMD::IOTask::operator=(class openPMD::IOTask const &) + 1489057
    frame #14: 0x00007ff759ceeb5f warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe`class openPMD::IOTask & openPMD::IOTask::operator=(class openPMD::IOTask const &) + 2987151
    frame #15: 0x00007ff759e0f074 warpx.2d.NOMPI.NOACC.DP.OPMD.PSATD.QED.exe`class openPMD::IOTask & openPMD::IOTask::operator=(class openPMD::IOTask const &) + 4168100
    frame #16: 0x00007ffa69187034 kernel32.dll`BaseThreadInitThunk + 20
    frame #17: 0x00007ffa6a7a2651 ntdll.dll`RtlUserThreadStart + 33

Could be:

  • a bug in WarpX, using the API in BTD for fields wrongly
  • a bug in openPMD-api
  • a problem from mixing MSVC for all the stack but for the actual WarpX build in the end (where we use LLVM)

WarpX conda-forge feedstock runtime tests: conda-forge/warpx-feedstock#30

WarpX CI runtime tests: #2440

@ax3l
Copy link
Member Author

ax3l commented Oct 20, 2021

@ax3l
Copy link
Member Author

ax3l commented Oct 20, 2021

PICMI Python import fixed via #2412

@ax3l ax3l closed this as completed Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Python Python layer component: third party Changes in WarpX that reflect a change in a third-party library install
Projects
None yet
Development

No branches or pull requests

1 participant