checkSimu.edp 1.02 KB
Newer Older
Olivier Bonnefon's avatar
Olivier Bonnefon committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
load "BinaryIO";
include "paramsTS.edp";
//string BASEREP="../SAVE/MEDIAN/";
string BASEREP="../SAVE/HIGHT/";
int curStep=0;
verbosity=0;
int[int] sizeBinary(15);
for (int ii=0;ii<15;ii++)
  sizeBinary[ii]=0;
int sizeBinaryAux=0;
macro checkFile(XXINT){
  string FILENAME=BASEREP+"u2d"+string(XXINT)+"__rep_"+string(numRun);
  if (exec("ls "+FILENAME+" 2>/dev/null >/dev/null")){
    nofile=1;
  }else{
    if (!sizeBinary[XXINT]){
      GetSizeVec(sizeBinary[XXINT],FILENAME);
    }else{
      GetSizeVec(sizeBinaryAux,FILENAME);
      if (sizeBinaryAux != sizeBinary[XXINT])
        cout<<"ERROR "+FILENAME+" size is "<<sizeBinaryAux<<" and should be "<<sizeBinary[XXINT]<<endl;
    }
    
  }
}//

for( int numRun=0;numRun<100;numRun++){
  int nofile=0;
  //for (CURYEAR=FIRSTYEAR; CURYEAR<=LASTYEAR; CURYEAR++){
  //  for ( curStep=0;curStep<nbSteps;curStep++){
  for (int ii=0;ii<15;ii++)
    checkFile(ii);
  if (!nofile){
    cout<<"numRun="<<numRun<<" ok"<<endl;
  }else{
    cout<<"numRun="<<numRun<<" missing"<<endl;
  }
        
}