OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
kill_zombi.F File Reference
#include "implicit_f.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine get_env_variable_zombi (zombi_activation)
subroutine get_process_pid_zombi (current_process_pid)
subroutine write_process_pid_zombi (current_process_pid, radflex_process_pid, nspmd, list_process)
subroutine init_list_process_pid (radflex_process_pid, current_process_pid, nspmd, list_process)
subroutine walking_dead_mode (radflex_process_pid, ispmd, nspmd)

Function/Subroutine Documentation

◆ get_env_variable_zombi()

subroutine get_env_variable_zombi ( logical, intent(inout) zombi_activation)

Definition at line 32 of file kill_zombi.F.

33#include "implicit_f.inc"
34 character(len=100) env
35 logical, intent(inout) :: zombi_activation
36
37 env(1:len(env)) = ''
38 call getenv ( 'ENABLE_PID_PRINT', env )
39 zombi_activation = .false.
40 if ( env(1:2)=='ON' ) then
41 zombi_activation = .true.
42 endif
43
44 return

◆ get_process_pid_zombi()

subroutine get_process_pid_zombi ( integer, intent(inout) current_process_pid)

Definition at line 52 of file kill_zombi.F.

53#include "implicit_f.inc"
54 integer, intent(inout) :: current_process_pid
55 integer :: GETPID
56
57 current_process_pid = getpid()
58
59 return

◆ init_list_process_pid()

subroutine init_list_process_pid ( integer, intent(in) radflex_process_pid,
integer, intent(in) current_process_pid,
integer, intent(in) nspmd,
integer, dimension(nspmd+1), intent(inout) list_process )

Definition at line 91 of file kill_zombi.F.

93
94#include "implicit_f.inc"
95#ifdef MPI
96#include "mpif.h"
97#endif
98 integer, intent(in) :: radflex_process_pid,nspmd
99 integer, dimension(nspmd+1), intent(inout) :: list_process
100 integer, intent(in) :: current_process_pid
101
102 integer :: i
103 integer :: ierror
104
105 list_process(1:nspmd+1 ) = 0
106#ifdef MPI
107 call mpi_gather(current_process_pid,1,mpi_integer,
108 . list_process,1,mpi_integer,0,mpi_comm_world,ierror)
109 list_process(nspmd+1) = radflex_process_pid
110#endif
111 if(nspmd==1) then
112 list_process(1) = current_process_pid
113 list_process(2) = radflex_process_pid
114 endif
115
116 return
subroutine mpi_gather(sendbuf, cnt, datatype, recvbuf, reccnt, rectype, root, comm, ierr)
Definition mpi.f:56

◆ walking_dead_mode()

subroutine walking_dead_mode ( integer, intent(in) radflex_process_pid,
integer, intent(in) ispmd,
integer, intent(in) nspmd )

Definition at line 127 of file kill_zombi.F.

128#include "implicit_f.inc"
129#ifdef MPI
130#include "mpif.h"
131#endif
132 integer, intent(in) :: radflex_process_pid,nspmd,ispmd
133 logical :: zombi_activation
134 integer :: current_process_pid
135 integer, dimension(nspmd+1) :: list_process
136
137
138 call get_env_variable_zombi(zombi_activation)
139
140 if(zombi_activation) then
141
142 call get_process_pid_zombi(current_process_pid)
143 call init_list_process_pid( radflex_process_pid,
144 . current_process_pid,nspmd,list_process )
145 if(ispmd==0) call write_process_pid_zombi(
146 . current_process_pid,radflex_process_pid,nspmd,list_process )
147 endif
148
149 return
subroutine get_env_variable_zombi(zombi_activation)
Definition kill_zombi.F:33
subroutine write_process_pid_zombi(current_process_pid, radflex_process_pid, nspmd, list_process)
Definition kill_zombi.F:69
subroutine get_process_pid_zombi(current_process_pid)
Definition kill_zombi.F:53
subroutine init_list_process_pid(radflex_process_pid, current_process_pid, nspmd, list_process)
Definition kill_zombi.F:93

◆ write_process_pid_zombi()

subroutine write_process_pid_zombi ( integer, intent(in) current_process_pid,
integer, intent(in) radflex_process_pid,
integer, intent(in) nspmd,
integer, dimension(nspmd+1), intent(in) list_process )

Definition at line 67 of file kill_zombi.F.

69#include "implicit_f.inc"
70 integer, intent(in) :: radflex_process_pid
71 integer, intent(in) :: current_process_pid
72 integer, intent(in) :: nspmd
73 integer, dimension(nspmd+1), intent(in) :: list_process
74 integer :: i
75
76 open(file="running_pids",unit=666,access="append",
77 . status="unknown",action="readwrite")
78 do i=1,nspmd+1
79 if(list_process(i)/=0) write(666,*) list_process(i)
80 enddo
81 close(666)
82 return