ansys / pymapdl

Pythonic interface to MAPDL
https://mapdl.docs.pyansys.com
MIT License
424 stars 120 forks source link

gRPC server exceptions #2479

Open germa89 opened 11 months ago

germa89 commented 11 months ago

I am planning to record here the server side gRPC exceptions.

Table of contents

Issues

Le Tutour model

Running the model submitted by Tom Le Tutour, I hit this error.

MAPDL Traceback


2023-11-06 12:54:44 
2023-11-06 12:54:44  /OUTPUT FILE= anstmp
2023-11-06 12:55:35 
2023-11-06 12:55:35 ===================================================================================
2023-11-06 12:55:35 =   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
2023-11-06 12:55:35 =   RANK 1 PID 199 RUNNING AT 440cc01b3947
2023-11-06 12:55:35 =   KILLED BY SIGNAL: 9 (Killed)
2023-11-06 12:55:35 ===================================================================================
2023-11-06 12:55:35 
2023-11-06 12:55:35 ===================================================================================
2023-11-06 12:55:35 =   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
2023-11-06 12:55:35 =   RANK 2 PID 200 RUNNING AT 440cc01b3947
2023-11-06 12:55:35 =   KILLED BY SIGNAL: 9 (Killed)
2023-11-06 12:55:35 ===================================================================================
2023-11-06 12:55:35 
2023-11-06 12:55:35 ===================================================================================
2023-11-06 12:55:35 =   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
2023-11-06 12:55:35 =   RANK 3 PID 201 RUNNING AT 440cc01b3947
2023-11-06 12:55:35 =   KILLED BY SIGNAL: 9 (Killed)
2023-11-06 12:55:35 ===================================================================================
2023-11-06 12:55:35 E1106 11:55:35.241391010     868 proto_buffer_writer.h:67]   assertion failed: !byte_buffer->Valid()
2023-11-06 12:55:35 forrtl: error (76): Abort trap signal
2023-11-06 12:55:35 Image              PC                Routine            Line        Source             
2023-11-06 12:55:35 libpthread-2.17.s  00007FFFBBDE4630  Unknown               Unknown  Unknown
2023-11-06 12:55:35 libc-2.17.so       00007FFFB983E387  gsignal               Unknown  Unknown
2023-11-06 12:55:35 libc-2.17.so       00007FFFB983FA78  abort                 Unknown  Unknown
2023-11-06 12:55:35 libgrpc++.so.1.46  00007FFEA0B03894  Unknown               Unknown  Unknown
2023-11-06 12:55:35 libGrpcMapdl.so    00007FFEA194AF09  _ZNSt17_Function_     Unknown  Unknown
2023-11-06 12:55:35 libgrpcpp_channel  00007FFEA12056A1  _ZN4grpc8internal     Unknown  Unknown
2023-11-06 12:55:35 libgrpc++.so.1.46  00007FFEA0B21913  _ZN4grpc8internal     Unknown  Unknown
2023-11-06 12:55:35 libgrpc++.so.1.46  00007FFEA0B20EAC  _ZN4grpc8internal     Unknown  Unknown
2023-11-06 12:55:35 libGrpcMapdl.so    00007FFEA195AB99  _ZN4grpc12ServerW     Unknown  Unknown
2023-11-06 12:55:35 libGrpcMapdl.so    00007FFEA187828C  _ZN12C_StreamMgrC     Unknown  Unknown
2023-11-06 12:55:35 libGrpcMapdl.so    00007FFEA1878AAF  _ZNSt17_Function_     Unknown  Unknown
2023-11-06 12:55:35 libGrpcMapdl.so    00007FFEA187519C  _Z9WatchFileI12C_     Unknown  Unknown
2023-11-06 12:55:35 libstdc++.so.6.0.  00007FFFB9F1FB8F  Unknown               Unknown  Unknown
2023-11-06 12:55:35 libpthread-2.17.s  00007FFFBBDDCEA5  Unknown               Unknown  Unknown
2023-11-06 12:55:35 libc-2.17.so       00007FFFB990696D  clone                 Unknown  Unknown
2023-11-06 12:55:35 /ansys_inc/ansys/bin/ansysdis241: line 77:   777 Aborted                 /ansys_inc/ansys/bin/linx64/ansys.e -grpc

