ansys / pymapdl

Pythonic interface to MAPDL

Home Page:https://mapdl.docs.pyansys.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MAPDL server connection terminated when using parameters

Clauperezma opened this issue · comments

🤓 Before submitting the issue

🔍 Description of the bug

I have encountered this error frequently and have seen other posts about it, but none of them come up with a specific solution. Currently I can't roll my code, sometimes it breaks after a few iterations and some others after #40. I am attaching a part of the code to be rolled. The code is longer and in general the vector x is updated for each iteration. In this case I left it fixed just to see how it behaved and the error always occurs with the use of mapdl.parameters just like in my original code. I wanted to know if there is already a solution for this problem and if it may be related to memory usage. Thanks a lot.

🕵️ Steps To Reproduce

# -*- coding: utf-8 -*-
import numpy as np
from ansys.mapdl.core import launch_mapdl
from ansys.mapdl.core import LOG
LOG.setLevel("DEBUG")
LOG.log_to_file("mylog.log")

mapdl =launch_mapdl(port=50053,additional_switches='-smp',mode="grpc",loglevel="DEBUG")
mapdl.prep7()

def F_hom(nel_mi,inci_mi,coord_mi,nnods_mi,D):
 import numpy as np
 for i in range(0,nel_mi-1): # Read the element and its incidence
  nel_i = inci_mi[i, :]-1
    
    # Determine the x and y positions of the element nodes
  posxy = coord_mi[nel_i[0:], 0:3]
    
    # Gauss points
  ng = 2
  pxi = [-1/np.sqrt(3), 1/np.sqrt(3)]
  peta = [-1/np.sqrt(3), 1/np.sqrt(3)]
    
  wi = 1
  wj = 1
    
  Nfun = len(nel_i)  # Number of nodes in the element
  Fg = np.zeros((2*nnods_mi,3))
  kel = np.zeros((2 * Nfun, 2 * Nfun))  # Initialize the element matrix
  fel = np.zeros((2 * Nfun, 3))  # Initialize the element matrix
  Bs = np.zeros((3, 2 * Nfun))  # Initialize the strain matrix
  DH=np.zeros((3, 3))
  DH1=np.zeros((3, 3))
  De = np.zeros((3, 3))
  De1 = np.zeros((3, 3))
     
  for j in range(ng):
   xi = pxi[j]
   for k in range(ng):
    eta = peta[k]
    N = np.array([1/4 * (1 - xi) * (1 - eta), 1/4 * (1 + xi) * (1 - eta), 1/4 * (1 + xi) * (1 + eta), 1/4 * (1 - xi) * (1 + eta)])
    dNxi = np.array([eta/4 - 1/4, 1/4 - eta/4, eta/4 + 1/4, -eta/4 - 1/4])
    dNeta = np.array([xi/4 - 1/4, -xi/4 - 1/4, xi/4 + 1/4, 1/4 - xi/4])
             
            # Jacobian
    J = np.dot(np.array([dNxi, dNeta]), posxy)
    iJ = np.linalg.inv(J)
            
            # Strain matrix Bs - solid
    p = np.arange(0, 8, 2)
    Bs[0, p] = (iJ[0, 0] * dNxi) + (iJ[0, 1] * dNeta)
    Bs[1, p+1] = iJ[1, 0] * dNxi + iJ[1, 1] * dNeta
    Bs[2, p] = Bs[1, p+1]
    Bs[2, p+1] = Bs[0, p]
            
    fel=fel+np.dot(np.dot(Bs.T, D), np.linalg.det(J)) * wi * wj
 return fel 

def solveU_homg(mapdl, nnods_mi,Fg,case_xy):

  mapdl.antype("STATIC")
  mapdl.parameters["Fg"]=Fg
  mapdl.allsel()
  mapdl.ddele("ALL","ALL")
  mapdl.fdele("ALL","ALL")
  if case_xy==True:
        mapdl.d("x_nodes","UY",0)
        mapdl.d("y_nodes","UX",0)
        mapdl.allsel()
  else:    
        mapdl.d("x_nodes","UX",0)
        mapdl.d("y_nodes","UY",0)
        mapdl.allsel()         
    # Apply nodal forces and solve the system
  with mapdl.non_interactive:
        
      mapdl.run('*get,num_nodes,node,0,count,max')
      mapdl.run('*do,i,1,num_nodes,1')  
      mapdl.f('i','FX','Fg((2*i)-1)')  
      mapdl.f('i','FY','Fg(2*i)') 
      mapdl.run('*enddo') 
        #for i in range(1, nnods_mi + 1):  
            #mapdl.f(i, "FX", Fg[2 * i - 2])  
            #mapdl.f(i, "FY", Fg[2 * i - 1])  
  mapdl.solve()       
    # Retrieve nodal displacements for X and Y directions
  mapdl.dim('U_nodal','ARRAY', 'num_nodes',2)
  mapdl.starvget('U_nodal(1,1)', "NODE", 1, 'U', 'X')
  mapdl.starvget('U_nodal(1,2)', "NODE", 1, 'U', 'Y')
 
  U1 = mapdl.parameters['U_nodal']

    # Combine X and Y displacements into a single vector
  U_carga = np.zeros(2 * nnods_mi)
  U_carga[::2] = U1[:, 0]  # Assign X displacements to even indices
  U_carga[1::2] = U1[:, 1]  # Assign Y displacements to odd indices
  return U_carga


mi_nelx =100;           # Número de Elementos em x da célula de base
mi_nely =100;           # Número de Elementos em y da célula de base
mi_Lx = 1;             # Comprimento no eixo x da célula de base
mi_Ly = 1;             # Comprimento no eixo y da célula de base
mi_t  = 1;             # Espessura da célula de base
nel_mi=mi_nelx*mi_nely
mi_elist = list(range(1,nel_mi + 1))
tol=0.1/100
# Def41inir propiedades del material


E = 1 # Young's modulus in N/m
v = 0.3  # Poisson's ratio
xmin = 1E-3
p=3

steel_mat = 1
mapdl.mp("EX", steel_mat, E)
mapdl.mp("PRXY", steel_mat,v) 
void_mat = 2
mapdl.mp("EX", void_mat, E*(xmin**p))
mapdl.mp("PRXY", void_mat,v)

mapdl.et(1,"PLANE42",kop2=1)
mapdl.blc4(-mi_Lx/2,-mi_Ly/2,mi_Lx,mi_Ly)
mapdl.mat(steel_mat)
mapdl.allsel()
mapdl.lsel("S", "LOC", "X",-mi_Lx/2) 
mapdl.lsel("A", "LOC", "X",mi_Lx/2)  
mapdl.lesize("ALL","","",mi_nely)
mapdl.allsel()
mapdl.lsel("S", "LOC", "Y",-mi_Ly/2) 
mapdl.lsel("A", "LOC", "Y",mi_Ly/2) 
mapdl.lesize("ALL","","",mi_nelx)
mapdl.allsel()
mapdl.amesh("ALL") 
mapdl.allsel("ALL")  
  
  
  #Condiciones de frontera
nel_mi=int(mapdl.get("ELEM_sum","ELEMENT",0,"COUNT"))
nnods_mi=int(mapdl.get("NODE_sum","NODE",0,"COUNT"))

coord_mi = np.copy(mapdl.mesh.nodes[:, [0, 1]])  # coordinates matrix
elem_prop_mi = np.array(mapdl.mesh.elem)
inci_mi= np.copy(elem_prop_mi[:, -4::])  
  

 # Calculo sensibilidade
 #mapdl.run("/POST1 ")  # Post-processor module

 #mapdl.etable("energy","SENE",'') 
 #alpha1=mapdl.starvget('alpha',"ELEM","",'ETAB',"energy","","",2)
 #alpha=mapdl.parameters["alpha"]

 #Calculate x


V= np.zeros(nel_mi) 
C = []
x = np.ones(nel_mi,dtype=bool) 
x_anterior=np.ones(nel_mi,dtype=bool)  

ite=0
   
factor = E / (1 - v**2)
D = factor * np.array([[1, v, 0],
                        [v, 1, 0],
                        [0, 0, (1 - v) / 2]])
vol_frac = []
 #vol_frac.append(sum(x)/nel_mi) # topology vector

 #Condiciones de contorno U
mapdl.nsel("S","LOC","x",-mi_Lx/2-tol,-mi_Lx/2+tol) 
mapdl.cm("x0_nodes","NODE") 
mapdl.nsel("S","LOC","x",mi_Lx/2-tol,mi_Lx/2+tol) 
mapdl.cm("xa1_nodes","NODE") 
mapdl.cmsel("S","x0_nodes")
mapdl.cmsel("A","xa1_nodes")
mapdl.cm("x_nodes","NODE")
mapdl.allsel("ALL")
  #Select side 0 and Ly
mapdl.nsel("S","LOC","y",-mi_Ly/2-tol,-mi_Ly/2+tol) 
mapdl.cm("y0_nodes","NODE") 
mapdl.nsel("S","LOC","y",mi_Ly/2-tol,mi_Ly/2+tol) 
mapdl.cm("ya2_nodes","NODE")
mapdl.cmsel("S","y0_nodes")
mapdl.cmsel("A","ya2_nodes")
mapdl.cm("y_nodes","NODE")

