@@ -497,7 +497,7 @@ int ompi_rte_init(int *pargc, char ***pargv)
497
497
char * error = NULL ;
498
498
opal_process_name_t pname ;
499
499
pmix_proc_t rproc ;
500
- int u32 , * u32ptr ;
500
+ uint32_t u32 , * u32ptr ;
501
501
uint16_t u16 , * u16ptr ;
502
502
char * * peers = NULL ;
503
503
char * ev1 ;
@@ -727,7 +727,7 @@ int ompi_rte_init(int *pargc, char ***pargv)
727
727
}
728
728
729
729
/* retrieve proc-session directory info */
730
- OPAL_MODEX_RECV_VALUE_OPTIONAL (rc , PMIX_PROCDIR , & OPAL_PROC_MY_NAME , & val , OPAL_STRING );
730
+ OPAL_MODEX_RECV_VALUE_OPTIONAL (rc , PMIX_PROCDIR , & OPAL_PROC_MY_NAME , & val , PMIX_STRING );
731
731
if (OPAL_SUCCESS == rc && NULL != val ) {
732
732
pmix_process_info .proc_session_dir = val ;
733
733
} else {
@@ -819,6 +819,26 @@ int ompi_rte_init(int *pargc, char ***pargv)
819
819
opal_argv_free (peers );
820
820
}
821
821
822
+ /*
823
+ * stdout/stderr buffering
824
+ * If the user requested to override the default setting then do
825
+ * as they wish.
826
+ */
827
+ OPAL_MODEX_RECV_VALUE_OPTIONAL (rc , "OMPI_STREAM_BUFFERING" ,
828
+ & pmix_process_info .my_name , & u16ptr , PMIX_UINT16 );
829
+ if (PMIX_SUCCESS == rc ) {
830
+ if (0 == u16 ) {
831
+ setvbuf (stdout , NULL , _IONBF , 0 );
832
+ setvbuf (stderr , NULL , _IONBF , 0 );
833
+ } else if (1 == u16 ) {
834
+ setvbuf (stdout , NULL , _IOLBF , 0 );
835
+ setvbuf (stderr , NULL , _IOLBF , 0 );
836
+ } else if (2 == u16 ) {
837
+ setvbuf (stdout , NULL , _IOFBF , 0 );
838
+ setvbuf (stderr , NULL , _IOFBF , 0 );
839
+ }
840
+ }
841
+
822
842
/* set the remaining opal_process_info fields. Note that
823
843
* the OPAL layer will have initialized these to NULL, and
824
844
* anyone between us would not have strdup'd the string, so
0 commit comments