nproc_dke_yp

PURPOSE ^

SYNOPSIS ^

function [nproc] = nproc_dke_yp(display_mode,param,dkepath);

DESCRIPTION ^

 Calculate the optimal number of processor (machine dependent)

 INPUTS: None

  - display_mode: display some results [1,1]
  - param: Structure for controling program. 
  - dkepath: Structure of the paths

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [nproc] = nproc_dke_yp(display_mode,param,dkepath);
0002 %
0003 % Calculate the optimal number of processor (machine dependent)
0004 %
0005 % INPUTS: None
0006 %
0007 %  - display_mode: display some results [1,1]
0008 %  - param: Structure for controling program.
0009 %  - dkepath: Structure of the paths
0010 
0011 %
0012 % OUTPUTS:
0013 %
0014 %   - nproc: number of processor [1,1]
0015 %
0016 %By Joan Decker (CEA-DRFC, joan.decker@cea.fr) and Yves Peysson (CEA-DRFC, yves.peysson@cea.fr)
0017 %
0018 [status,message_proc] = unix('uname -p');%Processor type
0019 [status,message_net] = unix('uname -n');%Network name of the machine
0020 %
0021 if status == 0,
0022     if (strfind(message_proc,'i386')>0 & strfind(message_net,'macpro')>0) | strfind(message_proc,'unknown'),%Personal computer of Yves Peysson (macpro Core i7)
0023         nproc = nproc_macpro_YVES(display_mode,param,dkepath);
0024     elseif (strfind(message_proc,'i386')>0 & strfind(message_net,'macbookyves')>0) | strfind(message_proc,'unknown'),%Personal computer of Yves Peysson (macbook pro Core i7)
0025         nproc = nproc_macbook_YVES(display_mode,param,dkepath);
0026     elseif strfind(message_proc,'x86_64')>0 & strfind(message_net,'andromede')>0,%Andromede cluster @ CEA-DRFC
0027         nproc = nproc_andromede_CEA_IRFM(display_mode,param,dkepath);
0028     elseif strfind(message_proc,'x86_64')>0 & strfind(message_net,'nucyves')>0,%Nuc Aix
0029         nproc = nproc_nucaix_YVES(display_mode,param,dkepath);
0030     elseif strfind(message_proc,'Intel')>0,
0031         nproc = 1;
0032     elseif strfind(message_proc,'YOUR_PROCESSOR_NAME')>0 & strfind(message_net,'YOUR_COMPUTER')>0,%YOUR computer. Replace here the name of your machine
0033         error('Your computer is not recognized by PETSc_Cloop_dke_ft.m. Please open the file and add the parameters of your environment !') 
0034         % PUT HERE A FUNCTION SPECIFIC TO YOUR MACHINE THAT CALCULATES THE ADEQUATE NUMBER OF PROCESSORS
0035     else
0036         error('Your computer is not recognized by PETSc_Cloop_dke_ft.m. Please open the file and add the parameters of your environment !')             
0037     end
0038 else
0039     error('This matrix solver cannot run on your computer which is not a Unix system. Sorry !'); 
0040 end
0041 
0042 
0043

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.