fel=F_hom(nel_mi,inci_mi,coord_mi,nnods_mi,D)
for ite in range(200):
 
    # Update material properties based on changes in x
 index_x = np.argwhere(x != x_anterior)
 for i in index_x.flat:
        mat_id = 1 if x[i] else 2
        mapdl.emodif(int(i + 1), "MAT", mat_id)
    
    # Initialize arrays
 Fg = np.zeros((2 * nnods_mi, 3))
    
    # Loop over material indices
 for elem_idx in np.flatnonzero(x == 1):
        nodes = inci_mi[elem_idx]
        ind = np.ravel([[2 * node - 2, 2 * node - 1] for node in nodes])
        Fg[ind, :] += fel

 mapdl.parameters["Fg"]=Fg  
 mat_indices = np.argwhere(x ==1)    
    # Solve the system for every load  
 mapdl.run("/SOLU")       
 Ux=solveU_homg(mapdl,nnods_mi,Fg[:, 0],False)
 Uy=solveU_homg(mapdl,nnods_mi,Fg[:, 1],False)
 Uxy=solveU_homg(mapdl,nnods_mi,Fg[:,2],True) 
 mapdl.finish()
 print("ite",ite)

💻 Which Operating System are you using?

Windows

🐍 Which Python version are you using?

3.11

💾 Which MAPDL version are you using?

ansys-mapdl-core-0.68.1

📝 PyMAPDL Report

Show the Report!
PyMAPDL Software and Environment Report


Packages Requirements
*********************

Core packages
-------------
ansys.mapdl.core    : 0.68.1
numpy               : 1.26.4
platformdirs        : 4.2.0
scipy               : 1.13.0
grpc                : Package not found
ansys.api.mapdl.v0  : Package not found
ansys.mapdl.reader  : 0.53.0
google.protobuf     : Package not found

Optional packages
-----------------
matplotlib          : 3.8.4
pyvista             : 0.43.5
pyiges              : 0.3.1
tqdm                : 4.66.2


Ansys Installation
******************
Version   Location
------------------
222       C:\Program Files\ANSYS Inc\v222


Ansys Environment Variables
***************************
ANSYS222_DIR                   C:\Program Files\ANSYS Inc\v222\ANSYS
ANSYSLIC_DIR                   C:\Program Files\ANSYS Inc\Shared Files\Licensing
ANSYS_SYSDIR                   winx64
ANSYS_SYSDIR32                 win32
AWP_ROOT222                    C:\Program Files\ANSYS Inc\v222
CADOE_LIBDIR222                C:\Program Files\ANSYS Inc\v222\CommonFiles\Language\en-us

📝 Installed packages

