00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 # include "StartupPape.hh"
00015
00016
00017 extern ofstream LogFile;
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 StartupZweck::StartupZweck(string InFileName)
00056 {
00057
00058 ifstream InFile(InFileName.c_str(),ios::in);
00059
00060 if (!InFile)
00061 {
00062 cerr << "Error: Input file "<< InFileName
00063 << " could not be opened."<< endl;
00064 exit(1);
00065 }
00066
00067 JobDir = ReadString("JobDir",&InFile);
00068 JobName = ReadString("JobName",&InFile);
00069
00070 LogFileName = JobDir + JobName + ".log";
00071
00072 cout << endl
00073 << "Log File = " << LogFileName << endl << endl;
00074
00075 LogFile.open(LogFileName.c_str(),ios::out);
00076
00077 if (!LogFile)
00078 {
00079 cerr << "Error: ocs.log could not be open." << endl << flush;
00080 exit(1);
00081 }
00082
00083 JobPrefix = JobDir + JobName + "_";
00084
00085
00086
00087 LogFileSeparator();
00088 LogFile << InFileName << endl << endl;
00089
00090 LogFile << "Job Prefix = " << JobPrefix << endl;
00091 InputFilesDir = ReadString("InputFilesDir", &InFile);
00092 SimType = ReadInt("SimType"," ",0,0,NO_BOUNDS,&InFile);
00093 qtStatSamples = ReadInt("qtStatSamples"," ",0,-1,LOWER_ONLY,&InFile);
00094 qtMapSpans = ReadInt("qtMapSpans"," ",0,-1,LOWER_ONLY,&InFile);
00095
00096 DebugLevelAmps = ReadInt("DebugLevelAmps"," ",0,3,LOWER_AND_UPPER,
00097 OPTIONAL_NO_WARNING,1,&InFile);
00098
00099
00100 RelativeErrorGoal = ReadDouble("RelativeErrorGoal"," ",0,-1,LOWER_ONLY,
00101 &InFile);
00102
00103 OutputStepSizesFlag = ReadInt("OutputStepSizes"," ",0,1,
00104 LOWER_AND_UPPER,&InFile);
00105
00106
00107 Beta3ZeroFlag = ReadInt("Beta3ZeroFlag"," ",0,1,LOWER_AND_UPPER,&InFile);
00108 NonLinearityZeroFlag = ReadInt("NonLinearityZeroFlag"," ",0,1,
00109 LOWER_AND_UPPER,&InFile);
00110 FiberLossZeroFlag = ReadInt("FiberLossZeroFlag"," ",0,1,
00111 LOWER_AND_UPPER,&InFile);
00112 TypeAmp = ReadInt("TypeAmp"," ",0,5,LOWER_AND_UPPER,&InFile);
00113 AmpsNoiseOffFlag = ReadInt("AmpsNoiseOffFlag"," ",0,1,LOWER_AND_UPPER,&InFile);
00114
00115
00116 int UseMosixFlag = ReadInt("UseMosixFlag"," ",0,1,LOWER_AND_UPPER,
00117 OPTIONAL_NO_WARNING,0,&InFile);
00118
00119 if(UseMosixFlag)
00120 {
00121 lock_or_unlock_mosix(MOSIX_UNLOCK);
00122 cpujob_mosix();
00123 slow_mosix();
00124 }
00125
00126 InFile.close();
00127
00128
00129 }
00130
00131
00132
00133
00134
00135
00136
00137
00138