epicf / ef

Low-energy charged particles' dynamics simulation using particle-in-cell method
MIT License
11 stars 9 forks source link

Petsc error #5

Closed dumbman closed 5 years ago

dumbman commented 6 years ago

Пример конфига: https://drive.google.com/drive/folders/1mDwfGlWc9R7fn-3Ff9ljYWQPfbhMmB1M

Time step was shrinked to 5e-10 from 5e-10 to fit round number of cells. Time save step was shrinked to 5e-10 from 5e-10 to be a multiple of time step. [0]PETSC ERROR: --------------------- Error Message -------------------------------------------------------------- [0]PETSC ERROR: Argument out of range [0]PETSC ERROR: New nonzero at (8018,8019) caused a malloc Use MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE) to turn off this check [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting. [0]PETSC ERROR: Petsc Release Version 3.6.2, Oct, 02, 2015 [0]PETSC ERROR: ../../ef.out on a x86_64-linux-gnu-real named ab-work by ab Sun Apr 22 23:03:52 2018 [0]PETSC ERROR: Configure options --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --with-silent-rules=0 --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --with-maintainer-mode=0 --with-dependency-tracking=0 --with-debugging=0 --shared-library-extension=_real --with-hypre=1 --with-hypre-dir=/usr --with-clanguage=C++ --with-c-support --with-shared-libraries --useThreads 0 --with-fortran-interfaces=1 --with-mpi-dir=/usr/lib/openmpi --with-blas-lib=-lblas --with-lapack-lib=-llapack --with-blacs=1 --with-blacs-lib="-lblacsCinit-openmpi -lblacs-openmpi" --with-scalapack=1 --with-scalapack-lib=-lscalapack-openmpi --with-mumps=1 --with-mumps-include="[]" --with-mumps-lib="-ldmumps -lzmumps -lsmumps -lcmumps -lmumps_common -lpord" --with-suitesparse=1 --with-suitesparse-include=/usr/include/suitesparse --with-suitesparse-lib="-lumfpack -lamd -lcholmod -lklu" --with-spooles=1 --with-spooles-include=/usr/include/spooles --with-spooles-lib=-lspooles --with-ptscotch=1 --with-ptscotch-include=/usr/include/scotch --with-ptscotch-lib="-lptesmumps -lptscotch -lptscotcherr" --with-fftw=1 --with-fftw-include="[]" --with-fftw-lib="-lfftw3 -lfftw3_mpi" --with-superlu=1 --with-superlu-include=/usr/include/superlu --with-superlu-lib=-lsuperlu --CXX_LINKER_FLAGS=-Wl,--no-as-needed --prefix=/usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real PETSC_DIR=/build/petsc-16ivCo/petsc-3.6.2.dfsg1 --PETSC_ARCH=x86_64-linux-gnu-real CFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" FCFLAGS="-g -O2 -fstack-protector-strong" FFLAGS="-g -O2 -fstack-protector-strong" CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2" LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro" MAKEFLAGS=w [0]PETSC ERROR: #1 MatSetValues_SeqAIJ() line 485 in /build/petsc-16ivCo/petsc-3.6.2.dfsg1/src/mat/impls/aij/seq/aij.c [0]PETSC ERROR: #2 MatSetValues() line 1173 in /build/petsc-16ivCo/petsc-3.6.2.dfsg1/src/mat/interface/matrix.c [0]PETSC ERROR: #3 modify_equation_near_object_boundaries() line 216 in field_solver.cpp terminate called after throwing an instance of 'std::runtime_error' what(): Error detected in C PETSc [ab-work:29636] Process received signal [ab-work:29636] Signal: Aborted (6) [ab-work:29636] Signal code: (-6) [ab-work:29636] [ 0] /usr/lib/libopen-pal.so.13(+0x4e99e)[0x7fbf92a5399e] [ab-work:29636] [ 1] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7fbf99bb84b0] [ab-work:29636] [ 2] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7fbf99bb8428] [ab-work:29636] [ 3] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7fbf99bba02a] [ab-work:29636] [ 4] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27verbose_terminate_handlerEv+0x16d)[0x7fbf9a1f284d] [ab-work:29636] [ 5] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d6b6)[0x7fbf9a1f06b6] [ab-work:29636] [ 6] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d701)[0x7fbf9a1f0701] [ab-work:29636] [ 7] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d919)[0x7fbf9a1f0919] [ab-work:29636] [ 8] /usr/lib/x86_64-linux-gnu/libpetsc_real.so.3.6(PetscError+0x351)[0x7fbf9b45a3a1] [ab-work:29636] [ 9] ../../ef.out[0x429fca] [ab-work:29636] [10] ../../ef.out[0x42aaa8] [ab-work:29636] [11] ../../ef.out[0x42ade5] [ab-work:29636] [12] ../../ef.out[0x4cb7f7] [ab-work:29636] [13] ../../ef.out[0x47a6eb] [ab-work:29636] [14] ../../ef.out[0x412a92] [ab-work:29636] [15] /lib/x86_64-linux-gnu/libc.so.6(libc_start_main+0xf0)[0x7fbf99ba3830] [ab-work:29636] [16] ../../ef.out[0x413099] [ab-work:29636] End of error message Aborted (core dumped)

noooway commented 6 years ago

Пока не разобрался в чем дело. Но если во всех Inner_region_tube_along_z_segment.segin* поменять tube_along_z_segment_inner_radius с 0.0 на 0.2, начинает работать.

Насколько я понимаю, в этом расчете такое изменение не принципиально.

Загрузил конфиг в директорию на гугл-диске.

dumbman commented 6 years ago

Работает до 8 шага

А сетки внешнего h5 файла должны совпадать? Я сделал одинаковые вроде начало считать

Writing step 7 to file out_ions_0000007.h5 Source name = ions, number of particles = 8929 Time step from 7 to 8 of 100 ef.out: /usr/include/boost/multi_array/base.hpp:136: Reference boost::detail::multi_array::value_accessor_n<T, NumDims>::access(boost::type, boost::detail::multi_array::value_accessor_n<T, NumDims>::index, TPtr, const size_type, const index, const index) const [with Reference = boost::detail::multi_array::sub_array<Vec3d, 2ul>; TPtr = Vec3d; T = Vec3d; long unsigned int NumDims = 3ul; boost::detail::multi_array::value_accessor_n<T, NumDims>::index = long int; boost::detail::multi_array::multi_array_base::size_type = long unsigned int]: Assertion `size_type(idx - index_bases[0]) < extents[0]' failed. [ab-work:15417] Process received signal [ab-work:15417] Signal: Aborted (6) [ab-work:15417] Signal code: (-6) [ab-work:15417] [ 0] /usr/lib/libopen-pal.so.13(+0x4e99e)[0x7ff81953799e] [ab-work:15417] [ 1] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7ff82069c4b0] [ab-work:15417] [ 2] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7ff82069c428] [ab-work:15417] [ 3] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7ff82069e02a] [ab-work:15417] [ 4] /lib/x86_64-linux-gnu/libc.so.6(+0x2dbd7)[0x7ff820694bd7] [ab-work:15417] [ 5] /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7ff820694c82] [ab-work:15417] [ 6] ../../ef.out[0x472714] [ab-work:15417] [ 7] ../../ef.out[0x4c65ad] [ab-work:15417] [ 8] ../../ef.out[0x4c6e08] [ab-work:15417] [ 9] ../../ef.out[0x4cb078] [ab-work:15417] [10] ../../ef.out[0x4cb1d8] [ab-work:15417] [11] ../../ef.out[0x412bc4] [ab-work:15417] [12] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7ff820687830] [ab-work:15417] [13] ../../ef.out[0x413099] [ab-work:15417] End of error message Aborted (core dumped)

noooway commented 6 years ago

А сетки внешнего h5 файла должны совпадать? Я сделал одинаковые вроде начало считать

Сетки могут быть разные, но нужно, чтобы область с внешним полем была больше или равна области, определяемой в Spatial Mesh.

В последнем коммите в dev-ветке я это поправил: если область внешнего поля меньше, чем Spatial Mesh, то во всей остальной части SpatMesh значение этого внешнего поля считается нулевым.