Show the installed packages!
aiobotocore @ file:///C:/b/abs_3cwz1w13nn/croot/aiobotocore_1701291550158/work
aiohttp @ file:///C:/b/abs_27h_1rpxgd/croot/aiohttp_1707342354614/work
aioitertools @ file:///tmp/build/80754af9/aioitertools_1607109665762/work
aiosignal @ file:///tmp/build/80754af9/aiosignal_1637843061372/work
alabaster @ file:///home/ktietz/src/ci/alabaster_1611921544520/work
altair @ file:///C:/b/abs_27reu1igbg/croot/altair_1687526066495/work
anaconda-anon-usage @ file:///C:/b/abs_95v3x0wy8p/croot/anaconda-anon-usage_1697038984188/work
anaconda-catalogs @ file:///C:/b/abs_8btyy0o8s8/croot/anaconda-catalogs_1685727315626/work
anaconda-client @ file:///C:/b/abs_34txutm0ue/croot/anaconda-client_1708640705294/work
anaconda-cloud-auth @ file:///C:/b/abs_410afndtyf/croot/anaconda-cloud-auth_1697462767853/work
anaconda-navigator @ file:///C:/b/abs_cfvv8k_j21/croot/anaconda-navigator_1704813334508/work
anaconda-project @ file:///C:/ci_311/anaconda-project_1676458365912/work
annotated-types==0.6.0
ansys-additive-core==0.17.2
ansys-api-additive==1.4.1
ansys-api-dbu==0.2.5
ansys-api-dyna==0.3.6
ansys-api-edb==1.0.1
ansys-api-fluent==0.3.22
ansys-api-geometry==0.3.8
ansys-api-mapdl==0.5.1
ansys-api-mechanical==0.1.1
ansys-api-meshing-prime==0.1.2
ansys-api-platform-instancemanagement==1.0.0
ansys-api-pyensight==0.3.7
ansys-api-sherlock==0.1.22
ansys-api-systemcoupling==0.1.0
ansys-dpf-composites==0.4.0
ansys-dpf-gate==0.4.1
ansys-dpf-gatebin==0.4.1
ansys-dpf-post==0.6.0
ansys-dyna-core==0.4.13
ansys-dynamicreporting-core==0.5.1
ansys-edb-core==0.1.3
ansys-fluent-core==0.19.2
ansys-geometry-core==0.4.11
ansys-grantami-bomanalytics==2.0.0
ansys-grantami-bomanalytics-openapi==2.0.0
ansys-grantami-recordlists==1.1.0
ansys-grantami-serverapi-openapi==2.0.0
ansys-grpc-dpf==0.8.1
ansys-hps-client==0.7.1
ansys-mapdl-core==0.68.1
ansys-mapdl-reader==0.53.0
ansys-math-core==0.1.3
ansys-mechanical-core==0.10.8
ansys-mechanical-env==0.1.4
ansys-meshing-prime==0.5.1
ansys-motorcad-core==0.4.3
ansys-openapi-common==1.5.1
ansys-optislang-core==0.6.3
ansys-platform-instancemanagement==1.1.2
ansys-pyensight-core==0.7.8
ansys-pythonnet==3.1.0rc3
ansys-rocky-core==0.1.0
ansys-seascape==0.2.0
ansys-sherlock-core==0.4.0
ansys-simai-core==0.1.4
ansys-systemcoupling-core==0.4.1
ansys-tools-path==0.5.1
ansys-turbogrid-api==0.4.0
ansys-turbogrid-core==0.4.0
anyio @ file:///C:/b/abs_847uobe7ea/croot/anyio_1706220224037/work
appdirs==1.4.4
archspec @ file:///croot/archspec_1709217642129/work
argon2-cffi @ file:///opt/conda/conda-bld/argon2-cffi_1645000214183/work
argon2-cffi-bindings @ file:///C:/ci_311/argon2-cffi-bindings_1676424443321/work
arrow @ file:///C:/ci_311/arrow_1678249767083/work
asgiref==3.8.1
astroid @ file:///C:/ci_311/astroid_1678740610167/work
astropy @ file:///C:/b/abs_2fb3x_tapx/croot/astropy_1697468987983/work
asttokens @ file:///opt/conda/conda-bld/asttokens_1646925590279/work
async-lru @ file:///C:/b/abs_e0hjkvwwb5/croot/async-lru_1699554572212/work
atomicwrites==1.4.0
attrs @ file:///C:/b/abs_35n0jusce8/croot/attrs_1695717880170/work
Automat @ file:///tmp/build/80754af9/automat_1600298431173/work
autopep8 @ file:///opt/conda/conda-bld/autopep8_1650463822033/work
Babel @ file:///C:/ci_311/babel_1676427169844/work
backoff==2.2.1
backports.functools-lru-cache @ file:///tmp/build/80754af9/backports.functools_lru_cache_1618170165463/work
backports.tempfile @ file:///home/linux1/recipes/ci/backports.tempfile_1610991236607/work
backports.weakref==1.0.post1
bcrypt @ file:///C:/ci_311/bcrypt_1676435170049/work
beartype==0.18.2
beautifulsoup4 @ file:///C:/b/abs_0agyz1wsr4/croot/beautifulsoup4-split_1681493048687/work
binaryornot @ file:///tmp/build/80754af9/binaryornot_1617751525010/work
black @ file:///C:/b/abs_29gqa9a44y/croot/black_1701097690150/work
bleach @ file:///opt/conda/conda-bld/bleach_1641577558959/work
blinker @ file:///C:/b/abs_d9y2dm7cw2/croot/blinker_1696539752170/work
bokeh @ file:///C:/b/abs_74ungdyhwc/croot/bokeh_1706912192007/work
boltons @ file:///C:/ci_311/boltons_1677729932371/work
botocore @ file:///C:/b/abs_5a285dtc94/croot/botocore_1701286504141/work
Bottleneck @ file:///C:/b/abs_f05kqh7yvj/croot/bottleneck_1707864273291/work
Brotli @ file:///C:/ci_311/brotli-split_1676435766766/work
build==1.2.1
cachetools @ file:///tmp/build/80754af9/cachetools_1619597386817/work
certifi @ file:///C:/b/abs_35d7n66oz9/croot/certifi_1707229248467/work/certifi
cffi @ file:///C:/b/abs_924gv1kxzj/croot/cffi_1700254355075/work
chardet @ file:///C:/ci_311/chardet_1676436134885/work
charset-normalizer==3.3.2
click @ file:///C:/b/abs_f9ihnt72pu/croot/click_1698129847492/work
cloudpickle @ file:///C:/b/abs_3796yxesic/croot/cloudpickle_1683040098851/work
clr-loader==0.2.6
clyent==1.2.2
colorama @ file:///C:/ci_311/colorama_1676422310965/work
colorcet @ file:///C:/ci_311/colorcet_1676440389947/work
comm @ file:///C:/ci_311/comm_1678376562840/work
conda @ file:///C:/b/abs_1e6dlkntna/croot/conda_1710772093015/work
conda-build @ file:///C:/b/abs_3ed9gavxgz/croot/conda-build_1708025907525/work
conda-content-trust @ file:///C:/b/abs_e3bcpyv7sw/croot/conda-content-trust_1693490654398/work
conda-libmamba-solver @ file:///croot/conda-libmamba-solver_1706733287605/work/src
conda-pack @ file:///tmp/build/80754af9/conda-pack_1611163042455/work
conda-package-handling @ file:///C:/b/abs_b9wp3lr1gn/croot/conda-package-handling_1691008700066/work
conda-repo-cli==1.0.75
conda-token @ file:///Users/paulyim/miniconda3/envs/c3i/conda-bld/conda-token_1662660369760/work
conda-verify==3.4.2
conda_index @ file:///croot/conda-index_1706633791028/work
conda_package_streaming @ file:///C:/b/abs_6c28n38aaj/croot/conda-package-streaming_1690988019210/work
constantly @ file:///C:/b/abs_cbuavw4443/croot/constantly_1703165617403/work
contourpy==1.2.1
cookiecutter @ file:///C:/b/abs_3d1730toam/croot/cookiecutter_1700677089156/work
cryptography @ file:///C:/b/abs_531eqmhgsd/croot/cryptography_1707523768330/work
cssselect @ file:///C:/b/abs_71gnjab7b0/croot/cssselect_1707339955530/work
cycler==0.12.1
cytoolz @ file:///C:/b/abs_d43s8lnb60/croot/cytoolz_1701723636699/work
dask @ file:///C:/b/abs_1899k8plyj/croot/dask-core_1701396135885/work
datashader @ file:///C:/b/abs_cb5s63ty8z/croot/datashader_1699544282143/work
debugpy @ file:///C:/b/abs_c0y1fjipt2/croot/debugpy_1690906864587/work
decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work
defusedxml @ file:///tmp/build/80754af9/defusedxml_1615228127516/work
Deprecated==1.2.14
diff-match-patch @ file:///Users/ktietz/demo/mc3/conda-bld/diff-match-patch_1630511840874/work
dill @ file:///C:/b/abs_084unuus3z/croot/dill_1692271268687/work
distributed @ file:///C:/b/abs_5eren88ku4/croot/distributed_1701398076011/work
distro @ file:///C:/b/abs_a3uni_yez3/croot/distro_1701455052240/work
Django==5.0.4
docker==7.0.0
docstring-to-markdown @ file:///C:/ci_311/docstring-to-markdown_1677742566583/work
docutils @ file:///C:/ci_311/docutils_1676428078664/work
ecdsa==0.18.0
elementpath==4.4.0
entrypoints @ file:///C:/ci_311/entrypoints_1676423328987/work
et-xmlfile==1.1.0
executing @ file:///opt/conda/conda-bld/executing_1646925071911/work
fabric==3.2.2
fastjsonschema @ file:///C:/ci_311/python-fastjsonschema_1679500568724/work
filelock @ file:///C:/b/abs_f2gie28u58/croot/filelock_1700591233643/work
flake8 @ file:///C:/ci_311/flake8_1678376624746/work
Flask @ file:///C:/b/abs_efc024w7fv/croot/flask_1702980041157/work
fonttools==4.51.0
fpdf2==2.7.8
frozenlist @ file:///C:/b/abs_d8e__s1ys3/croot/frozenlist_1698702612014/work
fsspec @ file:///C:/b/abs_97mpfsesn0/croot/fsspec_1701286534629/work
future @ file:///C:/ci_311_rebuilds/future_1678998246262/work
gensim @ file:///C:/ci_311/gensim_1677743037820/work
geomdl==5.3.1
gitdb @ file:///tmp/build/80754af9/gitdb_1617117951232/work
GitPython @ file:///C:/b/abs_e1lwow9h41/croot/gitpython_1696937027832/work
gmpy2 @ file:///C:/ci_311/gmpy2_1677743390134/work
google-api-core==2.18.0
google-api-python-client==2.125.0
google-auth==2.29.0
google-auth-httplib2==0.2.0
googleapis-common-protos==1.63.0
greenlet @ file:///C:/b/abs_a6c75ie0bc/croot/greenlet_1702060012174/work
grpcio==1.62.1
grpcio-health-checking==1.48.2
grpcio-status==1.48.2
h5py @ file:///C:/b/abs_17fav01gwy/croot/h5py_1691589733413/work
HeapDict @ file:///Users/ktietz/demo/mc3/conda-bld/heapdict_1630598515714/work
holoviews @ file:///C:/b/abs_704uucojt7/croot/holoviews_1707836477070/work
httplib2==0.22.0
hvplot @ file:///C:/b/abs_3627uzd5h0/croot/hvplot_1706712443782/work
hyperlink @ file:///tmp/build/80754af9/hyperlink_1610130746837/work
idna==3.6
imagecodecs @ file:///C:/b/abs_e2g5zbs1q0/croot/imagecodecs_1695065012000/work
imageio @ file:///C:/b/abs_aeqerw_nps/croot/imageio_1707247365204/work
imagesize @ file:///C:/ci_311/imagesize_1676431905616/work
imbalanced-learn @ file:///C:/b/abs_87es3kd5fi/croot/imbalanced-learn_1700648276799/work
importlib_metadata==7.1.0
incremental @ file:///croot/incremental_1708639938299/work
inflection==0.5.1
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
intake @ file:///C:/ci_311_rebuilds/intake_1678999914269/work
intervaltree @ file:///Users/ktietz/demo/mc3/conda-bld/intervaltree_1630511889664/work
invoke==2.2.0
ipykernel @ file:///C:/b/abs_c2u94kxcy6/croot/ipykernel_1705933907920/work
ipython @ file:///C:/b/abs_b6pfgmrqnd/croot/ipython_1704833422163/work
ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work
ipywidgets @ file:///croot/ipywidgets_1701289330913/work
isort @ file:///tmp/build/80754af9/isort_1628603791788/work
itemadapter @ file:///tmp/build/80754af9/itemadapter_1626442940632/work
itemloaders @ file:///C:/b/abs_5e3azgv25z/croot/itemloaders_1708639993442/work
itsdangerous @ file:///tmp/build/80754af9/itsdangerous_1621432558163/work
jaraco.classes @ file:///tmp/build/80754af9/jaraco.classes_1620983179379/work
jedi @ file:///C:/ci_311/jedi_1679427407646/work
jellyfish @ file:///C:/b/abs_50kgvtnrbj/croot/jellyfish_1695193564091/work
Jinja2 @ file:///C:/b/abs_f7x5a8op2h/croot/jinja2_1706733672594/work
jmespath @ file:///C:/b/abs_59jpuaows7/croot/jmespath_1700144635019/work
joblib @ file:///C:/b/abs_1anqjntpan/croot/joblib_1685113317150/work
json5 @ file:///tmp/build/80754af9/json5_1624432770122/work
jsonpatch @ file:///tmp/build/80754af9/jsonpatch_1615747632069/work
jsonpointer==2.1
jsonschema @ file:///C:/b/abs_d1c4sm8drk/croot/jsonschema_1699041668863/work
jsonschema-specifications @ file:///C:/b/abs_0brvm6vryw/croot/jsonschema-specifications_1699032417323/work
jupyter @ file:///C:/b/abs_4e102rc6e5/croot/jupyter_1707947170513/work
jupyter-console @ file:///C:/b/abs_82xaa6i2y4/croot/jupyter_console_1680000189372/work
jupyter-events @ file:///C:/b/abs_17ajfqnlz0/croot/jupyter_events_1699282519713/work
jupyter-lsp @ file:///C:/b/abs_ecle3em9d4/croot/jupyter-lsp-meta_1699978291372/work
jupyter_client @ file:///C:/b/abs_a6h3c8hfdq/croot/jupyter_client_1699455939372/work
jupyter_core @ file:///C:/b/abs_c769pbqg9b/croot/jupyter_core_1698937367513/work
jupyter_server @ file:///C:/b/abs_7esjvdakg9/croot/jupyter_server_1699466495151/work
jupyter_server_terminals @ file:///C:/b/abs_ec0dq4b50j/croot/jupyter_server_terminals_1686870763512/work
jupyterlab @ file:///C:/b/abs_43venm28fu/croot/jupyterlab_1706802651134/work
jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work
jupyterlab-widgets @ file:///C:/b/abs_adrrqr26no/croot/jupyterlab_widgets_1700169018974/work
jupyterlab_server @ file:///C:/b/abs_e08i7qn9m8/croot/jupyterlab_server_1699555481806/work
keyring @ file:///C:/b/abs_dbjc7g0dh2/croot/keyring_1678999228878/work
kiwisolver==1.4.5
lazy-object-proxy @ file:///C:/ci_311/lazy-object-proxy_1676432050939/work
lazy_loader @ file:///C:/b/abs_3bn4_r4g42/croot/lazy_loader_1695850158046/work
lckr_jupyterlab_variableinspector @ file:///C:/b/abs_b5yb2mprx2/croot/jupyterlab-variableinspector_1701096592545/work
libarchive-c @ file:///tmp/build/80754af9/python-libarchive-c_1617780486945/work
libmambapy @ file:///C:/b/abs_2euls_1a38/croot/mamba-split_1704219444888/work/libmambapy
linkify-it-py @ file:///C:/ci_311/linkify-it-py_1676474436187/work
llvmlite @ file:///C:/b/abs_da15r8vkf8/croot/llvmlite_1706910779994/work
lmdb @ file:///C:/b/abs_556ronuvb2/croot/python-lmdb_1682522366268/work
locket @ file:///C:/ci_311/locket_1676428325082/work
lxml @ file:///C:/b/abs_9e7tpg2vv9/croot/lxml_1695058219431/work
lz4 @ file:///C:/b/abs_064u6aszy3/croot/lz4_1686057967376/work
Markdown @ file:///C:/ci_311/markdown_1676437912393/work
markdown-it-py @ file:///C:/b/abs_a5bfngz6fu/croot/markdown-it-py_1684279915556/work
MarkupSafe @ file:///C:/b/abs_ecfdqh67b_/croot/markupsafe_1704206030535/work
marshmallow==3.21.1
marshmallow-oneofschema==3.1.1
matplotlib==3.8.4
matplotlib-inline @ file:///C:/ci_311/matplotlib-inline_1676425798036/work
mccabe @ file:///opt/conda/conda-bld/mccabe_1644221741721/work
mdit-py-plugins @ file:///C:/ci_311/mdit-py-plugins_1676481827414/work
mdurl @ file:///C:/ci_311/mdurl_1676442676678/work
menuinst @ file:///C:/b/abs_099kybla52/croot/menuinst_1706732987063/work
mistune @ file:///C:/ci_311/mistune_1676425111783/work
mkl-fft @ file:///C:/b/abs_19i1y8ykas/croot/mkl_fft_1695058226480/work
mkl-random @ file:///C:/b/abs_edwkj1_o69/croot/mkl_random_1695059866750/work
mkl-service==2.4.0
more-itertools @ file:///C:/b/abs_36p38zj5jx/croot/more-itertools_1700662194485/work
mpmath @ file:///C:/b/abs_7833jrbiox/croot/mpmath_1690848321154/work
msgpack @ file:///C:/ci_311/msgpack-python_1676427482892/work
multidict @ file:///C:/b/abs_44ido987fv/croot/multidict_1701097803486/work
multipledispatch @ file:///C:/ci_311/multipledispatch_1676442767760/work
munkres==1.1.4
mypy @ file:///C:/b/abs_3880czibje/croot/mypy-split_1708366584048/work
mypy-extensions @ file:///C:/b/abs_8f7xiidjya/croot/mypy_extensions_1695131051147/work
navigator-updater @ file:///C:/b/abs_895otdwmo9/croot/navigator-updater_1695210220239/work
nbclient @ file:///C:/b/abs_cal0q5fyju/croot/nbclient_1698934263135/work
nbconvert @ file:///C:/b/abs_17p29f_rx4/croot/nbconvert_1699022793097/work
nbformat @ file:///C:/b/abs_5a2nea1iu2/croot/nbformat_1694616866197/work
nest-asyncio @ file:///C:/b/abs_65d6lblmoi/croot/nest-asyncio_1708532721305/work
networkx @ file:///C:/b/abs_e6gi1go5op/croot/networkx_1690562046966/work
nh3==0.2.17
nltk @ file:///C:/b/abs_a638z6l1z0/croot/nltk_1688114186909/work
notebook @ file:///C:/b/abs_65xjlnf9q4/croot/notebook_1708029957105/work
notebook_shim @ file:///C:/b/abs_a5xysln3lb/croot/notebook-shim_1699455926920/work
numba @ file:///C:/b/abs_3e3co1qfvo/croot/numba_1707085143481/work
numexpr @ file:///C:/b/abs_5fucrty5dc/croot/numexpr_1696515448831/work
numpy @ file:///C:/b/abs_c1ywpu18ar/croot/numpy_and_numpy_base_1708638681471/work/dist/numpy-1.26.4-cp311-cp311-win_amd64.whl#sha256=5dfd3e04dc1c2826d3f404fdc7f93c097901f5da9b91f4f394f79d4e038ed81d
numpydoc @ file:///C:/ci_311/numpydoc_1676453412027/work
openpyxl==3.0.10
overrides @ file:///C:/b/abs_cfh89c8yf4/croot/overrides_1699371165349/work
packaging==24.0
pandas @ file:///C:/b/abs_fej9bi0gew/croot/pandas_1702318041921/work/dist/pandas-2.1.4-cp311-cp311-win_amd64.whl#sha256=d3609b7cc3e3c4d99ad640a4b8e710ba93ccf967ab8e5245b91033e0200f9286
pandocfilters @ file:///opt/conda/conda-bld/pandocfilters_1643405455980/work
panel @ file:///C:/b/abs_abnm_ot327/croot/panel_1706539613212/work
param @ file:///C:/b/abs_39ncjvb7lu/croot/param_1705937833389/work
paramiko @ file:///opt/conda/conda-bld/paramiko_1640109032755/work
parsel @ file:///C:/b/abs_ebc3tzm_c4/croot/parsel_1707503517596/work
parso @ file:///opt/conda/conda-bld/parso_1641458642106/work
partd @ file:///C:/b/abs_46awex0fd7/croot/partd_1698702622970/work
pathlib @ file:///Users/ktietz/demo/mc3/conda-bld/pathlib_1629713961906/work
pathspec @ file:///C:/ci_311/pathspec_1679427644142/work
patsy==0.5.3
pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work
pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work
pillow==10.3.0
Pint==0.23
pkce @ file:///C:/b/abs_d0z4444tb0/croot/pkce_1690384879799/work
pkginfo @ file:///C:/b/abs_d18srtr68x/croot/pkginfo_1679431192239/work
platformdirs==4.2.0
plotly==5.20.0
pluggy @ file:///C:/ci_311/pluggy_1676422178143/work
plumbum==1.8.2
ply==3.11
pooch==1.8.1
prometheus-client @ file:///C:/ci_311/prometheus_client_1679591942558/work
prompt-toolkit @ file:///C:/b/abs_68uwr58ed1/croot/prompt-toolkit_1704404394082/work
Protego @ file:///tmp/build/80754af9/protego_1598657180827/work
proto-plus==1.23.0
protobuf==3.20.3
psutil==5.9.8
ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
pure-eval @ file:///opt/conda/conda-bld/pure_eval_1646925070566/work
py-cpuinfo @ file:///C:/b/abs_9ej7u6shci/croot/py-cpuinfo_1698068121579/work
pyaedt==0.7.10
pyansys==2024.1.7
pyansys-tools-versioning==0.5.0
pyarrow @ file:///C:/b/abs_93i_y2dub4/croot/pyarrow_1707330894046/work/python
pyasn1 @ file:///Users/ktietz/demo/mc3/conda-bld/pyasn1_1629708007385/work
pyasn1-modules==0.2.8
pycodestyle @ file:///C:/ci_311/pycodestyle_1678376707834/work
pycosat @ file:///C:/b/abs_31zywn1be3/croot/pycosat_1696537126223/work
pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work
pyct @ file:///C:/ci_311/pyct_1676438538057/work
pycurl==7.45.2
pydantic==2.6.4
pydantic_core==2.16.3
pydeck @ file:///C:/b/abs_ad9p880wi1/croot/pydeck_1706194121328/work
PyDispatcher==2.0.5
pydocstyle @ file:///C:/ci_311/pydocstyle_1678402028085/work
pyerfa @ file:///C:/ci_311/pyerfa_1676503994641/work
pyflakes @ file:///C:/ci_311/pyflakes_1678402101687/work
Pygments @ file:///C:/b/abs_fay9dpq4n_/croot/pygments_1684279990574/work
pygranta==2024.1.0
pyiges==0.3.1
PyJWT @ file:///C:/ci_311/pyjwt_1676438890509/work
pylint @ file:///C:/ci_311/pylint_1678740302984/work
pylint-venv @ file:///C:/ci_311/pylint-venv_1678402170638/work
pyls-spyder==0.4.0
PyNaCl @ file:///C:/ci_311/pynacl_1676445861112/work
pyodbc @ file:///C:/b/abs_90kly0uuwz/croot/pyodbc_1705431396548/work
pyOpenSSL @ file:///C:/b/abs_baj0aupznq/croot/pyopenssl_1708380486701/work
pyparsing==3.1.2
pypiwin32==223
pypng==0.20220715.0
pyproject_hooks==1.0.0
PyQt5==5.15.10
PyQt5-sip @ file:///C:/b/abs_c0pi2mimq3/croot/pyqt-split_1698769125270/work/pyqt_sip
PyQtWebEngine==5.15.6
Pyro5==5.15
PySocks @ file:///C:/ci_311/pysocks_1676425991111/work
pyspnego==0.10.2
pytest @ file:///C:/b/abs_48heoo_k8y/croot/pytest_1690475385915/work
python-dateutil==2.9.0.post0
python-dotenv @ file:///C:/ci_311/python-dotenv_1676455170580/work
python-jose==3.3.0
python-json-logger @ file:///C:/b/abs_cblnsm6puj/croot/python-json-logger_1683824130469/work
python-keycloak==2.0.0
python-lsp-black @ file:///C:/ci_311/python-lsp-black_1678721855627/work
python-lsp-jsonrpc==1.0.0
python-lsp-server @ file:///C:/b/abs_catecj7fv1/croot/python-lsp-server_1681930405912/work
python-slugify @ file:///tmp/build/80754af9/python-slugify_1620405669636/work
python-snappy @ file:///C:/ci_311/python-snappy_1676446060182/work
pytoolconfig @ file:///C:/b/abs_f2j_xsvrpn/croot/pytoolconfig_1701728751207/work
pytwin==0.6.0
pytz @ file:///C:/b/abs_19q3ljkez4/croot/pytz_1695131651401/work
pyvista==0.43.5
pyviz_comms @ file:///C:/b/abs_31r9afnand/croot/pyviz_comms_1701728067143/work
pywavelets @ file:///C:/b/abs_7est386xsb/croot/pywavelets_1705049855879/work
pywin32==305.1
pywin32-ctypes @ file:///C:/ci_311/pywin32-ctypes_1676427747089/work
pywinpty @ file:///C:/ci_311/pywinpty_1677707791185/work/target/wheels/pywinpty-2.0.10-cp311-none-win_amd64.whl
PyYAML @ file:///C:/b/abs_782o3mbw7z/croot/pyyaml_1698096085010/work
pyzmq @ file:///C:/b/abs_89aq69t0up/croot/pyzmq_1705605705281/work
QDarkStyle @ file:///tmp/build/80754af9/qdarkstyle_1617386714626/work
qstylizer @ file:///C:/ci_311/qstylizer_1678502012152/work/dist/qstylizer-0.2.2-py2.py3-none-any.whl
QtAwesome @ file:///C:/ci_311/qtawesome_1678402331535/work
qtconsole @ file:///C:/b/abs_eb4u9jg07y/croot/qtconsole_1681402843494/work
QtPy @ file:///C:/b/abs_derqu__3p8/croot/qtpy_1700144907661/work
queuelib @ file:///C:/b/abs_563lpxcne9/croot/queuelib_1696951148213/work
readme_renderer==43.0
referencing @ file:///C:/b/abs_09f4hj6adf/croot/referencing_1699012097448/work
regex @ file:///C:/b/abs_d5e2e5uqmr/croot/regex_1696515472506/work
requests @ file:///C:/b/abs_474vaa3x9e/croot/requests_1707355619957/work
requests-file @ file:///Users/ktietz/demo/mc3/conda-bld/requests-file_1629455781986/work
requests-negotiate-sspi==0.5.2
requests-ntlm==1.2.0
requests-toolbelt @ file:///C:/b/abs_2fsmts66wp/croot/requests-toolbelt_1690874051210/work
rfc3339-validator @ file:///C:/b/abs_ddfmseb_vm/croot/rfc3339-validator_1683077054906/work
rfc3986==2.0.0
rfc3986-validator @ file:///C:/b/abs_6e9azihr8o/croot/rfc3986-validator_1683059049737/work
rich @ file:///C:/b/abs_09j2g5qnu8/croot/rich_1684282185530/work
rope @ file:///C:/ci_311/rope_1678402524346/work
rpds-py @ file:///C:/b/abs_76j4g4la23/croot/rpds-py_1698947348047/work
rpyc==5.3.1
rsa==4.9
Rtree @ file:///C:/ci_311/rtree_1676455758391/work
ruamel-yaml-conda @ file:///C:/ci_311/ruamel_yaml_1676455799258/work
ruamel.yaml @ file:///C:/ci_311/ruamel.yaml_1676439214109/work
s3fs @ file:///C:/b/abs_24vbfcawyu/croot/s3fs_1701294224436/work
scikit-image @ file:///C:/b/abs_f7z1pjjn6f/croot/scikit-image_1707346180040/work
scikit-learn @ file:///C:/b/abs_38k7ridbgr/croot/scikit-learn_1684954723009/work
scipy==1.13.0
scooby==0.9.2
Scrapy @ file:///C:/ci_311/scrapy_1678502587780/work
seaborn @ file:///C:/ci_311/seaborn_1676446547861/work
semver==3.0.2
Send2Trash @ file:///C:/b/abs_08dh49ew26/croot/send2trash_1699371173324/work
serpent==1.41
service-identity @ file:///Users/ktietz/demo/mc3/conda-bld/service_identity_1629460757137/work
sip @ file:///C:/b/abs_edevan3fce/croot/sip_1698675983372/work
six @ file:///tmp/build/80754af9/six_1644875935023/work
smart-open @ file:///C:/ci_311/smart_open_1676439339434/work
smmap @ file:///tmp/build/80754af9/smmap_1611694433573/work
sniffio @ file:///C:/b/abs_3akdewudo_/croot/sniffio_1705431337396/work
snowballstemmer @ file:///tmp/build/80754af9/snowballstemmer_1637937080595/work
sortedcontainers @ file:///tmp/build/80754af9/sortedcontainers_1623949099177/work
soupsieve @ file:///C:/b/abs_bbsvy9t4pl/croot/soupsieve_1696347611357/work
Sphinx @ file:///C:/ci_311/sphinx_1676434546244/work
sphinxcontrib-applehelp @ file:///home/ktietz/src/ci/sphinxcontrib-applehelp_1611920841464/work
sphinxcontrib-devhelp @ file:///home/ktietz/src/ci/sphinxcontrib-devhelp_1611920923094/work
sphinxcontrib-htmlhelp @ file:///tmp/build/80754af9/sphinxcontrib-htmlhelp_1623945626792/work
sphinxcontrib-jsmath @ file:///home/ktietz/src/ci/sphinxcontrib-jsmath_1611920942228/work
sphinxcontrib-qthelp @ file:///home/ktietz/src/ci/sphinxcontrib-qthelp_1611921055322/work
sphinxcontrib-serializinghtml @ file:///tmp/build/80754af9/sphinxcontrib-serializinghtml_1624451540180/work
spyder @ file:///C:/b/abs_e99kl7d8t0/croot/spyder_1681934304813/work
spyder-kernels @ file:///C:/b/abs_e788a8_4y9/croot/spyder-kernels_1691599588437/work
SQLAlchemy @ file:///C:/b/abs_876dxwqqu8/croot/sqlalchemy_1705089154696/work
sqlparse==0.4.4
sseclient-py==1.8.0
sspilib==0.1.0
stack-data @ file:///opt/conda/conda-bld/stack_data_1646927590127/work
statsmodels @ file:///C:/b/abs_7bth810rna/croot/statsmodels_1689937298619/work
streamlit @ file:///C:/b/abs_ba5je7xxy7/croot/streamlit_1706200559831/work
sympy @ file:///C:/b/abs_82njkonm7f/croot/sympy_1701397685028/work
tables @ file:///C:/b/abs_411740ajo7/croot/pytables_1705614883108/work
tabulate @ file:///C:/b/abs_21rf8iibnh/croot/tabulate_1701354830521/work
tblib @ file:///Users/ktietz/demo/mc3/conda-bld/tblib_1629402031467/work
tenacity @ file:///C:/b/abs_ddkoa9nju6/croot/tenacity_1682972298929/work
terminado @ file:///C:/ci_311/terminado_1678228513830/work
text-unidecode @ file:///Users/ktietz/demo/mc3/conda-bld/text-unidecode_1629401354553/work
textdistance @ file:///tmp/build/80754af9/textdistance_1612461398012/work
threadpoolctl @ file:///Users/ktietz/demo/mc3/conda-bld/threadpoolctl_1629802263681/work
three-merge @ file:///tmp/build/80754af9/three-merge_1607553261110/work
tifffile @ file:///C:/b/abs_45o5chuqwt/croot/tifffile_1695107511025/work
tinycss2 @ file:///C:/ci_311/tinycss2_1676425376744/work
tldextract @ file:///opt/conda/conda-bld/tldextract_1646638314385/work
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tomli==2.0.1
tomlkit @ file:///C:/ci_311/tomlkit_1676425418821/work
toolz @ file:///C:/ci_311/toolz_1676431406517/work
tornado @ file:///C:/b/abs_0cbrstidzg/croot/tornado_1696937003724/work
tqdm==4.66.2
traitlets @ file:///C:/ci_311/traitlets_1676423290727/work
truststore @ file:///C:/b/abs_55z7b3r045/croot/truststore_1695245455435/work
twine==5.0.0
Twisted @ file:///C:/b/abs_e7yqd811in/croot/twisted_1708702883769/work
twisted-iocpsupport @ file:///C:/ci_311/twisted-iocpsupport_1676447612160/work
typing_extensions @ file:///C:/b/abs_72cdotwc_6/croot/typing_extensions_1705599364138/work
tzdata @ file:///croot/python-tzdata_1690578112552/work
tzlocal @ file:///C:/ci_311/tzlocal_1676439620276/work
uc-micro-py @ file:///C:/ci_311/uc-micro-py_1676457695423/work
ujson @ file:///C:/ci_311/ujson_1676434714224/work
Unidecode @ file:///tmp/build/80754af9/unidecode_1614712377438/work
uritemplate==4.1.1
urllib3==2.2.1
validators @ file:///tmp/build/80754af9/validators_1612286467315/work
vtk==9.3.0
w3lib @ file:///C:/b/abs_957begrwnl/croot/w3lib_1708640020760/work
wakepy==0.7.2
watchdog @ file:///C:/ci_311/watchdog_1676457923624/work
wcwidth @ file:///Users/ktietz/demo/mc3/conda-bld/wcwidth_1629357192024/work
webencodings==0.5.1
websocket-client @ file:///C:/ci_311/websocket-client_1676426063281/work
Werkzeug @ file:///C:/b/abs_8578rs2ra_/croot/werkzeug_1679489759009/work
whatthepatch @ file:///C:/ci_311/whatthepatch_1678402578113/work
widgetsnbextension @ file:///C:/b/abs_derxhz1biv/croot/widgetsnbextension_1701273671518/work
win-inet-pton @ file:///C:/ci_311/win_inet_pton_1676425458225/work
wrapt @ file:///C:/ci_311/wrapt_1676432805090/work
xarray @ file:///C:/b/abs_5bkjiynp4e/croot/xarray_1689041498548/work
xlwings @ file:///C:/ci_311_rebuilds/xlwings_1679013429160/work
xmlschema==2.5.1
xyzservices @ file:///C:/ci_311/xyzservices_1676434829315/work
yapf @ file:///tmp/build/80754af9/yapf_1615749224965/work
yarl @ file:///C:/b/abs_8bxwdyhjvp/croot/yarl_1701105248152/work
zict @ file:///C:/b/abs_780gyydtbp/croot/zict_1695832899404/work
zipp==3.18.1
zope.interface @ file:///C:/ci_311/zope.interface_1676439868776/work
zstandard==0.19.0

