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 :: ierror
103
104 list_process(1:nspmd+1 ) = 0
105#ifdef MPI
106 call mpi_gather(current_process_pid,1,mpi_integer,
107 . list_process,1,mpi_integer,0,mpi_comm_world,ierror)
108 list_process(nspmd+1) = radflex_process_pid
109#endif
110 if(nspmd==1) then
111 list_process(1) = current_process_pid
112 list_process(2) = radflex_process_pid
113 endif
114
115 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 126 of file kill_zombi.F.

127#include "implicit_f.inc"
128#ifdef MPI
129#include "mpif.h"
130#endif
131 integer, intent(in) :: radflex_process_pid,nspmd,ispmd
132 logical :: zombi_activation
133 integer :: current_process_pid
134 integer, dimension(nspmd+1) :: list_process
135
136
137 call get_env_variable_zombi(zombi_activation)
138
139 if(zombi_activation) then
140
141 call get_process_pid_zombi(current_process_pid)
142 call init_list_process_pid( radflex_process_pid,
143 . current_process_pid,nspmd,list_process )
144 if(ispmd==0) call write_process_pid_zombi(
145 . current_process_pid,radflex_process_pid,nspmd,list_process )
146 endif
147
148 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