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