📝 Logger output file

Show the logger output file. The error that I get is this:

 *** WARNING ***                         CP =       4.734   TIME= 12:51:49
 Parameter U_NODAL already exists.  It is deleted and redefined by the   
 *DIM command.
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - SET PARAMETER DIMENSIONS ON  U_NODAL TYPE=ARRA  DIMENSIONS= 10201     2     1

 *** WARNING ***                         CP =       4.734   TIME= 12:51:49
 Parameter U_NODAL already exists.  It is deleted and redefined by the   
 *DIM command.
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - VECTOR GET OPERATION  U_nodal(1,1)  VECTOR LENGTH=   10201
 NAME= NODE         1  U     X
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - VECTOR GET OPERATION  U_nodal(1,1)  VECTOR LENGTH=   10201
 NAME= NODE         1  U     X
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - VECTOR GET OPERATION  U_nodal(1,2)  VECTOR LENGTH=   10201
 NAME= NODE         1  U     Y
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - VECTOR GET OPERATION  U_nodal(1,2)  VECTOR LENGTH=   10201
 NAME= NODE         1  U     Y
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - ABBREVIATION STATUS-

  ABBREV    STRING
  SAVE_DB   SAVE
  RESUM_DB  RESUME
  QUIT      Fnc_/EXIT
  POWRGRPH  Fnc_/GRAPHICS

 PARAMETER STATUS-           (     13 PARAMETERS DEFINED)
                  (INCLUDING        6 INTERNAL PARAMETERS)

 NAME                              VALUE                        TYPE  DIMENSIONS
 ELEM_SUM                          10000.0000                  SCALAR
 FG                                                ARRAY   20402       1       1
 I                                 10201.0000                  SCALAR
 NODE_SUM                          10201.0000                  SCALAR
 NUM_NODES                         10201.0000                  SCALAR
 PORT                              50053.0000                  SCALAR
 U_NODAL                                           ARRAY   10201       2       1
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - ABBREVIATION STATUS-

  ABBREV    STRING
  SAVE_DB   SAVE
  RESUM_DB  RESUME
  QUIT      Fnc_/EXIT
  POWRGRPH  Fnc_/GRAPHICS

 PARAMETER STATUS-           (     13 PARAMETERS DEFINED)
                  (INCLUDING        6 INTERNAL PARAMETERS)

 NAME                              VALUE                        TYPE  DIMENSIONS
 ELEM_SUM                          10000.0000                  SCALAR
 FG                                                ARRAY   20402       1       1
 I                                 10201.0000                  SCALAR
 NODE_SUM                          10201.0000                  SCALAR
 NUM_NODES                         10201.0000                  SCALAR
 PORT                              50053.0000                  SCALAR
 U_NODAL                                           ARRAY   10201       2       1
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER STATUS- _PRM      (     13 PARAMETERS DEFINED)
                  (INCLUDING        6 INTERNAL PARAMETERS)

 NAME                              VALUE                        TYPE  DIMENSIONS
 _RETURN                           0.00000000                  SCALAR
 _STATUS                           0.00000000                  SCALAR
 _UIQR                             22.2000000                  SCALAR
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER STATUS- _PRM      (     13 PARAMETERS DEFINED)
                  (INCLUDING        6 INTERNAL PARAMETERS)

 NAME                              VALUE                        TYPE  DIMENSIONS
 _RETURN                           0.00000000                  SCALAR
 _STATUS                           0.00000000                  SCALAR
 _UIQR                             22.2000000                  SCALAR
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER STATUS- PRM_      (     13 PARAMETERS DEFINED)
                  (INCLUDING        6 INTERNAL PARAMETERS)
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER STATUS- PRM_      (     13 PARAMETERS DEFINED)
                  (INCLUDING        6 INTERNAL PARAMETERS)
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_core - __enter__ - Entering non-interactive mode
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_core - __enter__ - Entering non-interactive mode
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_core - __exit__ - Exiting non-interactive mode
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_core - __exit__ - Exiting non-interactive mode
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _flush_stored - Flushing stored commands
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _flush_stored - Flushing stored commands
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _flush_stored - Writing the following commands to a temporary apdl input file:
*MWRITE,U_NODAL,,,,kji,,,
(1E20.12)
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _flush_stored - Writing the following commands to a temporary apdl input file:
*MWRITE,U_NODAL,,,,kji,,,
(1E20.12)
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - input - Using python working directory as 'dir_' value.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - input - Using python working directory as 'dir_' value.
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER  = C:\Users\User\AppData\Local\Temp\ansys_moamvfynca
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER  = C:\Users\User\AppData\Local\Temp\ansys_moamvfynca
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _close_process - Closing processes
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _close_process - Closing processes
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_server - Killing MAPDL server
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_server - Killing MAPDL server
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _ctrl - Issuing CtrlRequest "EXIT"
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _ctrl - Issuing CtrlRequest "EXIT"
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_process - Killing process using subprocess.Popen.terminate
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_process - Killing process using subprocess.Popen.terminate
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 19560
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 19560
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 19560 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 19560 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 7908
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 7908
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 7908 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 7908 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 5564
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 5564
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 5564 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 5564 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 12920
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 12920
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 12920 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 12920 killed properly.
Traceback (most recent call last):

  File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
    exec(code, globals, locals)

  File c:\users\user\documents\codigos casa_marzo19\pyansys_micro_verif_reduz_marzo19\exemplo2_git.py:213
    Uy=solveU_homg(mapdl,nnods_mi,Fg[:, 1],False)

  File c:\users\user\documents\codigos casa_marzo19\pyansys_micro_verif_reduz_marzo19\exemplo2_git.py:91 in solveU_homg
    U1 = mapdl.parameters['U_nodal']

  File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\parameters.py:384 in __getitem__
    return self._get_parameter_array(key, parm["shape"])

  File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\misc.py:398 in wrapper
    out = func(*args, **kwargs)

  File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\parameters.py:536 in _get_parameter_array
    with self._mapdl.non_interactive:

  File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\mapdl_core.py:1376 in __exit__
    self._parent()._flush_stored()

  File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\mapdl_grpc.py:1971 in _flush_stored
    out = self.input(

  File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\errors.py:319 in wrapper
    raise MapdlExitedError(

MapdlExitedError: MAPDL server connection terminated with the following error
<_MultiThreadedRendezvous of RPC that terminated with:
	status = StatusCode.UNAVAILABLE
	details = "Connection reset"
	debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:50053 {grpc_message:"Connection reset", grpc_status:14, created_time:"2024-04-10T15:51:50.2858627+00:00"}"

The code also appears to fail in this line>  ***** ROUTINE COMPLETED *****  CP =       109.016
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER  = C:\Users\User\AppData\Local\Temp\ansys_bsacvyovid
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER  = C:\Users\User\AppData\Local\Temp\ansys_bsacvyovid
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER  = C:\Users\User\AppData\Local\Temp\ansys_bsacvyovid
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER  = C:\Users\User\AppData\Local\Temp\ansys_bsacvyovid
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_core - __enter__ - Entering non-interactive mode
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_core - __enter__ - Entering non-interactive mode
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_core - __enter__ - Entering non-interactive mode
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_core - __enter__ - Entering non-interactive mode
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_core - __exit__ - Exiting non-interactive mode
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_core - __exit__ - Exiting non-interactive mode
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_core - __exit__ - Exiting non-interactive mode
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_core - __exit__ - Exiting non-interactive mode
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _flush_stored - Flushing stored commands
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _flush_stored - Flushing stored commands
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _flush_stored - Flushing stored commands
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _flush_stored - Flushing stored commands
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _flush_stored - Writing the following commands to a temporary apdl input file:
*DIM,FG,,20402,3,1,,,,
*VREAD,FG(1, 1),_tmp.dat,,,IJK,20402,3,1,,,,,,,,
(1F20.12)
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _flush_stored - Writing the following commands to a temporary apdl input file:
*DIM,FG,,20402,3,1,,,,
*VREAD,FG(1, 1),_tmp.dat,,,IJK,20402,3,1,,,,,,,,
(1F20.12)
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _flush_stored - Writing the following commands to a temporary apdl input file:
*DIM,FG,,20402,3,1,,,,
*VREAD,FG(1, 1),_tmp.dat,,,IJK,20402,3,1,,,,,,,,
(1F20.12)
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _flush_stored - Writing the following commands to a temporary apdl input file:
*DIM,FG,,20402,3,1,,,,
*VREAD,FG(1, 1),_tmp.dat,,,IJK,20402,3,1,,,,,,,,
(1F20.12)
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - input - Using python working directory as 'dir_' value.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - input - Using python working directory as 'dir_' value.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - input - Using python working directory as 'dir_' value.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - input - Using python working directory as 'dir_' value.
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
DEBUG - GRPC_127.0.0.1:50053 -  mesh_grpc - _reset_cache - Resetting cache
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER  = C:\Users\User\AppData\Local\Temp\ansys_bsacvyovid
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER  = C:\Users\User\AppData\Local\Temp\ansys_bsacvyovid
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER  = C:\Users\User\AppData\Local\Temp\ansys_bsacvyovid
INFO - GRPC_127.0.0.1:50053 -  mapdl_core - run - PARAMETER  = C:\Users\User\AppData\Local\Temp\ansys_bsacvyovid
ite 25
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _close_process - Closing processes
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _close_process - Closing processes
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _close_process - Closing processes
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _close_process - Closing processes
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_server - Killing MAPDL server
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_server - Killing MAPDL server
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_server - Killing MAPDL server
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_server - Killing MAPDL server
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _ctrl - Issuing CtrlRequest "EXIT"
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _ctrl - Issuing CtrlRequest "EXIT"
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _ctrl - Issuing CtrlRequest "EXIT"
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _ctrl - Issuing CtrlRequest "EXIT"
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_process - Killing process using subprocess.Popen.terminate
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_process - Killing process using subprocess.Popen.terminate
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_process - Killing process using subprocess.Popen.terminate
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_process - Killing process using subprocess.Popen.terminate
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 11180
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 11180
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 11180
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 11180
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 11180 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 11180 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 11180 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 11180 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 13932
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 13932
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 13932
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 13932
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 13932 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 13932 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 13932 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 13932 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 14608
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 14608
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 14608
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 14608
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 14608 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 14608 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 14608 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 14608 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 21008
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 21008
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 21008
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Killing MAPDL process: 21008
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 21008 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 21008 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 21008 killed properly.
DEBUG - GRPC_127.0.0.1:50053 -  mapdl_grpc - _kill_child_process - Process 21008 killed properly.
Traceback (most recent call last):

  File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
    exec(code, globals, locals)

  File c:\users\user\documents\codigos casa_marzo19\pyansys_micro_verif_reduz_marzo19\exemplo2_git.py:208
    mapdl.parameters["Fg"]=Fg

  File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\parameters.py:400 in __setitem__
    self._set_parameter_array(key, value)

  File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\misc.py:398 in wrapper
    out = func(*args, **kwargs)

  File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\parameters.py:638 in _set_parameter_array
    with self._mapdl.non_interactive:

  File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\mapdl_core.py:1376 in __exit__
    self._parent()._flush_stored()

  File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\mapdl_grpc.py:1971 in _flush_stored
    out = self.input(

  File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\errors.py:319 in wrapper
    raise MapdlExitedError(

MapdlExitedError: MAPDL server connection terminated with the following error
<_MultiThreadedRendezvous of RPC that terminated with:
	status = StatusCode.UNAVAILABLE
	details = "Connection reset"
	debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:50053 {created_time:"2024-04-10T16:10:50.0198034+00:00", grpc_status:14, grpc_message:"Connection reset"}"
>

Hi @Clauperezma Try turning off the logging. Then add a mapdl.wait(1) right before the mapdl.solve() command. Also add mapdl.run("*del, U_nodal") to after the U1 = mapdl.parameters["U_NODAL"]. Lastly we really don't need to *get the node count every time before the *do loop that defines the applied force. Just define it when modeling. So after the amesh and allsel command I added mapdl.parameters["num_nodes"] = len(mapdl.mesh.nnum). Ran this a few times and each time completed all 200 solves.

Mike

p.s. MAPDL can define some material properties as functions of displacement. May be easier than a manual routine.

Hi @mikerife, thanks very much for your help. I made all the changes you suggested in the code, but I´m still getting the same issue. I even tried deleting the variable Fg given that this variable will be different for every iteration in the original code, but doesn´t work either. I´m including the code in case I´m forgetting something. Should I reinstall mapdl, or try to change the Ansys version? I´m also using Anaconda, could that be the issue?.

import numpy as np
from ansys.mapdl.core import launch_mapdl
#from ansys.mapdl.core import LOG
#LOG.setLevel("DEBUG")
#LOG.log_to_file("mylog.log")

mapdl =launch_mapdl(additional_switches='-smp')
mapdl.prep7()

def F_hom(nel_mi,inci_mi,coord_mi,nnods_mi,D):
 import numpy as np
 for i in range(0,nel_mi-1): # Read the element and its incidence
  nel_i = inci_mi[i, :]-1
    
    # Determine the x and y positions of the element nodes
  posxy = coord_mi[nel_i[0:], 0:3]
    
    # Gauss points
  ng = 2
  pxi = [-1/np.sqrt(3), 1/np.sqrt(3)]
  peta = [-1/np.sqrt(3), 1/np.sqrt(3)]
    
  wi = 1
  wj = 1
    
  Nfun = len(nel_i)  # Number of nodes in the element
  Fg = np.zeros((2*nnods_mi,3))
  kel = np.zeros((2 * Nfun, 2 * Nfun))  # Initialize the element matrix
  fel = np.zeros((2 * Nfun, 3))  # Initialize the element matrix
  Bs = np.zeros((3, 2 * Nfun))  # Initialize the strain matrix
  DH=np.zeros((3, 3))
  DH1=np.zeros((3, 3))
  De = np.zeros((3, 3))
  De1 = np.zeros((3, 3))
     
  for j in range(ng):
   xi = pxi[j]
   for k in range(ng):
    eta = peta[k]
    N = np.array([1/4 * (1 - xi) * (1 - eta), 1/4 * (1 + xi) * (1 - eta), 1/4 * (1 + xi) * (1 + eta), 1/4 * (1 - xi) * (1 + eta)])
    dNxi = np.array([eta/4 - 1/4, 1/4 - eta/4, eta/4 + 1/4, -eta/4 - 1/4])
    dNeta = np.array([xi/4 - 1/4, -xi/4 - 1/4, xi/4 + 1/4, 1/4 - xi/4])
             
            # Jacobian
    J = np.dot(np.array([dNxi, dNeta]), posxy)
    iJ = np.linalg.inv(J)
            
            # Strain matrix Bs - solid
    p = np.arange(0, 8, 2)
    Bs[0, p] = (iJ[0, 0] * dNxi) + (iJ[0, 1] * dNeta)
    Bs[1, p+1] = iJ[1, 0] * dNxi + iJ[1, 1] * dNeta
    Bs[2, p] = Bs[1, p+1]
    Bs[2, p+1] = Bs[0, p]
            
    fel=fel+np.dot(np.dot(Bs.T, D), np.linalg.det(J)) * wi * wj
 return fel 

def solveU_homg(mapdl, nnods_mi,Fg,case_xy):

  mapdl.antype("STATIC")
  mapdl.parameters["Fg"]=Fg
  mapdl.allsel()
  mapdl.ddele("ALL","ALL")
  mapdl.fdele("ALL","ALL")
  if case_xy==True:
        mapdl.d("x_nodes","UY",0)
        mapdl.d("y_nodes","UX",0)
        mapdl.allsel()
  else:    
        mapdl.d("x_nodes","UX",0)
        mapdl.d("y_nodes","UY",0)
        mapdl.allsel()         
    # Apply nodal forces and solve the system
  with mapdl.non_interactive:
        
      #mapdl.run('*get,num_nodes,node,0,count,max')
      mapdl.run('*do,i,1,num_nodes,1')  
      mapdl.f('i','FX','Fg((2*i)-1)')  
      mapdl.f('i','FY','Fg(2*i)') 
      mapdl.run('*enddo') 
        #for i in range(1, nnods_mi + 1):  
            #mapdl.f(i, "FX", Fg[2 * i - 2])  
            #mapdl.f(i, "FY", Fg[2 * i - 1]) 
  mapdl.wait(1)           
  mapdl.solve()       
    # Retrieve nodal displacements for X and Y directions
  mapdl.dim('U_nodal','ARRAY', 'num_nodes',2)
  mapdl.starvget('U_nodal(1,1)', "NODE", 1, 'U', 'X')
  mapdl.starvget('U_nodal(1,2)', "NODE", 1, 'U', 'Y')
 
  U1 = mapdl.parameters['U_nodal']
  mapdl.run("*del, U_nodal")  
  mapdl.run("*del, Fg")
    # Combine X and Y displacements into a single vector
  U_carga = np.zeros(2 * nnods_mi)
  U_carga[::2] = U1[:, 0]  # Assign X displacements to even indices
  U_carga[1::2] = U1[:, 1]  # Assign Y displacements to odd indices
  return U_carga


mi_nelx =100;           # Número de Elementos em x da célula de base
mi_nely =100;           # Número de Elementos em y da célula de base
mi_Lx = 1;             # Comprimento no eixo x da célula de base
mi_Ly = 1;             # Comprimento no eixo y da célula de base
mi_t  = 1;             # Espessura da célula de base
nel_mi=mi_nelx*mi_nely
mi_elist = list(range(1,nel_mi + 1))
tol=0.1/100
# Def41inir propiedades del material


E = 1 # Young's modulus in N/m
v = 0.3  # Poisson's ratio
xmin = 1E-3
p=3

steel_mat = 1
mapdl.mp("EX", steel_mat, E)
mapdl.mp("PRXY", steel_mat,v) 
void_mat = 2
mapdl.mp("EX", void_mat, E*(xmin**p))
mapdl.mp("PRXY", void_mat,v)

mapdl.et(1,"PLANE42",kop2=1)
mapdl.blc4(-mi_Lx/2,-mi_Ly/2,mi_Lx,mi_Ly)
mapdl.mat(steel_mat)
mapdl.allsel()
mapdl.lsel("S", "LOC", "X",-mi_Lx/2) 
mapdl.lsel("A", "LOC", "X",mi_Lx/2)  
mapdl.lesize("ALL","","",mi_nely)
mapdl.allsel()
mapdl.lsel("S", "LOC", "Y",-mi_Ly/2) 
mapdl.lsel("A", "LOC", "Y",mi_Ly/2) 
mapdl.lesize("ALL","","",mi_nelx)
mapdl.allsel()
mapdl.amesh("ALL") 
mapdl.allsel("ALL")  
  
mapdl.parameters["num_nodes"] = len(mapdl.mesh.nnum)  
  #Condiciones de frontera
nel_mi=int(mapdl.get("ELEM_sum","ELEMENT",0,"COUNT"))
nnods_mi=int(mapdl.get("NODE_sum","NODE",0,"COUNT"))

coord_mi = np.copy(mapdl.mesh.nodes[:, [0, 1]])  # coordinates matrix
elem_prop_mi = np.array(mapdl.mesh.elem)
inci_mi= np.copy(elem_prop_mi[:, -4::])  
  

 # Calculo sensibilidade
 #mapdl.run("/POST1 ")  # Post-processor module

 #mapdl.etable("energy","SENE",'') 
 #alpha1=mapdl.starvget('alpha',"ELEM","",'ETAB',"energy","","",2)
 #alpha=mapdl.parameters["alpha"]

 #Calculate x


V= np.zeros(nel_mi) 
C = []
x = np.ones(nel_mi,dtype=bool) 
x_anterior=np.ones(nel_mi,dtype=bool)  

ite=0
   
factor = E / (1 - v**2)
D = factor * np.array([[1, v, 0],
                        [v, 1, 0],
                        [0, 0, (1 - v) / 2]])
vol_frac = []
 #vol_frac.append(sum(x)/nel_mi) # topology vector

 #Condiciones de contorno U
mapdl.nsel("S","LOC","x",-mi_Lx/2-tol,-mi_Lx/2+tol) 
mapdl.cm("x0_nodes","NODE") 
mapdl.nsel("S","LOC","x",mi_Lx/2-tol,mi_Lx/2+tol) 
mapdl.cm("xa1_nodes","NODE") 
mapdl.cmsel("S","x0_nodes")
mapdl.cmsel("A","xa1_nodes")
mapdl.cm("x_nodes","NODE")
mapdl.allsel("ALL")
  #Select side 0 and Ly
mapdl.nsel("S","LOC","y",-mi_Ly/2-tol,-mi_Ly/2+tol) 
mapdl.cm("y0_nodes","NODE") 
mapdl.nsel("S","LOC","y",mi_Ly/2-tol,mi_Ly/2+tol) 
mapdl.cm("ya2_nodes","NODE")
mapdl.cmsel("S","y0_nodes")
mapdl.cmsel("A","ya2_nodes")
mapdl.cm("y_nodes","NODE")

fel=F_hom(nel_mi,inci_mi,coord_mi,nnods_mi,D)
for ite in range(200):
 
    # Update material properties based on changes in x
 index_x = np.argwhere(x != x_anterior)
 for i in index_x.flat:
        mat_id = 1 if x[i] else 2
        mapdl.emodif(int(i + 1), "MAT", mat_id)
    
    # Initialize arrays
 Fg = np.zeros((2 * nnods_mi, 3))
    
    # Loop over material indices
 for elem_idx in np.flatnonzero(x == 1):
        nodes = inci_mi[elem_idx]
        ind = np.ravel([[2 * node - 2, 2 * node - 1] for node in nodes])
        Fg[ind, :] += fel

 mapdl.parameters["Fg"]=Fg  
 mat_indices = np.argwhere(x ==1)    
    # Solve the system for every load  
 mapdl.run("/SOLU")       
 Ux=solveU_homg(mapdl,nnods_mi,Fg[:, 0],False)
 Uy=solveU_homg(mapdl,nnods_mi,Fg[:, 1],False)
 Uxy=solveU_homg(mapdl,nnods_mi,Fg[:,2],True) 
 mapdl.finish()
 print("ite",ite)

And this is the error:
Traceback (most recent call last):

File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)

File c:\users\user\documents\codigos casa_marzo19\pyansys_micro_verif_reduz_marzo19\ejemplo__cambiosgithub.py:217
mapdl.parameters["Fg"]=Fg

File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\parameters.py:400 in setitem
self._set_parameter_array(key, value)

File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\misc.py:398 in wrapper
out = func(*args, **kwargs)

File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\parameters.py:638 in _set_parameter_array
with self._mapdl.non_interactive:

File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\mapdl_core.py:1376 in exit
self._parent()._flush_stored()

File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\mapdl_grpc.py:1971 in _flush_stored
out = self.input(

File ~\anaconda3\Lib\site-packages\ansys\mapdl\core\errors.py:319 in wrapper
raise MapdlExitedError(

MapdlExitedError: MAPDL server connection terminated with the following error
<_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Connection reset"
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-04-11T14:14:01.5404325+00:00", grpc_status:14, grpc_message:"Connection reset"}"

@Clauperezma there are very few issues where reinstalling MAPDL is a solution. And I don't think this issue is one of them. Can you take Anaconda out of the equation and test?

Hi @mikerife, you were right. I reinstalled python and pymadl without Anaconda, but I keep getting the same error. Any other ideas I can try? Thanks again for all the help!

@Clauperezma try a system power reboot then run the PyMAPDL script again. What happens?

@mikerife I rebooted my computer but the problem persists. It did run once for 200 iterations, but then the next crashed after 40 iterations. I did the same modifications and ran it on my laptop but I keep getting the same error. Sometimes it will run successfully but then will crash, sometimes after a few iterations, and others when the count is very advanced. Thanks again for all the help.

I'm editing the comment, and add that I did this a couple of times and It does seem to improve once the PC is rebooted... The second time it ran 2 times for 200 iterations and crashed on the third try. The third time I reboot it and run for 3 times without crashing. On my laptop, however, I haven't had the same results.