Дополнил выходные файлы. Различил текст о задачах на компиляцию и о задачах на запуск. Убрал печать состояний задач, и времени.
This commit is contained in:
8
.idea/workspace.xml
generated
8
.idea/workspace.xml
generated
@@ -8,9 +8,11 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/TasksPackage/TasksPackageState.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/TasksPackage/TasksPackageState.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/files/Planner/CompilationTask.h" beforeDir="false" afterPath="$PROJECT_DIR$/src/files/Planner/CompilationTask.h" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/TestsSupervisor_2022.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/TestsSupervisor_2022.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/files/Planner/RunSupervisor.h" beforeDir="false" afterPath="$PROJECT_DIR$/src/files/Planner/RunSupervisor.h" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/RemoteInitialiseUser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/RemoteInitialiseUser.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/files/Planner/RunTask.h" beforeDir="false" afterPath="$PROJECT_DIR$/src/files/Planner/RunTask.h" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/files/Planner/Supervisor.h" beforeDir="false" afterPath="$PROJECT_DIR$/src/files/Planner/Supervisor.h" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/files/Planner/Task.h" beforeDir="false" afterPath="$PROJECT_DIR$/src/files/Planner/Task.h" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ public:
|
|||||||
"make -j -f Makefile";
|
"make -j -f Makefile";
|
||||||
}
|
}
|
||||||
virtual void analyseResults() {
|
virtual void analyseResults() {
|
||||||
|
Task::analyseResults();
|
||||||
String binary = workspace + "/0";
|
String binary = workspace + "/0";
|
||||||
state = Utils::Exists(binary) ? Done : DoneWithErrors;
|
state = Utils::Exists(binary) ? Done : DoneWithErrors;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,14 +22,4 @@ public:
|
|||||||
virtual String getStatePrefix() {
|
virtual String getStatePrefix() {
|
||||||
return String("Running");
|
return String("Running");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
virtual void Finalize(){
|
|
||||||
this->state = Archivation;
|
|
||||||
saveState();
|
|
||||||
printf("Archivation started\n");
|
|
||||||
Utils::ZipFolder(String("./"),String("archive.zip"));
|
|
||||||
printf("Archivation ended\n");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -96,8 +96,10 @@ public:
|
|||||||
virtual String copyResults(const String& pathRes) {
|
virtual String copyResults(const String& pathRes) {
|
||||||
String resultPath = Task::copyResults(pathRes);
|
String resultPath = Task::copyResults(pathRes);
|
||||||
if (Utils::Exists(workspace + "/sts.gz+")) {
|
if (Utils::Exists(workspace + "/sts.gz+")) {
|
||||||
String dvm_start = String::DQuotes(dvm_drv) + " pa " + String::DQuotes(String(getId()) + "/sts.gz+") + " " + String::DQuotes(resultPath + "/statistic.txt");
|
String stsPath(resultPath + "/statistic.txt");
|
||||||
|
String dvm_start = String::DQuotes(dvm_drv) + " pa " + String::DQuotes(String(getId()) + "/sts.gz+") + " " + String::DQuotes(stsPath);
|
||||||
system(dvm_start.getCharArray());
|
system(dvm_start.getCharArray());
|
||||||
|
while (!Utils::Exists(stsPath));
|
||||||
}
|
}
|
||||||
return resultPath;
|
return resultPath;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ enum SupervisorState {
|
|||||||
WorkspacesCreation, //0
|
WorkspacesCreation, //0
|
||||||
Preparation, //1
|
Preparation, //1
|
||||||
Execution, //2
|
Execution, //2
|
||||||
Archivation, //3
|
End //3
|
||||||
End //4
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
@@ -32,8 +31,6 @@ public:
|
|||||||
return String("Preparation");
|
return String("Preparation");
|
||||||
case Execution:
|
case Execution:
|
||||||
return String("Execution");
|
return String("Execution");
|
||||||
case Archivation:
|
|
||||||
return String("Archivation");
|
|
||||||
case End:
|
case End:
|
||||||
return String("End");
|
return String("End");
|
||||||
default:
|
default:
|
||||||
@@ -71,7 +68,6 @@ public:
|
|||||||
saveState();
|
saveState();
|
||||||
break;
|
break;
|
||||||
case Execution:
|
case Execution:
|
||||||
Finalize();
|
|
||||||
this->state = End;
|
this->state = End;
|
||||||
saveState();
|
saveState();
|
||||||
break;
|
break;
|
||||||
@@ -187,18 +183,12 @@ public:
|
|||||||
|
|
||||||
changeState();
|
changeState();
|
||||||
|
|
||||||
String outFile(pathRes + "/info.txt");
|
String outFile(pathRes + "/"+getStatePrefix()+"Info.txt");
|
||||||
File tmp(outFile, String(buf.c_str()));
|
File tmp(outFile, String(buf.c_str()));
|
||||||
|
|
||||||
//Utils::ZipFolder(pathRes, pathRes + ".zip");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Finalize() { }
|
|
||||||
|
|
||||||
void saveState() {
|
void saveState() {
|
||||||
Utils::Sleep(1); //чтобы не было одинаковых по дате файлов.
|
Utils::Sleep(1); //чтобы не было одинаковых по дате файлов.
|
||||||
String stateFile = packageWorkspace + "/state/" + getStatePrefix() + printState();
|
String stateFile = packageWorkspace + "/state/" + getStatePrefix() + printState();
|
||||||
//printf("stateFile=<%s>\n", stateFile.getCharArray());
|
|
||||||
File tmp(stateFile, Utils::getDate());
|
File tmp(stateFile, Utils::getDate());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -173,15 +173,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state != Running) {
|
if (state != Running) {
|
||||||
//-
|
|
||||||
busyKernels = Utils::min(busyKernels - kernels, maxKernels);
|
busyKernels = Utils::min(busyKernels - kernels, maxKernels);
|
||||||
freeKernels = Utils::max(0, maxKernels - busyKernels);
|
freeKernels = Utils::max(0, maxKernels - busyKernels);
|
||||||
//-
|
|
||||||
saveState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (state != Running);
|
return (state != Running);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,19 +187,11 @@ public:
|
|||||||
printf("%ld done with time %f\n", id, total_time);
|
printf("%ld done with time %f\n", id, total_time);
|
||||||
state = Finished;
|
state = Finished;
|
||||||
}
|
}
|
||||||
|
virtual String copyResults(const String& pathRes) {
|
||||||
virtual void saveState() {
|
String resultPath(packageWorkspace + "/" + pathRes + "/" + getId());
|
||||||
String stateFile = workspace + "/TaskState";
|
Utils::Mkdir(resultPath);
|
||||||
File tmp(stateFile, printState());
|
Utils::Copy(workspace + "/out.txt", resultPath + "/out.txt");
|
||||||
}
|
Utils::Copy(workspace + "/err.txt", resultPath + "/err.txt");
|
||||||
|
return resultPath;
|
||||||
virtual String copyResults(const String& pathRes) {
|
|
||||||
String resultPath(packageWorkspace + "/" + pathRes + "/" + getId());
|
|
||||||
Utils::Mkdir(resultPath);
|
|
||||||
//Utils::Copy(workspace + "/TaskState", resultPath + "/TaskState");
|
|
||||||
Utils::Copy(workspace + "/out.txt", resultPath + "/out.txt");
|
|
||||||
Utils::Copy(workspace + "/err.txt", resultPath + "/err.txt");
|
|
||||||
//Utils::Copy(workspace + "/total_time", resultPath + "/total_time");
|
|
||||||
return resultPath;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user