Open germa89 opened 2 years ago
Hi @germa89,
I think I observed the same behavior (mapdl crashing randomly) but without using mapdl.non_interactive
.
I am using mapdl version 0.61.3, and for instance I get this error when running a code that was working:
mmhh... without using non_interactive
?? ... If you can, can you upload your code here, so I can have a look??
Hi @germa89 ,
I cannot give you my entire code, but here is the part that caused the issue. It's a loop to obtain the right hand side vector of a thermal problem for different heat generation values. MAPDL crashed randomly at different iterations of the loop when calling mapdl.math.rhs()
.
for i in range(len(pJ[0])): # for each mode of the gradient prod.
# Print mode number
print('Compute thermal force number %i of %i'%(i + 1,len(pJ[0])))
# Compute the thermal force
mapdl.slashsolu()
mapdl.wrfull('1')
mapdl.kuse('1')
mapdl.time(1) ; mapdl.autots('OFF') ; mapdl.nsubst(1)
mapdl.outres('ERASE')
mapdl.outres('ALL','NONE') # no data written to data files
# Clear previous load
mapdl.bfedele('ALL','HGEN')
# Sets uniform initial temperature to 0 and deletes convection
# otherwise the RHS is impacted
mapdl.tunif('0')
mapdl.sfdele('ALL','CONV')
# Create commands to apply the load
cmd = ['bfeblock,3,hgen,{Emax},{nE},0'
.format(Emax=len(elem), nE=len(elem))]
# 3: nb. of fiels, nE: maximum element number defined, number of selected elements, 0: non tabular input
cmd.append('(2i9,e20.9e3)')
for e in range(len(elem)):
cmd.append('%9i%9i%20.9e' %(e+1,1,pJ[0][i][e]))
cmd.append('bfe,end,loc,-1,')
# Pass it to MAPDL and solve
mapdl.input_strings(cmd)
mapdl.finish()
# Solve
mapdl.slashsolu()
mapdl.solve()
mapdl.finish()
# combine .full files from the processors
mapdl.aux2()
mapdl.combine('full')
mapdl.finish()
F = mapdl.math.rhs(asarray=True)
Fth[0][i] = F.reshape([len(F),1])
I will have a look in the coming months, I'm a bit caught with other stuff. Please feel free to ping me if no progress is made in the next 2 weeks.
No problem. I'haven't encountered the issue for a while so there is no hurry.
=== Reported internally DK ===
It seems that running many times with the
mapdl.non_interactive
generates aMapdlExitedError
error.Code: