nproc_andromede_CEA_IRFM

PURPOSE ^

SYNOPSIS ^

function [nproc] = nproc_andromede_CEA_IRFM(display_mode,param,dkepath)

DESCRIPTION ^

 Calculate the optimal number of processors for andromede cluster @ CEA-IRFM

 INPUTS: 

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

 OUTPUTS:

   - nproc: number of processor [1,1]

By Joan Decker (SPC/EPFL, joan.decker@epfl.ch) and Yves Peysson (IRFM/CEA, yves.peysson@cea.fr)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [nproc] = nproc_andromede_CEA_IRFM(display_mode,param,dkepath)
0002 %
0003 % Calculate the optimal number of processors for andromede cluster @ CEA-IRFM
0004 %
0005 % INPUTS:
0006 %
0007 %  - display_mode: display some results [1,1]
0008 %  - param: Structure for controling program.
0009 %  - dkepath: Structure of the paths
0010 %
0011 % OUTPUTS:
0012 %
0013 %   - nproc: number of processor [1,1]
0014 %
0015 %By Joan Decker (SPC/EPFL, joan.decker@epfl.ch) and Yves Peysson (IRFM/CEA, yves.peysson@cea.fr)
0016 %
0017 if param.nproc > 32, 
0018     nproc = 32;
0019     info_dke_yp(2,'The number of processors has been enforced to 32 !');
0020 else
0021     nproc = max(2,param.nproc);%2 processors enforced on Saturne cluster
0022 end   
0023 %
0024 % Dynamic evaluation of the cluster charge
0025 %
0026 if display_mode >=1,
0027     unix([dkepath.luke_root,'Project_DKE/Packages/mcharge 1']);
0028 else
0029     unix([dkepath.luke_root,'Project_DKE/Packages/mcharge 0']);
0030 end
0031 %
0032 fid = fopen('.machines','r');
0033 listactivenodes = fread(fid,'uint8=>char')';
0034 fclose(fid);
0035 proc = listactivenodes(strfind(listactivenodes,':')+1);
0036 nprocmax = sum(str2num(proc(:)));%Maximum number of available processors (usually nprocmax = nproc, except if nproc is too large or the computing charge is too heavy)
0037 if nprocmax <= nproc,
0038     if display_mode >=1,info_dke_yp(2,['Number of processors requested : ',int2str(nproc),', number of processors available: ',int2str(nprocmax)]);end;%less processors are available
0039     nproc = nprocmax;
0040 end   
0041 
0042

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