@@ -100,13 +100,15 @@ main(void)
100
100
int npieces = 2 ; //ncores / 2;
101
101
int nthreads = ncores ;
102
102
103
+
103
104
fprintf (stdout ,"[%d] ====== Testing thread_scope_split (number of threads : %i)\n" , tid , nthreads );
104
105
105
106
int colors [nthreads ];
106
107
for (int i = 0 ; i < nthreads ; i ++ ) {
107
108
colors [i ] = i % npieces ;
108
109
}
109
110
111
+
110
112
qv_scope_t * * th_scopes = NULL ;
111
113
rc = qv_pthread_scope_split (
112
114
mpi_scope , npieces , colors , nthreads , & th_scopes
@@ -124,6 +126,7 @@ main(void)
124
126
125
127
pthread_t thid [nthreads ];
126
128
pthread_attr_t * attr = NULL ;
129
+
127
130
for (int i = 0 ; i < nthreads ; ++ i ) {
128
131
const int ptrc = qv_pthread_create (
129
132
& thid [i ], attr , thread_work , & thargs [i ], th_scopes [i ]
@@ -150,16 +153,6 @@ main(void)
150
153
qvi_test_panic ("%s (rc=%s)" , ers , qv_strerr (rc ));
151
154
}
152
155
153
-
154
- rc = qv_scope_free (mpi_scope );
155
- if (rc != QV_SUCCESS ) {
156
- ers = "qv_scope_free() failed" ;
157
- qvi_test_panic ("%s (rc=%s)" , ers , qv_strerr (rc ));
158
- }
159
-
160
- //MPI_Finalize();
161
- //exit(EXIT_SUCCESS);
162
-
163
156
//Test qv_pthread_scope_split_at
164
157
nthreads = 2 * ncores ;
165
158
0 commit comments