Seg Fault with Particle pushing

Numerical methods and mathematical models of Elmer
Post Reply
drmike
Posts: 37
Joined: 17 Mar 2024, 18:52
Antispam: Yes

Seg Fault with Particle pushing

Post by drmike »

I have modified the ParticleElstat example to include 3D geometry with a cylindrical shape. I finally got past all the stupid errors and got the first two solvers to run once, but then it seg faults in the Data to Field solver. The sif file is attached, but it's pretty much the same as the example. Here is the error trace:

Code: Select all

DataToFieldSolver: -----------------------------------------
DataToFieldSolver: Resolving field from given data

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7f245bdcd2ed in ???
#1  0x7f245bdcc503 in ???
#2  0x7f245b9fff0f in ???
#3  0x7f245c6f30e2 in __matrixassembly_MOD_mgetelementdofs
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/MatrixAssembly.F90:797
#4  0x7f245c5c4a28 in __defutils_MOD_getelementdofs
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/DefUtils.F90:2022
#5  0x7f245c5d6a69 in __defutils_MOD_defaultupdateequationsr
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/DefUtils.F90:3842
#6  0x7f2430fe0b46 in bulkassembly
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/modules/DataToFieldSolver.F90:496
#7  0x7f2430fe0b46 in datatofieldsolver_
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/modules/DataToFieldSolver.F90:191
#8  0x7f245c440d05 in __mainutils_MOD_singlesolver
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/MainUtils.F90:5266
#9  0x7f245c455e67 in __mainutils_MOD_solveractivate
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/MainUtils.F90:5609
#10  0x7f245c457c47 in solvecoupled
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/MainUtils.F90:3240
#11  0x7f245c458e64 in __mainutils_MOD_solveequations
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/MainUtils.F90:2936
#12  0x7f245c6c6049 in execsimulation
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/ElmerSolver.F90:3301
#13  0x7f245c6cee34 in elmersolver_
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/ElmerSolver.F90:664
#14  0x56320d68afae in solver
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/Solver.F90:57
#15  0x56320d68acfe in main
	at /home/drmike/Nuclear_reactions/Plasma_physics/Elmer/elmerfem/elmerfem/fem/src/Solver.F90:34
Segmentation fault (core dumped)
Since the example is 2D and this is 3D maybe I need some more parameters in the Data to Field solver section. What do I need to do keep the solver happy?
Thanks!
Attachments
partest.sif
(4.21 KiB) Downloaded 6 times
drmike
Posts: 37
Joined: 17 Mar 2024, 18:52
Antispam: Yes

Re: Seg Fault with Particle pushing

Post by drmike »

I set the Max Output Level to 6 and got two more messages from the ParticleSolver:

Code: Select all

DataToFieldSolver: -----------------------------------------
DataToFieldSolver: Resolving field from given data
DataToFieldSolver: Fitting to variable: fitted field
DataToFieldSolver: Normalizing source using: particle weight
At least the error is after this point, but I've no clue how to figure this out.
drmike
Posts: 37
Joined: 17 Mar 2024, 18:52
Antispam: Yes

Re: Seg Fault with Particle pushing

Post by drmike »

I guessed that my cylinder volume was not 1 piece, and creating a group from the 3 pieces solved the seg fault problem. The internal boundaries must have been confusing. By creating a single monolithic volume, the example runs. I have a lot more to learn, but at least I'm getting somewhere.
Post Reply