24
24
* All rights reserved.
25
25
* Copyright (c) 2018-2019 Triad National Security, LLC. All rights
26
26
* reserved.
27
+ * Copyright (c) 2020 FUJITSU LIMITED. All rights reserved.
27
28
* $COPYRIGHT$
28
29
*
29
30
* Additional copyrights may follow
@@ -470,10 +471,11 @@ opal_init_util(int* pargc, char*** pargv)
470
471
char * error = NULL ;
471
472
OPAL_TIMING_ENV_INIT (otmng );
472
473
473
- if ( ++ opal_util_initialized != 1 ) {
474
- if ( opal_util_initialized < 1 ) {
474
+ if ( opal_util_initialized != 0 ) {
475
+ if ( opal_util_initialized < 0 ) {
475
476
return OPAL_ERROR ;
476
477
}
478
+ ++ opal_util_initialized ;
477
479
return OPAL_SUCCESS ;
478
480
}
479
481
@@ -615,6 +617,8 @@ opal_init_util(int* pargc, char*** pargv)
615
617
616
618
OPAL_TIMING_ENV_NEXT (otmng , "opal_if_init" );
617
619
620
+ ++ opal_util_initialized ;
621
+
618
622
return OPAL_SUCCESS ;
619
623
}
620
624
@@ -635,10 +639,11 @@ opal_init(int* pargc, char*** pargv)
635
639
{
636
640
int ret ;
637
641
638
- if ( ++ opal_initialized != 1 ) {
639
- if ( opal_initialized < 1 ) {
642
+ if ( opal_initialized != 0 ) {
643
+ if ( opal_initialized < 0 ) {
640
644
return OPAL_ERROR ;
641
645
}
646
+ ++ opal_initialized ;
642
647
return OPAL_SUCCESS ;
643
648
}
644
649
@@ -688,5 +693,7 @@ opal_init(int* pargc, char*** pargv)
688
693
return opal_init_error ("opal_reachable_base_select" , ret );
689
694
}
690
695
696
+ ++ opal_initialized ;
697
+
691
698
return OPAL_SUCCESS ;
692
699
}
0 commit comments