новые директивы. v++
This commit is contained in:
@@ -380,6 +380,7 @@ public class Global {
|
|||||||
planner.Start();
|
planner.Start();
|
||||||
}
|
}
|
||||||
//---
|
//---
|
||||||
|
//---
|
||||||
public static void Init(String... args) {
|
public static void Init(String... args) {
|
||||||
System.out.println("VisualSapfor.jar started..");
|
System.out.println("VisualSapfor.jar started..");
|
||||||
Home = System.getProperty("user.dir"); //если Linux, дает без слеша в конце !!!
|
Home = System.getProperty("user.dir"); //если Linux, дает без слеша в конце !!!
|
||||||
|
|||||||
@@ -39,7 +39,10 @@ public enum DirectiveName {
|
|||||||
ASYNC,
|
ASYNC,
|
||||||
FLEXIBLE,
|
FLEXIBLE,
|
||||||
PARAMETER,
|
PARAMETER,
|
||||||
UNROLL
|
UNROLL,
|
||||||
|
PROCESS_PRIVATE,
|
||||||
|
COVER,
|
||||||
|
MERGE
|
||||||
;
|
;
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
@@ -117,7 +120,12 @@ public enum DirectiveName {
|
|||||||
return "Асинхронная";
|
return "Асинхронная";
|
||||||
case FLEXIBLE:
|
case FLEXIBLE:
|
||||||
return "Гибкая";
|
return "Гибкая";
|
||||||
|
case PROCESS_PRIVATE:
|
||||||
|
return "Клауза приватных для процесса переменных";
|
||||||
|
case COVER:
|
||||||
|
return "Клауза покрытия";
|
||||||
|
case MERGE:
|
||||||
|
return "Клауза для объединения циклов";
|
||||||
default:
|
default:
|
||||||
return "?";
|
return "?";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ public class Spec3Directive extends SpecDirective {
|
|||||||
&& getOwner().flags.get(1).equals(DirectiveName.TRANSFORM)
|
&& getOwner().flags.get(1).equals(DirectiveName.TRANSFORM)
|
||||||
&& getOwner().nearestGroup.equals(DirectiveName.TRANSFORM)
|
&& getOwner().nearestGroup.equals(DirectiveName.TRANSFORM)
|
||||||
&& !getOwner().flags.contains(DirectiveName.NOINLINE)
|
&& !getOwner().flags.contains(DirectiveName.NOINLINE)
|
||||||
|
&& !getOwner().flags.contains(DirectiveName.MERGE)
|
||||||
&& !getOwner().flags.contains(DirectiveName.FISSION)
|
&& !getOwner().flags.contains(DirectiveName.FISSION)
|
||||||
&& !getOwner().flags.contains(DirectiveName.SHRINK)
|
&& !getOwner().flags.contains(DirectiveName.SHRINK)
|
||||||
&& !getOwner().flags.contains(DirectiveName.EXPAND)
|
&& !getOwner().flags.contains(DirectiveName.EXPAND)
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ public class SpecDirective extends BaseDirective {
|
|||||||
super(provider_in, name_in);
|
super(provider_in, name_in);
|
||||||
}
|
}
|
||||||
public String get_word() {
|
public String get_word() {
|
||||||
boolean noBrackets = name.equals(DirectiveName.NOINLINE)||name.equals(DirectiveName.UNROLL);
|
boolean noBrackets = name.equals(DirectiveName.NOINLINE)||
|
||||||
|
name.equals(DirectiveName.UNROLL)|| name.equals(DirectiveName.MERGE);
|
||||||
return name.getText() + (noBrackets ? "" : "()");
|
return name.getText() + (noBrackets ? "" : "()");
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ public class Spec1Provider extends PrefixWordProvider {
|
|||||||
super(owner_in);
|
super(owner_in);
|
||||||
addDirective(new Spec1Directive(this, DirectiveName.REDUCTION));
|
addDirective(new Spec1Directive(this, DirectiveName.REDUCTION));
|
||||||
addDirective(new Spec1Directive(this, DirectiveName.PRIVATE));
|
addDirective(new Spec1Directive(this, DirectiveName.PRIVATE));
|
||||||
|
addDirective(new Spec1Directive(this, DirectiveName.PROCESS_PRIVATE));
|
||||||
addDirective(new Spec1Directive(this, DirectiveName.PARAMETER));
|
addDirective(new Spec1Directive(this, DirectiveName.PARAMETER));
|
||||||
|
addDirective(new Spec1Directive(this, DirectiveName.COVER));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,5 +10,6 @@ public class Spec3Provider extends PrefixWordProvider {
|
|||||||
addDirective(new Spec3Directive(this, DirectiveName.SHRINK));
|
addDirective(new Spec3Directive(this, DirectiveName.SHRINK));
|
||||||
addDirective(new Spec3Directive(this, DirectiveName.EXPAND));
|
addDirective(new Spec3Directive(this, DirectiveName.EXPAND));
|
||||||
addDirective(new Spec3Directive(this, DirectiveName.UNROLL));
|
addDirective(new Spec3Directive(this, DirectiveName.UNROLL));
|
||||||
|
addDirective(new Spec3Directive(this, DirectiveName.MERGE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class Visualiser extends Component {
|
|||||||
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
||||||
@Override
|
@Override
|
||||||
public void GetVersionInfo() {
|
public void GetVersionInfo() {
|
||||||
version = 1094;
|
version = 1095;
|
||||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||||
date_text = df.format(getClassBuildTime());
|
date_text = df.format(getClassBuildTime());
|
||||||
|
|||||||
@@ -109,23 +109,19 @@ public abstract class TestingPlanner<P extends TestingPackage> {
|
|||||||
case TestsSynchronize:
|
case TestsSynchronize:
|
||||||
TestsSynchronize();
|
TestsSynchronize();
|
||||||
UpdatePackageState(TasksPackageState.PackageWorkspaceCreation);
|
UpdatePackageState(TasksPackageState.PackageWorkspaceCreation);
|
||||||
Disconnect();
|
|
||||||
break;
|
break;
|
||||||
case PackageWorkspaceCreation:
|
case PackageWorkspaceCreation:
|
||||||
PackageWorkspaceCreation();
|
PackageWorkspaceCreation();
|
||||||
UpdatePackageState(TasksPackageState.PackageStart);
|
UpdatePackageState(TasksPackageState.PackageStart);
|
||||||
Disconnect();
|
|
||||||
break;
|
break;
|
||||||
case PackageStart:
|
case PackageStart:
|
||||||
PackageStart();
|
PackageStart();
|
||||||
testingPackage.StartDate = new Date().getTime();
|
testingPackage.StartDate = new Date().getTime();
|
||||||
UpdatePackageState(getStateAfterStart());
|
UpdatePackageState(getStateAfterStart());
|
||||||
Disconnect();
|
|
||||||
break;
|
break;
|
||||||
case RunningEnd:
|
case RunningEnd:
|
||||||
DownloadResults();
|
DownloadResults();
|
||||||
UpdatePackageState(TasksPackageState.Analysis);
|
UpdatePackageState(TasksPackageState.Analysis);
|
||||||
Disconnect();
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (CheckNextState()) UpdatePackage();
|
if (CheckNextState()) UpdatePackage();
|
||||||
@@ -166,11 +162,11 @@ public abstract class TestingPlanner<P extends TestingPackage> {
|
|||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Print("Ошибка сеанса. Соединение будет разорвано.");
|
Print("Ошибка сеанса. Соединение будет разорвано.");
|
||||||
Print(ex.getMessage());
|
Print(ex.getMessage());
|
||||||
Disconnect();
|
|
||||||
//
|
//
|
||||||
testingPackage.connectionErrosCount++;
|
testingPackage.connectionErrosCount++;
|
||||||
UpdatePackage();
|
UpdatePackage();
|
||||||
} finally {
|
} finally {
|
||||||
|
Disconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import java.util.*;
|
|||||||
public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
||||||
//----
|
//----
|
||||||
LinkedHashMap<String, Machine> machines = new LinkedHashMap<>();
|
LinkedHashMap<String, Machine> machines = new LinkedHashMap<>();
|
||||||
//todo приделать к ним очередь? или сделать в бд тестирования список машин.
|
|
||||||
LinkedHashMap<String, User> users = new LinkedHashMap<>();
|
LinkedHashMap<String, User> users = new LinkedHashMap<>();
|
||||||
//-- текущие машина и пользователь.
|
//-- текущие машина и пользователь.
|
||||||
Machine machine = null;
|
Machine machine = null;
|
||||||
@@ -196,25 +195,6 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
|||||||
Print("waiting for package start...");
|
Print("waiting for package start...");
|
||||||
Utils.sleep(1000);
|
Utils.sleep(1000);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
String plannerStartCommand = String.join(" ", "nohup",
|
|
||||||
Utils.DQuotes(getPlanner()),
|
|
||||||
Utils.DQuotes(user.workspace),
|
|
||||||
Utils.DQuotes(packageRemoteWorkspace.full_name),
|
|
||||||
Utils.DQuotes(testingPackage.kernels),
|
|
||||||
Utils.DQuotes(testingPackage.drv), "&");
|
|
||||||
|
|
||||||
user.connection.CommandNoWait("ulimit -s unlimited",plannerStartCommand);
|
|
||||||
RemoteFile PID = new RemoteFile(packageRemoteWorkspace, "PID");
|
|
||||||
RemoteFile STARTED = new RemoteFile(packageRemoteWorkspace, "STARTED");
|
|
||||||
while (!user.connection.Exists(STARTED)) {
|
|
||||||
Print("waiting for package start...");
|
|
||||||
Utils.sleep(1000);
|
|
||||||
}
|
|
||||||
if (user.connection.Exists(PID)) {
|
|
||||||
testingPackage.PID = user.connection.readFromFile(PID);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected boolean CheckNextState() throws Exception {
|
protected boolean CheckNextState() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user