00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 subroutine psmile_spawn_child_appl (intracomm, intercomm, ierror )
00012
00013
00014
00015 use PRISM_constants
00016 use PSMILe, dummy_interface => PSMILe_Spawn_Child_Appl
00017 implicit none
00018
00019
00020
00021 integer, Intent(In) :: intracomm
00022
00023
00024
00025
00026
00027
00028 integer,Intent(Out) :: intercomm
00029
00030
00031
00032 integer,Intent(Out) :: ierror
00033
00034
00035
00036
00037
00038 integer, parameter :: n_hosts = 1
00039
00040 #if ! defined ( PRISM_with_MPI1 )
00041
00042
00043
00044 integer :: npes (n_hosts)
00045 character(len=1) :: commands (n_hosts)
00046 character(len=1) :: argv (n_hosts, 1)
00047 #endif
00048
00049 #ifdef DONT_HAVE_ERRORCODES_IGNORE
00050 integer :: infos (n_hosts), n
00051 integer, Allocatable :: ierrors (:)
00052 integer :: ierrp(1)
00053 #endif
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 Character(len=len_cvs_string), save :: mycvs =
00075 '$Id: psmile_spawn_child_appl.F90 2325 2010-04-21 15:00:07Z valcke $'
00076
00077
00078
00079 ierror = 0
00080 intercomm = MPI_COMM_NULL
00081
00082 #if ! defined ( PRISM_with_MPI1 )
00083
00084
00085
00086
00087 #ifdef DONT_HAVE_ERRORCODES_IGNORE
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105 n = 1024
00106 Allocate (ierrors(1:n), STAT=ierror)
00107 if ( ierror /= 0 ) then
00108 ierrp (1) = n
00109 ierror = PRISM_Error_Alloc
00110 call psmile_error ( ierror, 'ierrors', &
00111 ierrp(1), 1, __FILE__, __LINE__ )
00112 return
00113 endif
00114
00115 call MPI_Comm_spawn_multiple (n_hosts, commands, argv, &
00116 npes, infos, &
00117 PRISM_root, intracomm, &
00118 intercomm, ierrors, &
00119 ierror)
00120
00121 Deallocate (ierrors)
00122 #else
00123 call MPI_Comm_spawn_multiple (n_hosts, commands, argv, &
00124 npes, MPI_INFO_NULL, &
00125 PRISM_root, intracomm, &
00126 intercomm, MPI_ERRCODES_IGNORE, &
00127 ierror)
00128 #endif
00129 #endif
00130
00131 end subroutine PSMILe_Spawn_Child_Appl
00132
00133 #ifdef DONT_HAVE_STDMPI2
00134 subroutine MPI_Comm_spawn_multiple ( n_hosts, commands, argv, &
00135 npes, dummy1, root, intracomm, &
00136 intercomm, dummy2, ierror)
00137
00138 integer :: dummy1, dumm2
00139 integer :: n_hosts, root
00140 integer :: npes (n_hosts)
00141 character(len=1) :: commands (n_hosts)
00142 character(len=1) :: argv (n_hosts, 1)
00143 integer :: intracomm, intercomm, ierror
00144
00145 Integer, parameter :: nerrp = 1
00146 Integer :: ierrp (nerrp)
00147
00148 call PSMILe_Error ( ierror, 'Spawing not support with this MPI', &
00149 ierrp, 1, __FILE__, __LINE__ )
00150
00151 return
00152 end
00153 #endif