Python Traceback

Exception has occurred: MapdlExitedError
MAPDL server connection terminated
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/errors.py", line 153, in wrapper
    out = func(*args, **kwargs)
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl_grpc.py", line 2055, in _get
    getresponse = self._stub.Get(pb_types.GetRequest(getcmd=cmd))
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    status = StatusCode.UNAVAILABLE
    details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer"
    debug_error_string = "UNKNOWN:failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50072: recvmsg:Connection reset by peer {grpc_status:14, created_time:"2023-11-06T12:55:35.539832+01:00"}"
>

During handling of the above exception, another exception occurred:

  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/errors.py", line 168, in wrapper
    raise MapdlExitedError("MAPDL server connection terminated") from None
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl.py", line 2702, in get_value
    return self._get(
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/parameters.py", line 201, in platform
    return self._mapdl.get_value("ACTIVE", item1="PLATFORM")
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl_grpc.py", line 1277, in list_files
    if "L" in self.parameters.platform[:1]:
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl_grpc.py", line 1378, in download_result
    remote_files = self.list_files()
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl.py", line 2414, in result
    result_path = self.download_result(save_path)
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/misc.py", line 1120, in wrapper
    return function(self, *args, **kwargs)
  File "/Users/german.ayuso/pymapdl/tmp/letour/FieldComputer.py", line 331, in save_nodal_voltage_to_vtk
    self.mapdl.result.save_as_vtk(os.path.join(self.result_path, filename))
  File "/Users/german.ayuso/pymapdl/tmp/letour/compute_for_multiple_mesh_size_wb.py", line 36, in <module>
    fc.save_nodal_voltage_to_vtk(os.path.join(result_path, filename+".vtk"))
ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated
image

Same model as above. Running more times:

Exception has occurred: MapdlExitedError
MAPDL server connection terminated
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/errors.py", line 153, in wrapper
    out = func(*args, **kwargs)
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl_grpc.py", line 1828, in input
    _ = [chunk.cmdout for chunk in chunks]  # unstable
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl_grpc.py", line 1828, in <listcomp>
    _ = [chunk.cmdout for chunk in chunks]  # unstable
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
    status = StatusCode.UNAVAILABLE
    details = "Socket closed"
    debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:50072 {grpc_message:"Socket closed", grpc_status:14, created_time:"2023-11-06T13:40:16.945267+01:00"}"
>

During handling of the above exception, another exception occurred:

  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/errors.py", line 168, in wrapper
    raise MapdlExitedError("MAPDL server connection terminated") from None
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl_grpc.py", line 1512, in cdread
    self.input(fname, **kwargs)
  File "/Users/german.ayuso/pymapdl/tmp/letour/FieldComputer.py", line 83, in __init__
    self.mapdl.cdread("DB", "input.cdb")
  File "/Users/german.ayuso/pymapdl/tmp/letour/compute_for_multiple_mesh_size_wb.py", line 22, in <module>
    fc = FieldComputer(nproc = 20, verbose=True, result_path=this_result_folder, jobname=filename, cdb_path=os.path.join(input_path, filename + ".cdb"))
ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated

Memory analysis

Using dmesg I got:

[13805.080178] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=7a592394a755940f4abe040863983ad11c135aa1ddb8ddab2d0b20af5f71cd00,mems_allowed=0,global_oom,task_memcg=/docker/7a592394a755940f4abe040863983ad11c135aa1ddb8ddab2d0b20af5f71cd00,task=ansys.e,pid=34174,uid=0
[13805.080613] Out of memory: Killed process 34174 (ansys.e) total-vm:19713496kB, anon-rss:7374568kB, file-rss:516kB, shmem-rss:8960kB, UID:0 pgtables:21208kB oom_score_adj:0
Full log

[root@7a592394a755 simulation]# dmesg [13805.061797] grpcpp_sync_ser invoked oom-killer: gfp_mask=0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO), order=0, oom_score_adj=0 [13805.062014] CPU: 5 PID: 34355 Comm: grpcpp_sync_ser Tainted: G O 6.4.16-linuxkit #1 [13805.062148] Call trace: [13805.062261] dump_backtrace+0xb0/0xf4 [13805.062352] show_stack+0x30/0x44 [13805.062409] dump_stack_lvl+0x48/0x60 [13805.062461] dump_stack+0x18/0x24 [13805.062495] dump_header+0x4c/0x210 [13805.062561] oom_kill_process+0xac/0x188 [13805.062631] out_of_memory+0x2a0/0x2cc [13805.062685] __alloc_pages+0x8d0/0xa68 [13805.062745] __folio_alloc+0x40/0x80 [13805.062833] vma_alloc_zeroed_movable_folio+0x48/0x58 [13805.062895] __handle_mm_fault+0x3f8/0x8b0 [13805.062953] handle_mm_fault+0x198/0x1e0 [13805.063014] do_page_fault+0x27c/0x3a8 [13805.063060] do_translation_fault+0x4c/0x74 [13805.063096] do_mem_abort+0x54/0xa4 [13805.063154] el0_da+0x40/0x6c [13805.063202] el0t_64_sync_handler+0xc0/0x13c [13805.063270] el0t_64_sync+0x190/0x194 [13805.063369] Mem-Info: [13805.063389] active_anon:84382 inactive_anon:1856822 isolated_anon:111 [13805.063389] active_file:40 inactive_file:0 isolated_file:0 [13805.063389] unevictable:0 dirty:0 writeback:0 [13805.063389] slab_reclaimable:9257 slab_unreclaimable:11371 [13805.063389] mapped:22899 shmem:26118 pagetables:8582 [13805.063389] sec_pagetables:0 bounce:0 [13805.063389] kernel_misc_reclaimable:0 [13805.063389] free:17284 free_pcp:0 free_cma:0 [13805.064160] Node 0 active_anon:337528kB inactive_anon:7427288kB active_file:160kB inactive_file:0kB unevictable:0kB isolated(anon):444kB isolated(file):0kB mapped:91596kB dirty:0kB writeback:0kB shmem:104472kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 16384kB writeback_tmp:0kB kernel_stack:10560kB pagetables:34328kB sec_pagetables:0kB all_unreclaimable? no [13805.065055] DMA free:36948kB boost:0kB min:12744kB low:15928kB high:19112kB reserved_highatomic:2048KB active_anon:18912kB inactive_anon:2206520kB active_file:456kB inactive_file:804kB unevictable:0kB writepending:0kB present:2359296kB managed:2274504kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB [13805.065918] lowmem_reserve[]: 0 0 5630 5630 [13805.066059] Normal free:32188kB boost:0kB min:32308kB low:40384kB high:48460kB reserved_highatomic:0KB active_anon:319172kB inactive_anon:5220096kB active_file:832kB inactive_file:0kB unevictable:0kB writepending:0kB present:5926912kB managed:5765444kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB [13805.069338] lowmem_reserve[]: 0 0 0 0 [13805.069433] DMA: 218*4kB (UME) 195*8kB (UME) 142*16kB (UME) 106*32kB (UME) 77*64kB (UME) 49*128kB (UME) 20*256kB (E) 11*512kB (ME) 5*1024kB (UME) 1*2048kB (H) 0*4096kB = 37216kB [13805.069688] Normal: 1327*4kB (UME) 1683*8kB (UME) 453*16kB (UME) 78*32kB (UME) 15*64kB (UM) 4*128kB (UME) 9*256kB (M) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 32292kB [13805.069913] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB [13805.070099] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=32768kB [13805.070250] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB [13805.070414] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=64kB [13805.070495] 35831 total pagecache pages [13805.070553] 9628 pages in swap cache [13805.070629] Free swap = 0kB [13805.070709] Total swap = 1572860kB [13805.070897] 2071552 pages RAM [13805.070929] 0 pages HighMem/MovableOnly [13805.071023] 61565 pages reserved [13805.071063] Tasks state (memory values in pages): [13805.071175] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name [13805.071411] [ 125] 0 125 183037 11202 196608 1408 0 rc.init [13805.071562] [ 266] 0 266 177871 581 73728 0 0 logwrite [13805.071679] [ 273] 0 273 181383 4360 118784 0 0 procd [13805.071801] [ 455] 0 455 187435 8876 180224 256 0 containerd [13805.071962] [ 476] 0 476 179859 1160 98304 0 1 containerd-shim [13805.072121] [ 487] 0 487 190149 9317 188416 256 1 dns-forwarder [13805.072264] [ 500] 0 500 179795 1204 98304 0 1 containerd-shim [13805.072394] [ 511] 0 511 203 32 36864 0 1 docker-init [13805.072561] [ 514] 0 514 922 0 45056 32 1 entrypoint.sh [13805.072679] [ 526] 0 526 183689 8914 167936 1406 1 lifecycle-serve [13805.072819] [ 563] 102 563 4069 69 61440 64 1 rpcbind [13805.072922] [ 580] 0 580 1279 40 53248 64 1 rpc.statd [13805.073117] [ 603] 0 603 805 32 49152 0 1 rpc.idmapd [13805.073242] [ 608] 0 608 177871 32 69632 128 1 logwrite [13805.073354] [ 614] 0 614 391715 2960 294912 1088 -500 containerd [13805.073528] [ 656] 0 656 177871 64 73728 128 1 logwrite [13805.073809] [ 662] 0 662 915885 11573 741376 2112 1 dockerd [13805.073970] [ 689] 0 689 179859 1086 94208 128 1 containerd-shim [13805.074142] [ 710] 0 710 179859 1054 98304 96 1 containerd-shim [13805.074305] [ 720] 0 720 64273 160 278528 25984 1 artifactory-age [13805.074567] [ 730] 0 730 179859 1044 94208 128 1 containerd-shim [13805.074711] [ 750] 0 750 179795 969 94208 96 1 containerd-shim [13805.074854] [ 760] 0 760 181722 5061 192512 4576 1 container-files [13805.075035] [ 781] 0 781 179795 1029 98304 128 1 containerd-shim [13805.075147] [ 790] 0 790 176682 192 81920 64 1 devenv-server [13805.075249] [ 814] 0 814 179795 1036 94208 96 1 containerd-shim [13805.075422] [ 829] 0 829 181984 955 126976 544 1 diagnosticsd [13805.075596] [ 846] 0 846 179859 1009 102400 96 1 containerd-shim [13805.075757] [ 859] 0 859 178071 192 77824 64 1 http-proxy [13805.075846] [ 888] 0 888 179859 942 94208 0 1 containerd-shim [13805.076012] [ 904] 0 904 176291 288 81920 32 1 kmsg [13805.076119] [ 927] 0 927 179795 1033 98304 96 1 containerd-shim [13805.076235] [ 939] 0 939 199790 2452 270336 896 1 otelcol-docker- [13805.076363] [ 969] 0 969 179795 1086 98304 96 1 containerd-shim [13805.076527] [ 984] 0 984 178044 128 81920 160 1 start [13805.076625] [ 1016] 0 1016 205 96 40960 0 1 sntpc [13805.076761] [ 1028] 0 1028 179795 1037 94208 128 1 containerd-shim [13805.076896] [ 1077] 0 1077 179859 1125 98304 96 1 containerd-shim [13805.077043] [ 1093] 0 1093 178677 256 86016 96 1 trim-after-dele [13805.077214] [ 1135] 0 1135 179859 1164 98304 0 1 containerd-shim [13805.077316] [ 1154] 0 1154 179038 256 86016 352 1 volume-contents [13805.077434] [ 1196] 0 1196 179859 1215 94208 0 1 containerd-shim [13805.077576] [ 1212] 0 1212 179140 96 90112 224 1 vpnkit-forwarde [13805.077699] [ 1836] 0 1836 180115 632 102400 96 -499 containerd-shim [13805.077859] [ 1871] 0 1871 36638 204 86016 320 0 bash [13805.077956] [ 22888] 0 22888 36200 292 77824 0 0 sleep [13805.078073] [ 33307] 0 33307 180115 672 94208 0 -499 containerd-shim [13805.078198] [ 33333] 0 33333 39620 155 110592 672 0 bash [13805.078315] [ 33383] 0 33383 39819 218 114688 704 0 ansys241 [13805.078406] [ 33579] 0 33579 39531 304 110592 288 0 mpirun [13805.078562] [ 33584] 0 33584 40381 195 118784 512 0 mpiexec.hydra [13805.078702] [ 33585] 0 33585 40330 488 114688 224 0 hydra_pmi_proxy [13805.078832] [ 33588] 0 33588 39829 354 110592 576 0 ansysdis241 [13805.078994] [ 33589] 0 33589 39828 485 114688 480 0 ansysdis241 [13805.079129] [ 33590] 0 33590 39828 392 114688 544 0 ansysdis241 [13805.079222] [ 33591] 0 33591 39828 363 118784 544 0 ansysdis241 [13805.079338] [ 34171] 0 34171 1073933 4222 2301952 48864 0 ansys.e [13805.079454] [ 34172] 0 34172 1074548 3753 2297856 48448 0 ansys.e [13805.079573] [ 34173] 0 34173 1074427 3321 2301952 49216 0 ansys.e [13805.079677] [ 34174] 0 34174 4928374 1846011 21716992 152064 0 ansys.e [13805.079833] [ 34175] 0 34175 223865 469 315392 4704 0 ansyscl [13805.079974] [ 34229] 0 34229 39573 132 110592 480 0 sh [13805.080098] [ 34235] 0 34235 39617 168 110592 672 0 bash [13805.080178] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=7a592394a755940f4abe040863983ad11c135aa1ddb8ddab2d0b20af5f71cd00,mems_allowed=0,global_oom,task_memcg=/docker/7a592394a755940f4abe040863983ad11c135aa1ddb8ddab2d0b20af5f71cd00,task=ansys.e,pid=34174,uid=0 [13805.080613] Out of memory: Killed process 34174 (ansys.e) total-vm:19713496kB, anon-rss:7374568kB, file-rss:516kB, shmem-rss:8960kB, UID:0 pgtables:21208kB oom_score_adj:0

ChatGPT analysis:

The provided system traceback indicates that the Linux Out of Memory (OOM) killer has been triggered to terminate a process due to a severe memory shortage. In this case, the process with PID 34174, which is named "ansys.e," was killed.

Here's a breakdown of the information in the traceback:

Breakdown

1. `[13805.080178] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=7a592394a755940f4abe040863983ad11c135aa1ddb8ddab2d0b20af5f71cd00,mems_allowed=0,global_oom,task_memcg=/docker/7a592394a755940f4abe040863983ad11c135aa1ddb8ddab2d0b20af5f71cd00,task=ansys.e,pid=34174,uid=0` - `oom-kill`: Indicates that the OOM killer is activated. - `constraint=CONSTRAINT_NONE`: The constraint on memory usage is set to none, meaning there are no specific restrictions. - `nodemask=(null)`: No specific memory nodes are specified for allocation. - `cpuset=7a592394a755940f4abe040863983ad11c135aa1ddb8ddab2d0b20af5f71cd00`: Specifies the CPU set of the process. - `mems_allowed=0`: Indicates that the process is not allowed to use memory from any specific NUMA node (0 in this case). - `global_oom`: Suggests that this is a global OOM event affecting the entire system. - `task_memcg=/docker/7a592394a755940f4abe040863983ad11c135aa1ddb8ddab2d0b20af5f71cd00`: Specifies the memory control group (cgroup) associated with the Docker container running the process. - `task=ansys.e`: Name of the process that was killed (ansys.e). - `pid=34174`: Process ID of the terminated process. - `uid=0`: The user ID of the process owner (0 typically represents the root user). 2. `[13805.080613] Out of memory: Killed process 34174 (ansys.e) total-vm:19713496kB, anon-rss:7374568kB, file-rss:516kB, shmem-rss:8960kB, UID:0 pgtables:21208kB oom_score_adj:0` - `Out of memory`: Indicates that the system ran out of available memory. - `Killed process 34174 (ansys.e)`: Specifies that process 34174, named "ansys.e," was killed to free up memory. - `total-vm:19713496kB`: The total virtual memory size used by the process (in kilobytes). - `anon-rss:7374568kB`: The anonymous (non-file-backed) resident set size, indicating how much physical memory the process was using (in kilobytes). - `file-rss:516kB`: The resident set size for file-backed memory (in kilobytes). - `shmem-rss:8960kB`: The resident set size for shared memory (in kilobytes). - `UID:0`: The user ID of the process owner (0, the root user). - `pgtables:21208kB`: The size of page tables used by the process (in kilobytes). - `oom_score_adj:0`: The OOM score adjustment value for the process (a score that helps the kernel prioritize which process to kill when low on memory). In summary, this traceback shows that the "ansys.e" process was killed due to a severe memory shortage on the system. The process was using a significant amount of memory, and the OOM killer was triggered to free up memory resources for the system to continue running.

Discussion

The traceback shows that it is an SIGTERMsignal (Signal 9) triggered by an Out Of Memory (OOM) error. This is interesting because it means it could be avoided by increasing memory allocated to the container. But also it shows that the instabilities found in gRPC in non-dockerized environments are going to require a different setup (MAPDL local).

tletutour-an commented 11 months ago

Thank you @germa89 , in code.zip is the code that produces this issue. Some modification may be needed to get it to work (I am running MAPDL locally, on windows). FieldComputer.py is the helper class that is called by compute_for_multiple_mesh_size_wb.py This code does steady state electrical analysis using MAPDL. Original mesh (accessible using sharepoint link) is mesh200 elements that are then converted to solid232 (I've experienced some connection termination when running emodif method). BCs are added and the electrical field is computed. The electrical voltage is saved to vtk through the mapdl.result.save_to_vtk, which fails often. sharepoint link to cdb files code.zip

germa89 commented 1 month ago

Retrying again after merging https://github.com/ansys/pymapdl/commit/75f2b7e9ab699a7b04f93b24efd2d9192690db9c

Using docker ghcr.io/ansys/mapdl:v25.1.0

Output

(.venv) ➜  pymapdl /Users/german.ayuso/pymapdl/.venv/bin/python /Users/german.ayuso/pymapdl/tmp/letour/compute_for_multiple_mesh_size_wb.py
/Users/german.ayuso/pymapdl/tmp/letour/FieldComputer.py:43: UserWarning: Results path already exists
  warnings.warn("Results path already exists")
/Users/german.ayuso/pymapdl/tmp/letour/FieldComputer.py:48: UserWarning: Results path already exists
  warnings.warn("Results path already exists")
/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/launcher.py:814: UserWarning: The environment variable 'PYMAPDL_START_INSTANCE' is set, hence the argument 'start_instance' is overwritten.
  warnings.warn(
DEBUG - pymapdl_global -  launcher - get_start_instance - PYMAPDL_START_INSTANCE is set to false
DEBUG - pymapdl_global -  launcher - launch_mapdl - Using 'start_instance' equal to False.
DEBUG - pymapdl_global -  launcher - launch_mapdl - No IP address was supplied. Using the default IP address: 127.0.0.1
DEBUG - pymapdl_global -  launcher - launch_mapdl - Connecting to an existing instance of MAPDL at 127.0.0.1:50062
/local/simulation
[[  1 200]
 [  2 200]
 [  3 200]
 [  4 200]
 [  5 200]
 [  6 200]
 [  7 200]
 [  8 200]
 [  9 200]
 [ 10 200]
 [ 11 200]
 [ 12 200]
 [ 13 200]
 [ 14 200]
 [ 15 200]
 [ 16 200]
 [ 17 200]
 [ 18 200]
 [ 19 200]
 [ 20 200]
 [ 21 200]
 [ 22 200]
 [ 23 200]
 [ 24 200]
 [ 25 200]
 [ 26 200]
 [ 27 200]
 [ 28 200]]
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
 MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
 MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
 MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
 MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
 MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
 MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
MODIFY ALL SELECTED ELEMENTS TO HAVE  TYPE =        29
db read in 20.807718753814697
LIST MATERIALS        1 TO       28 BY        1
  PROPERTY= ALL 

 MATERIAL NUMBER        1

      TEMP        RSVX
                12.04819    

      TEMP        RSVY
                12.04819    

      TEMP        RSVZ
                1.666667    

     UVID =  12a7ade7-28ee-4827-b81f-db6f8cc3e033                            

 MATERIAL NUMBER        2

      TEMP        RSVX
                12.04819    

      TEMP        RSVY
                12.04819    

      TEMP        RSVZ
                1.666667    

     UVID =  12a7ade7-28ee-4827-b81f-db6f8cc3e033                            

 MATERIAL NUMBER        3

      TEMP        RSVX
                4.347826    

     UVID =  89da2362-edc0-479f-b22e-a83245b7a74a                            

 MATERIAL NUMBER        4

      TEMP        RSVX
               0.5882353    

     UVID =  85978d6e-faa5-4c19-90c1-1a155a095718                            

 MATERIAL NUMBER        5

      TEMP        RSVX
                33.33333    

     UVID =  6d2a42fe-e8fa-41e4-8ea1-ed5c68d9afa0                            

 MATERIAL NUMBER        6

      TEMP        RSVX
                25.00000    

     UVID =  07b897d4-ff2b-4ec3-8bf6-c7ffe391ee05                            

 MATERIAL NUMBER        7

      TEMP        RSVX
                50.00000    

     UVID =  e970a31a-deac-49aa-a1e2-f0b8c04e4f54                            

 MATERIAL NUMBER        8

      TEMP        RSVX
                50.00000    

     UVID =  e970a31a-deac-49aa-a1e2-f0b8c04e4f54                            

 MATERIAL NUMBER        9

      TEMP        RSVX
                50.00000    

     UVID =  e970a31a-deac-49aa-a1e2-f0b8c04e4f54                            

 MATERIAL NUMBER       10

      TEMP        RSVX
                50.00000    

     UVID =  e970a31a-deac-49aa-a1e2-f0b8c04e4f54                            

 MATERIAL NUMBER       11

      TEMP        RSVX
                50.00000    

     UVID =  e970a31a-deac-49aa-a1e2-f0b8c04e4f54                            

 MATERIAL NUMBER       12

      TEMP        RSVX
                4.000000    

     UVID =  51dbfe1b-f039-45b7-a9cf-3fef45498e4b                            

 MATERIAL NUMBER       13

      TEMP        RSVX
               0.1896454E-06

     UVID =  af6b7f52-657e-41df-a924-338ebc37f2d5                            

 MATERIAL NUMBER       14

      TEMP        RSVX
                500.0000    

     UVID =  1420f93e-4f33-4e86-a944-a78e56512980                            

 MATERIAL NUMBER       15

      TEMP        RSVX
               0.1896454E-06

     UVID =  af6b7f52-657e-41df-a924-338ebc37f2d5                            

 MATERIAL NUMBER       16

      TEMP        RSVX
                500.0000    

     UVID =  1420f93e-4f33-4e86-a944-a78e56512980                            

 MATERIAL NUMBER       17

      TEMP        RSVX
               0.1896454E-06

     UVID =  af6b7f52-657e-41df-a924-338ebc37f2d5                            

 MATERIAL NUMBER       18

      TEMP        RSVX
                500.0000    

     UVID =  1420f93e-4f33-4e86-a944-a78e56512980                            

 MATERIAL NUMBER       19

      TEMP        RSVX
               0.1896454E-06

     UVID =  af6b7f52-657e-41df-a924-338ebc37f2d5                            

 MATERIAL NUMBER       20

      TEMP        RSVX
                500.0000    

     UVID =  1420f93e-4f33-4e86-a944-a78e56512980                            

 MATERIAL NUMBER       21

      TEMP        RSVX
               0.1896454E-06

     UVID =  af6b7f52-657e-41df-a924-338ebc37f2d5                            

 MATERIAL NUMBER       22

      TEMP        RSVX
                500.0000    

     UVID =  1420f93e-4f33-4e86-a944-a78e56512980                            

 MATERIAL NUMBER       23

      TEMP        RSVX
               0.1896454E-06

     UVID =  af6b7f52-657e-41df-a924-338ebc37f2d5                            

 MATERIAL NUMBER       24

      TEMP        RSVX
                500.0000    

     UVID =  1420f93e-4f33-4e86-a944-a78e56512980                            

 MATERIAL NUMBER       25

      TEMP        RSVX
               0.1896454E-06

     UVID =  af6b7f52-657e-41df-a924-338ebc37f2d5                            

 MATERIAL NUMBER       26

      TEMP        RSVX
                500.0000    

     UVID =  1420f93e-4f33-4e86-a944-a78e56512980                            

 MATERIAL NUMBER       27

      TEMP        RSVX
               0.1896454E-06

     UVID =  af6b7f52-657e-41df-a924-338ebc37f2d5                            

 MATERIAL NUMBER       28

      TEMP        RSVX
                500.0000    

     UVID =  1420f93e-4f33-4e86-a944-a78e56512980
 *****  MAPDL SOLVE    COMMAND  *****
 *** WARNING ***                         CP =      50.422   TIME= 19:24:01
 Element shape checking is currently inactive.  Issue SHPP,ON or         
 SHPP,WARN to reactivate, if desired.                                    
Error:
MAPDL server connection terminated unexpectedly while running:
  SOLVE,
called by:
  _send_command_stream

Error:
  Socket closed
Full error:
<_MultiThreadedRendezvous of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "Socket closed"
        debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:50062 {grpc_message:"Socket closed", grpc_status:14, created_time:"2024-08-08T21:24:16.752539+02:00"}"
>
Solve seems to have failed, retrieving .err files.
DEBUG - pymapdl_global -  launcher - get_start_instance - PYMAPDL_START_INSTANCE is set to false
Traceback (most recent call last):
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/errors.py", line 310, in wrapper
    out = func(*args, **kwargs)
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl_grpc.py", line 2041, in _get
    getresponse = self._stub.Get(pb_types.GetRequest(getcmd=cmd))
  File "/Users/german.ayuso/pymapdl/.venv/lib/python3.10/site-packages/grpc/_channel.py", line 1176, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/Users/german.ayuso/pymapdl/.venv/lib/python3.10/site-packages/grpc/_channel.py", line 1005, in _end_unary_response_blocking
    raise _InactiveRpcError(state)  # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50062: recvmsg:Connection reset by peer"
        debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50062: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-08-08T21:24:16.89635+02:00"}"
>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/german.ayuso/pymapdl/tmp/letour/compute_for_multiple_mesh_size_wb.py", line 44, in <module>
    fc.save_nodal_voltage_to_vtk(os.path.join(result_path, filename+".vtk"))
  File "/Users/german.ayuso/pymapdl/tmp/letour/FieldComputer.py", line 335, in save_nodal_voltage_to_vtk
    self.mapdl.result.save_as_vtk(os.path.join(self.result_path, filename))
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/misc.py", line 1121, in wrapper
    return function(self, *args, **kwargs)
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl_core.py", line 1019, in result
    result_path = self.download_result(save_path)
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl_grpc.py", line 1361, in download_result
    remote_files = self.list_files()
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl_grpc.py", line 1260, in list_files
    if "L" in self.parameters.platform[:1]:
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/parameters.py", line 223, in platform
    return self._mapdl.get_value("ACTIVE", item1="PLATFORM")
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/mapdl_extended.py", line 2800, in get_value
    return self._get(
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/errors.py", line 328, in wrapper
    handle_generic_grpc_error(error, func, args, kwargs)
  File "/Users/german.ayuso/pymapdl/src/ansys/mapdl/core/errors.py", line 381, in handle_generic_grpc_error
    raise MapdlExitedError(msg)
ansys.mapdl.core.errors.MapdlExitedError: Error:
MAPDL server connection terminated unexpectedly while calling:_get
with the following arguments:
  args: (<ansys.mapdl.core.mapdl_grpc.MapdlGrpc object at 0x17933bfd0>,)
  kwargs: {'entity': 'ACTIVE', 'entnum': '', 'item1': 'PLATFORM', 'it1num': '', 'item2': '', 'it2num': '', 'item3': '', 'it3num': '', 'item4': '', 'it4num': ''}
Error:
  failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50062: recvmsg:Connection reset by peer
Full error:
<_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50062: recvmsg:Connection reset by peer"
        debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:50062: recvmsg:Connection reset by peer", grpc_status:14, created_time:"2024-08-08T21:24:16.89635+02:00"}"
>