How to choose a group when setting affinity to a process for multi-processor system
Afficher commentaires plus anciens
I have a windows machine with 2 processors 64 cores each. Before with one processor I was able to use the code below. Now I have two processor groups and didn't find any info how to manipulate it.
For example, Process_1 - group 0 CPU 23-63 or Process_2 - group 1 CPU 1-63. Also, Is it possible to set both groups to one process?
Process_1 = System.Diagnostics.Process.GetProcessById(my_process_ID);
aff = Process_1.ProcessorAffinity.ToInt32; % get current affinity mask
fprintf('Current affinity mask: %s\n', dec2bin(aff, 36));
proc.ProcessorAffinity = System.IntPtr(int32(2)); % set affinity mask
fprintf('Adjusted affinity to: %s\n', dec2bin(proc.ProcessorAffinity.ToInt32, 36));
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deploy to .NET Applications Using MATLAB Data API for .NET dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!