ECP-WarpX / WarpX

WarpX is an advanced electromagnetic & electrostatic Particle-In-Cell code.
https://ecp-warpx.github.io
Other
310 stars 196 forks source link

RZ+openPMD - Malloc #1381

Open LDAmorim opened 4 years ago

LDAmorim commented 4 years ago

Hi all,

I am trying to run WarpX in RZ with openPMD (to input particles from openPMD files) in CORI@NERSC.

And I encountered the error message below. It does not appear when I read my file in 2D (successful plots in next message).

Googling the first message, it seams to come form some re-writing of a variable. But I don't know where to look for this (yet!).

So I was wondering if any of you have found this issue before (or if you had ideas where I could start looking). I can't tell if it could be connected to https://github.com/ECP-WarpX/WarpX/issues/1238 or not.

main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex: malloc.c:4025: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed.
main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex: malloc.c:4025: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed.

*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaad8802fc0 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaac4802f30 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaab4802f30 ***
SIGABRT
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaad4803160 ***
SIGABRT
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaac88023c0 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaacc802270 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaac08025a0 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaad0803640 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaabc8032c0 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaac48032c0 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaab4803350 ***
Segfault
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaacc802de0 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaad4802de0 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaabc802de0 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaab4802de0 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaad0954530 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaabc8ab9d0 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaab49545a0 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaad482f790 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaacc807f00 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaac88ab9d0 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaac4954390 ***
*** Error in `/global/homes/l/ligiada/WarpX/WarpX/Bin/main2d.gnu.mic-knl.TPROF.MTMPI.OMP.OPMD.RZ.ex': free(): invalid pointer: 0x00002aaad80027e0 ***
srun: error: nid02516: tasks 0-1,4,7: Aborted
srun: Terminating job step 34720562.0
srun: error: nid02516: task 5: Segmentation fault
slurmstepd: error: *** STEP 34720562.0 ON nid02516 CANCELLED AT 2020-09-24T09:35:05 ***
srun: error: nid02516: tasks 2-3,6: Terminated
srun: Force Terminated job step 34720562.0

Thanks, Diana

LDAmorim commented 4 years ago

I don't know if I am missing a command for RZ or for openPMD.

Here is the backtrace, script and input files from this issue: script.txt Backtrace.0.0.txt input.txt e-_primary_opmd.h5.zip

LDAmorim commented 4 years ago

The 2D WarpX executable works and reproduces the correct particle injection from external_file. Figure below shows openPMD file data on left distribution plots (position top / velocity bottom) and WarpX diags at time step 0 on right plots.

image
ax3l commented 4 years ago

Sorry, I have not seen this earlier. Feel free to @-me so I receive a notification.

Is this problem still up to date? I cannot see the exact lines, but going back a month in the code it looks to me, in combination to the lines that Bracktrace.0.0.txt points to, that this has something to do with the parsing of the input options inside PlasmaInjector::PlasmaInjector (int ispecies, const std::string& name): https://github.com/ECP-WarpX/WarpX/blob/bc3bf28155c3257e7fd6386bd43a9f9fd52b7287/Source/Initialization/PlasmaInjector.cpp#L170-L174

It's confusing that it would think mass_is_specified is true. You could add a print statement in that if before and after the transform to check and/or specify the mass truly for all three active species in the inputs file.

LDAmorim commented 4 years ago

Hi @ax3l! Thanks for following up on this. I will test it again asap and share the updates here. Cheers, Diana