Commit b48e692b authored by Florian Wittkamp's avatar Florian Wittkamp

Removed LOG switch

parent 1073b9d9
...@@ -220,7 +220,7 @@ int main(int argc, char **argv){ ...@@ -220,7 +220,7 @@ int main(int argc, char **argv){
/* If Verbose==0, no PE will write a log file */ /* If Verbose==0, no PE will write a log file */
if(!VERBOSE) sprintf(LOG_FILE,"/dev/null"); if(!VERBOSE) sprintf(LOG_FILE,"/dev/null");
if ((MYID==0) && (LOG==1)) FP=stdout; if ((MYID==0)) FP=stdout;
else { else {
FP=fopen(LOG_FILE,"w"); FP=fopen(LOG_FILE,"w");
} }
...@@ -1165,7 +1165,9 @@ int main(int argc, char **argv){ ...@@ -1165,7 +1165,9 @@ int main(int argc, char **argv){
/* Open Log File for L2 norm */ /* Open Log File for L2 norm */
if(INVMAT!=10){ if(INVMAT!=10){
if(MYID==0){ if(MYID==0){
if(iter==1){FPL2=fopen(MISFIT_LOG_FILE,"w");} if(iter==1){
FPL2=fopen(MISFIT_LOG_FILE,"w");
}
if(iter>1){FPL2=fopen(MISFIT_LOG_FILE,"a");} if(iter>1){FPL2=fopen(MISFIT_LOG_FILE,"a");}
} }
} }
......
...@@ -34,7 +34,7 @@ void exchange_par(void){ ...@@ -34,7 +34,7 @@ void exchange_par(void){
extern float XREC1, XREC2, YREC1, YREC2, FPML; extern float XREC1, XREC2, YREC1, YREC2, FPML;
extern float REC_ARRAY_DEPTH, REC_ARRAY_DIST, MUN, EPSILON, EPSILON_u, EPSILON_rho; extern float REC_ARRAY_DEPTH, REC_ARRAY_DIST, MUN, EPSILON, EPSILON_u, EPSILON_rho;
extern int SEISMO, NDT, NGEOPH, SEIS_FORMAT, FREE_SURF, READMOD, READREC, SRCREC; extern int SEISMO, NDT, NGEOPH, SEIS_FORMAT, FREE_SURF, READMOD, READREC, SRCREC;
extern int BOUNDARY, REC_ARRAY, DRX, LOG, FW; extern int BOUNDARY, REC_ARRAY, DRX, FW;
extern int SNAPSHOT_START,SNAPSHOT_END,SNAPSHOT_INCR; extern int SNAPSHOT_START,SNAPSHOT_END,SNAPSHOT_INCR;
extern float TSNAP1, TSNAP2, TSNAPINC, REFREC[4]; extern float TSNAP1, TSNAP2, TSNAPINC, REFREC[4];
extern char MFILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE],SIGNAL_FILE_SH[STRING_SIZE], LOG_FILE[STRING_SIZE]; extern char MFILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE],SIGNAL_FILE_SH[STRING_SIZE], LOG_FILE[STRING_SIZE];
...@@ -204,7 +204,6 @@ void exchange_par(void){ ...@@ -204,7 +204,6 @@ void exchange_par(void){
idum[1] = NPROCX; idum[1] = NPROCX;
idum[2] = NPROCY; idum[2] = NPROCY;
idum[3] = LOG;
idum[4] = NPROCX*NPROCY; idum[4] = NPROCX*NPROCY;
idum[5] = NX; idum[5] = NX;
...@@ -474,7 +473,6 @@ void exchange_par(void){ ...@@ -474,7 +473,6 @@ void exchange_par(void){
NPROCX = idum[1]; NPROCX = idum[1];
NPROCY = idum[2]; NPROCY = idum[2];
LOG=idum[3];
NPROC = idum[4]; NPROC = idum[4];
NX = idum[5]; NX = idum[5];
NY = idum[6]; NY = idum[6];
......
...@@ -15,7 +15,7 @@ float XREC1, XREC2, YREC1, YREC2; ...@@ -15,7 +15,7 @@ float XREC1, XREC2, YREC1, YREC2;
float REC_ARRAY_DEPTH, REC_ARRAY_DIST; float REC_ARRAY_DEPTH, REC_ARRAY_DIST;
float REFREC[4]={0.0, 0.0, 0.0, 0.0}, FPML; float REFREC[4]={0.0, 0.0, 0.0, 0.0}, FPML;
int SEISMO, NDT, NGEOPH, NSRC=1, SEIS_FORMAT, FREE_SURF, READMOD, READREC, SRCREC, FW=0; int SEISMO, NDT, NGEOPH, NSRC=1, SEIS_FORMAT, FREE_SURF, READMOD, READREC, SRCREC, FW=0;
int NX, NY, NT, QUELLART,QUELLART_SH, QUELLTYP, SNAP, SNAP_FORMAT, LOG, REC_ARRAY, RUN_MULTIPLE_SHOTS, NTRG; int NX, NY, NT, QUELLART,QUELLART_SH, QUELLTYP, SNAP, SNAP_FORMAT, REC_ARRAY, RUN_MULTIPLE_SHOTS, NTRG;
int L, BOUNDARY, DC, DRX, NXG, NYG, IDX, IDY, CHECKPTREAD, CHECKPTWRITE, FDORDER, MAXRELERROR; int L, BOUNDARY, DC, DRX, NXG, NYG, IDX, IDY, CHECKPTREAD, CHECKPTWRITE, FDORDER, MAXRELERROR;
char SNAP_FILE[STRING_SIZE], SOURCE_FILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE], SIGNAL_FILE_SH[STRING_SIZE]; char SNAP_FILE[STRING_SIZE], SOURCE_FILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE], SIGNAL_FILE_SH[STRING_SIZE];
char MFILE[STRING_SIZE], REC_FILE[STRING_SIZE], CHECKPTFILE[STRING_SIZE]; char MFILE[STRING_SIZE], REC_FILE[STRING_SIZE], CHECKPTFILE[STRING_SIZE];
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
void note(FILE *fp){ void note(FILE *fp){
extern char LOG_FILE[STRING_SIZE]; extern char LOG_FILE[STRING_SIZE];
extern int MYID, LOG; extern int MYID;
fprintf(fp," Please note: \n"); fprintf(fp," Please note: \n");
fprintf(fp," Each processing element (PE) is writing log information during program \n"); fprintf(fp," Each processing element (PE) is writing log information during program \n");
...@@ -36,6 +36,4 @@ extern int MYID, LOG; ...@@ -36,6 +36,4 @@ extern int MYID, LOG;
fprintf(fp," Information about overall program execution \n"); fprintf(fp," Information about overall program execution \n");
fprintf(fp," (numerical artefacts, accuracy, computing times etc) \n"); fprintf(fp," (numerical artefacts, accuracy, computing times etc) \n");
fprintf(fp," will be written by PE 0 to "); fprintf(fp," will be written by PE 0 to ");
if (LOG==1) fprintf(fp," standard output. \n");
else fprintf(fp," %s.%i .\n",LOG_FILE,MYID);
} }
...@@ -33,7 +33,7 @@ void read_par_json(FILE *fp, char *fileinp){ ...@@ -33,7 +33,7 @@ void read_par_json(FILE *fp, char *fileinp){
extern float XREC1, XREC2, YREC1, YREC2, FPML; extern float XREC1, XREC2, YREC1, YREC2, FPML;
extern float REC_ARRAY_DEPTH, REC_ARRAY_DIST; extern float REC_ARRAY_DEPTH, REC_ARRAY_DIST;
extern int SEISMO, NDT, NGEOPH, SEIS_FORMAT, FREE_SURF, READMOD, READREC, SRCREC, RUN_MULTIPLE_SHOTS; extern int SEISMO, NDT, NGEOPH, SEIS_FORMAT, FREE_SURF, READMOD, READREC, SRCREC, RUN_MULTIPLE_SHOTS;
extern int BOUNDARY, REC_ARRAY, DRX, LOG, TAPER, TAPERLENGTH, INVTYPE, FW; extern int BOUNDARY, REC_ARRAY, DRX, TAPER, TAPERLENGTH, INVTYPE, FW;
extern float TSNAP1, TSNAP2, TSNAPINC, REFREC[4]; extern float TSNAP1, TSNAP2, TSNAPINC, REFREC[4];
extern int SNAPSHOT_START,SNAPSHOT_END,SNAPSHOT_INCR; extern int SNAPSHOT_START,SNAPSHOT_END,SNAPSHOT_INCR;
extern char MFILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE], SIGNAL_FILE_SH[STRING_SIZE], LOG_FILE[STRING_SIZE]; extern char MFILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE], SIGNAL_FILE_SH[STRING_SIZE], LOG_FILE[STRING_SIZE];
...@@ -368,9 +368,6 @@ void read_par_json(FILE *fp, char *fileinp){ ...@@ -368,9 +368,6 @@ void read_par_json(FILE *fp, char *fileinp){
} }
if (get_string_from_objectlist("MFILE",number_readobjects,MFILE,varname_list, value_list)) if (get_string_from_objectlist("MFILE",number_readobjects,MFILE,varname_list, value_list))
err("Variable MFILE could not be retrieved from the json input file!"); err("Variable MFILE could not be retrieved from the json input file!");
if (get_int_from_objectlist("LOG",number_readobjects,&LOG,varname_list, value_list)){
LOG=1;
fprintf(fp,"Variable LOG is set to default value %d.\n",LOG);}
if (get_int_from_objectlist("CHECKPTREAD",number_readobjects,&CHECKPTREAD,varname_list, value_list)){ if (get_int_from_objectlist("CHECKPTREAD",number_readobjects,&CHECKPTREAD,varname_list, value_list)){
CHECKPTREAD=0; CHECKPTREAD=0;
fprintf(fp,"Variable CHECKPTREAD is set to default value %d.\n",CHECKPTREAD);} fprintf(fp,"Variable CHECKPTREAD is set to default value %d.\n",CHECKPTREAD);}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment