3
3
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4
4
* University Research and Technology
5
5
* Corporation. All rights reserved.
6
- * Copyright (c) 2004-2017 The University of Tennessee and The University
6
+ * Copyright (c) 2004-2020 The University of Tennessee and The University
7
7
* of Tennessee Research Foundation. All rights
8
8
* reserved.
9
9
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -660,7 +660,8 @@ static int dpm_convert(opal_list_t *infos,
660
660
char * infokey ,
661
661
char * option ,
662
662
char * directive ,
663
- char * modifier )
663
+ char * modifier ,
664
+ bool deprecated )
664
665
{
665
666
opal_info_item_t * iptr ;
666
667
char * ck , * ptr , * help_str ;
@@ -758,9 +759,11 @@ static int dpm_convert(opal_list_t *infos,
758
759
opal_list_append (infos , & iptr -> super );
759
760
760
761
/* alert them */
761
- opal_asprintf (& help_str , "Key: %s Value: %s" , option , ptr );
762
- opal_show_help ("help-dpm.txt" , "deprecated-converted" , true,
763
- infokey , help_str );
762
+ if (deprecated ) {
763
+ opal_asprintf (& help_str , "Key: %s Value: %s" , option , ptr );
764
+ opal_show_help ("help-dpm.txt" , "deprecated-converted" , true,
765
+ infokey , help_str );
766
+ }
764
767
free (help_str );
765
768
free (ptr );
766
769
@@ -803,8 +806,15 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
803
806
#endif
804
807
805
808
/* parse the info object */
806
- /* check potentially for:
809
+ /* check potentially for
810
+ Standard keys:
811
+ - "arch": desired architecture
812
+ - "wdir": directory, where executable can be found
813
+ - "path": list of directories where to look for the executable
814
+ - "file": filename, where additional information is provided.
815
+ - "soft": see page 92 of MPI-2.
807
816
- "host": desired host where to spawn the processes
817
+ Non-standard keys:
808
818
- "hostfile": hostfile containing hosts where procs are
809
819
to be spawned
810
820
- "add-host": add the specified hosts to the known list
@@ -818,11 +828,6 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
818
828
- "ompi_prefix": the path to the root of the directory tree where ompi
819
829
executables and libraries can be found on all nodes
820
830
used to spawn these procs
821
- - "arch": desired architecture
822
- - "wdir": directory, where executable can be found
823
- - "path": list of directories where to look for the executable
824
- - "file": filename, where additional information is provided.
825
- - "soft": see page 92 of MPI-2.
826
831
- "mapper": indicate the mapper to be used for the job
827
832
- "display_map": display the map of the spawned job
828
833
- "npernode": number of procs/node to spawn
@@ -835,7 +840,6 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
835
840
- "ompi_preload_files": move specified files to nodes prior to execution
836
841
- "ompi_non_mpi": spawned job will not call MPI_Init
837
842
- "ompi_param": list of MCA params to be in the spawned job's environment
838
- - "env": newline (\n) delimited list of envar values to be passed to spawned procs
839
843
*/
840
844
841
845
/* setup the job object */
@@ -907,12 +911,12 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
907
911
}
908
912
#endif
909
913
914
+ /* check for standard form keys, do not deprecate they are part of
915
+ * MPI standard ch. 10.3.4 */
916
+
910
917
/* check for 'host' */
911
918
ompi_info_get (array_of_info [i ], "host" , sizeof (host ) - 1 , host , & flag );
912
919
if ( flag ) {
913
- /* deprecate --> PMIX_PERSONALITY */
914
- opal_show_help ("help-dpm.txt" , "deprecated-converted" , true,
915
- "host" , "PMIX_HOST" );
916
920
info = OBJ_NEW (opal_info_item_t );
917
921
PMIX_INFO_LOAD (& info -> info , PMIX_HOST , host , PMIX_STRING );
918
922
opal_list_append (& app_info , & info -> super );
@@ -936,12 +940,46 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
936
940
}
937
941
#endif
938
942
943
+ /* check for 'wdir' */
944
+ ompi_info_get (array_of_info [i ], "wdir" , sizeof (cwd ) - 1 , cwd , & flag );
945
+ if ( flag ) {
946
+ info = OBJ_NEW (opal_info_item_t );
947
+ PMIX_INFO_LOAD (& info -> info , PMIX_WDIR , cwd , PMIX_STRING );
948
+ opal_list_append (& app_info , & info -> super );
949
+ have_wdir = 1 ;
950
+ }
951
+ ompi_info_get (array_of_info [i ], "PMIX_WDIR" , sizeof (cwd ) - 1 , cwd , & flag );
952
+ if ( flag ) {
953
+ info = OBJ_NEW (opal_info_item_t );
954
+ PMIX_INFO_LOAD (& info -> info , PMIX_WDIR , cwd , PMIX_STRING );
955
+ opal_list_append (& app_info , & info -> super );
956
+ have_wdir = 1 ;
957
+ continue ;
958
+ }
959
+ #if PMIX_NUMERIC_VERSION >= 0x00040000
960
+ checkkey = PMIx_Get_attribute_string ("PMIX_WDIR" );
961
+ ompi_info_get (array_of_info [i ], checkkey , sizeof (cwd ) - 1 , cwd , & flag );
962
+ if ( flag ) {
963
+ info = OBJ_NEW (opal_info_item_t );
964
+ PMIX_INFO_LOAD (& info -> info , PMIX_WDIR , cwd , PMIX_STRING );
965
+ opal_list_append (& app_info , & info -> super );
966
+ have_wdir = 1 ;
967
+ continue ;
968
+ }
969
+ #endif
970
+
971
+ /* 'path', 'arch', 'file', 'soft' -- to be implemented */
972
+
973
+ /* non-standard keys
974
+ * Keys that correspond to prun/mpiexec parameters
975
+ * do not deprecate PMIX unprefixed forms to remain identical
976
+ * to the command line parameter;
977
+ * Keys that are not corresponding to an mpiexec parameter are
978
+ * deprecated in the non-prefixed form */
979
+
939
980
/* check for 'hostfile' */
940
981
ompi_info_get (array_of_info [i ], "hostfile" , sizeof (host ) - 1 , host , & flag );
941
982
if ( flag ) {
942
- /* deprecate --> PMIX_HOSTFILE */
943
- opal_show_help ("help-dpm.txt" , "deprecated-converted" , true,
944
- "hostfile" , "PMIX_HOSTFILE" );
945
983
info = OBJ_NEW (opal_info_item_t );
946
984
PMIX_INFO_LOAD (& info -> info , PMIX_HOSTFILE , host , PMIX_STRING );
947
985
opal_list_append (& app_info , & info -> super );
@@ -1058,8 +1096,6 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
1058
1096
}
1059
1097
#endif
1060
1098
1061
- /* 'path', 'arch', 'file', 'soft' -- to be implemented */
1062
-
1063
1099
/* check for 'ompi_prefix' (OMPI-specific -- to effect the same
1064
1100
* behavior as --prefix option to orterun)
1065
1101
*
@@ -1093,37 +1129,6 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
1093
1129
}
1094
1130
#endif
1095
1131
1096
- /* check for 'wdir' */
1097
- ompi_info_get (array_of_info [i ], "wdir" , sizeof (cwd ) - 1 , cwd , & flag );
1098
- if ( flag ) {
1099
- /* deprecate --> PMIX_WDIR */
1100
- opal_show_help ("help-dpm.txt" , "deprecated-converted" , true,
1101
- "wdir" , "PMIX_WDIR" );
1102
- info = OBJ_NEW (opal_info_item_t );
1103
- PMIX_INFO_LOAD (& info -> info , PMIX_WDIR , cwd , PMIX_STRING );
1104
- opal_list_append (& app_info , & info -> super );
1105
- have_wdir = 1 ;
1106
- }
1107
- ompi_info_get (array_of_info [i ], "PMIX_WDIR" , sizeof (cwd ) - 1 , cwd , & flag );
1108
- if ( flag ) {
1109
- info = OBJ_NEW (opal_info_item_t );
1110
- PMIX_INFO_LOAD (& info -> info , PMIX_WDIR , cwd , PMIX_STRING );
1111
- opal_list_append (& app_info , & info -> super );
1112
- have_wdir = 1 ;
1113
- continue ;
1114
- }
1115
- #if PMIX_NUMERIC_VERSION >= 0x00040000
1116
- checkkey = PMIx_Get_attribute_string ("PMIX_WDIR" );
1117
- ompi_info_get (array_of_info [i ], checkkey , sizeof (cwd ) - 1 , cwd , & flag );
1118
- if ( flag ) {
1119
- info = OBJ_NEW (opal_info_item_t );
1120
- PMIX_INFO_LOAD (& info -> info , PMIX_WDIR , cwd , PMIX_STRING );
1121
- opal_list_append (& app_info , & info -> super );
1122
- have_wdir = 1 ;
1123
- continue ;
1124
- }
1125
- #endif
1126
-
1127
1132
/* check for 'mapper' - a job-level key */
1128
1133
ompi_info_get (array_of_info [i ], "mapper" , sizeof (mapper ) - 1 , mapper , & flag );
1129
1134
if ( flag ) {
@@ -1156,7 +1161,7 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
1156
1161
/* check for 'display_map' - a job-level key */
1157
1162
ompi_info_get_bool (array_of_info [i ], "display_map" , & local_spawn , & flag );
1158
1163
if ( flag ) {
1159
- rc = dpm_convert (& job_info , "display_map" , PMIX_MAPBY , NULL , "DISPLAYMAP" );
1164
+ rc = dpm_convert (& job_info , "display_map" , PMIX_MAPBY , NULL , "DISPLAYMAP" , true );
1160
1165
if (OMPI_SUCCESS != rc ) {
1161
1166
OPAL_LIST_DESTRUCT (& job_info );
1162
1167
OPAL_LIST_DESTRUCT (& app_info );
@@ -1171,7 +1176,7 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
1171
1176
ompi_info_get (array_of_info [i ], "npernode" , sizeof (slot_list ) - 1 , slot_list , & flag );
1172
1177
if ( flag ) {
1173
1178
opal_asprintf (& tmp , "PPR:%s:NODE" , slot_list );
1174
- rc = dpm_convert (& job_info , "npernode" , PMIX_MAPBY , tmp , NULL );
1179
+ rc = dpm_convert (& job_info , "npernode" , PMIX_MAPBY , tmp , NULL , true );
1175
1180
free (tmp );
1176
1181
if (OMPI_SUCCESS != rc ) {
1177
1182
OPAL_LIST_DESTRUCT (& job_info );
@@ -1184,7 +1189,7 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
1184
1189
}
1185
1190
ompi_info_get (array_of_info [i ], "pernode" , sizeof (slot_list ) - 1 , slot_list , & flag );
1186
1191
if ( flag ) {
1187
- rc = dpm_convert (& job_info , "pernode" , PMIX_MAPBY , "PPR:1:NODE" , NULL );
1192
+ rc = dpm_convert (& job_info , "pernode" , PMIX_MAPBY , "PPR:1:NODE" , NULL , true );
1188
1193
free (tmp );
1189
1194
if (OMPI_SUCCESS != rc ) {
1190
1195
OPAL_LIST_DESTRUCT (& job_info );
@@ -1215,7 +1220,7 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
1215
1220
opal_progress_event_users_decrement ();
1216
1221
return MPI_ERR_SPAWN ;
1217
1222
}
1218
- rc = dpm_convert (& job_info , "ppr" , PMIX_MAPBY , slot_list , NULL );
1223
+ rc = dpm_convert (& job_info , "ppr" , PMIX_MAPBY , slot_list , NULL , true );
1219
1224
free (tmp );
1220
1225
if (OMPI_SUCCESS != rc ) {
1221
1226
OPAL_LIST_DESTRUCT (& job_info );
@@ -1230,7 +1235,7 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
1230
1235
/* check for 'map_by' - job-level key */
1231
1236
ompi_info_get (array_of_info [i ], "map_by" , sizeof (slot_list ) - 1 , slot_list , & flag );
1232
1237
if ( flag ) {
1233
- rc = dpm_convert (& job_info , "map_by" , PMIX_MAPBY , slot_list , NULL );
1238
+ rc = dpm_convert (& job_info , "map_by" , PMIX_MAPBY , slot_list , NULL , false );
1234
1239
free (tmp );
1235
1240
if (OMPI_SUCCESS != rc ) {
1236
1241
OPAL_LIST_DESTRUCT (& job_info );
@@ -1262,7 +1267,7 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
1262
1267
/* check for 'rank_by' - job-level key */
1263
1268
ompi_info_get (array_of_info [i ], "rank_by" , sizeof (slot_list ) - 1 , slot_list , & flag );
1264
1269
if ( flag ) {
1265
- rc = dpm_convert (& job_info , "rank_by" , PMIX_RANKBY , slot_list , NULL );
1270
+ rc = dpm_convert (& job_info , "rank_by" , PMIX_RANKBY , slot_list , NULL , false );
1266
1271
free (tmp );
1267
1272
if (OMPI_SUCCESS != rc ) {
1268
1273
OPAL_LIST_DESTRUCT (& job_info );
@@ -1294,7 +1299,7 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
1294
1299
/* check for 'bind_to' - job-level key */
1295
1300
ompi_info_get (array_of_info [i ], "bind_to" , sizeof (slot_list ) - 1 , slot_list , & flag );
1296
1301
if ( flag ) {
1297
- rc = dpm_convert (& job_info , "bind_to" , PMIX_BINDTO , slot_list , NULL );
1302
+ rc = dpm_convert (& job_info , "bind_to" , PMIX_BINDTO , slot_list , NULL , false );
1298
1303
free (tmp );
1299
1304
if (OMPI_SUCCESS != rc ) {
1300
1305
OPAL_LIST_DESTRUCT (& job_info );
0 commit comments