uti: Workaround not to share CPU with OpenMP threads
* Assign uti thread to the last idle CPU so that it's not shared with an OpenMP thread Change-Id: Ia42cae056ce81fde9b6dab6286b39a52f3c9e172
This commit is contained in:
@ -234,6 +234,7 @@ static long stack_max = -1;
|
||||
static struct rlimit rlim_stack;
|
||||
static char *mpol_bind_nodes = NULL;
|
||||
static int uti_thread_rank = 0;
|
||||
static int uti_use_last_cpu = 0;
|
||||
|
||||
/* Partitioned execution (e.g., for MPI) */
|
||||
static int nr_processes = 0;
|
||||
@ -1794,6 +1795,12 @@ static struct option mcexec_options[] = {
|
||||
.flag = NULL,
|
||||
.val = 'u',
|
||||
},
|
||||
{
|
||||
.name = "uti-use-last-cpu",
|
||||
.has_arg = no_argument,
|
||||
.flag = &uti_use_last_cpu,
|
||||
.val = 1,
|
||||
},
|
||||
/* end */
|
||||
{ NULL, 0, NULL, 0, },
|
||||
};
|
||||
@ -2610,6 +2617,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
desc->uti_thread_rank = uti_thread_rank;
|
||||
desc->uti_use_last_cpu = uti_use_last_cpu;
|
||||
|
||||
/* user_start and user_end are set by this call */
|
||||
if (ioctl(fd, MCEXEC_UP_PREPARE_IMAGE, (unsigned long)desc) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user