diff --git a/pom.xml b/pom.xml
index e6fb7d10dc..4458343275 100644
--- a/pom.xml
+++ b/pom.xml
@@ -191,9 +191,9 @@
v0.0.44-dev4
v0.0.40
v0.0.44-dev4
- 1.4.4
- 1.4.4
- 1.4.4
+ 1.4.5
+ 1.4.5
+ 1.4.5
diff --git a/vcell-apiclient/src/main/java/org/vcell/api/server/AsynchMessageManager.java b/vcell-apiclient/src/main/java/org/vcell/api/server/AsynchMessageManager.java
index 20f953c1d2..4371afd32f 100644
--- a/vcell-apiclient/src/main/java/org/vcell/api/server/AsynchMessageManager.java
+++ b/vcell-apiclient/src/main/java/org/vcell/api/server/AsynchMessageManager.java
@@ -88,7 +88,7 @@ public AsynchMessageManager(ClientServerManager csm) {
* no-op if already called
*/
public synchronized void startPolling() {
- if (!bPoll.get()) {
+ if (!bPoll.get() && !clientServerManager.isVCellClientDevMain()) {
bPoll.set(true);
if (executorService == null) {
executorService = VCellExecutorService.get();
diff --git a/vcell-apiclient/src/main/java/org/vcell/api/server/ClientServerManager.java b/vcell-apiclient/src/main/java/org/vcell/api/server/ClientServerManager.java
index 4be69e0a4f..67eb1ff9fd 100644
--- a/vcell-apiclient/src/main/java/org/vcell/api/server/ClientServerManager.java
+++ b/vcell-apiclient/src/main/java/org/vcell/api/server/ClientServerManager.java
@@ -45,7 +45,11 @@ public class ClientServerManager implements ClientServerInterface {
private final static Logger lg = LogManager.getLogger(ClientServerManager.class);
private final VCellConnectionFactory vcellConnectionFactory;
public final Auth0ConnectionUtils auth0ConnectionUtils;
-
+
+ public boolean isVCellClientDevMain() {
+ return !(vcellConnectionFactory instanceof RemoteProxyVCellConnectionFactory);
+ }
+
public interface InteractiveContextDefaultProvider {
InteractiveClientServerContext getInteractiveContext();
}
diff --git a/vcell-client/src/main/java/cbit/vcell/solver/ode/gui/LangevinOptionsPanel.java b/vcell-client/src/main/java/cbit/vcell/solver/ode/gui/LangevinOptionsPanel.java
index e63aa01a9d..c9b59ba74b 100644
--- a/vcell-client/src/main/java/cbit/vcell/solver/ode/gui/LangevinOptionsPanel.java
+++ b/vcell-client/src/main/java/cbit/vcell/solver/ode/gui/LangevinOptionsPanel.java
@@ -6,8 +6,6 @@
import javax.swing.*;
import javax.swing.border.Border;
-import cbit.vcell.solver.NFsimSimulationOptions;
-import org.vcell.solver.nfsim.gui.NFSimSimulationOptionsPanel;
import org.vcell.util.gui.CollapsiblePanel;
import cbit.vcell.client.PopupGenerator;
@@ -24,10 +22,10 @@ public class LangevinOptionsPanel extends CollapsiblePanel {
private javax.swing.JRadioButton multiRunRadioButton = null;
private javax.swing.ButtonGroup buttonGroupTrials = null;
- private JLabel numOfTrialsLabel = null;
- private JTextField ivjJTextFieldNumOfTrials = null;
- private JLabel numOfParallelLocalRuns = null;
- private JTextField ivjJTextFieldNumOfParallelLocalRuns = null;
+ private JLabel totalNumberOfJobsLabel = null;
+ private JTextField totalNumberOfJobsJTextField = null;
+ private JLabel numberOfConcurrentJobsLabel = null;
+ private JTextField numberOfConcurrentJobsJTextField = null;
private JTextField numPartitionsXTextField = null;
private JTextField numPartitionsYTextField = null;
@@ -68,21 +66,24 @@ public void actionPerformed(java.awt.event.ActionEvent e) {
// setNewOptions();
// }
if (e.getSource() == getTrajectoryButton()) {
- getJTextFieldNumOfTrials().setEnabled(false);
- getJTextFieldNumOfParallelLocalRuns().setEnabled(false);
- getJTextFieldNumOfParallelLocalRuns().setText("");
- solverTaskDescription.setNumTrials(1);
- getJTextFieldNumOfTrials().setText("");
+ getTotalNumberOfJobsJTextField().setEnabled(false);
+ getNumberOfConcurrentJobsJTextField().setEnabled(false);
+ getNumberOfConcurrentJobsJTextField().setText("");
+ getTotalNumberOfJobsJTextField().setText("");
+ solverTaskDescription.getLangevinSimulationOptions().setNumberOfConcurrentJobs(1);
+ solverTaskDescription.getLangevinSimulationOptions().setTotalNumberOfJobs(1);
} else if (e.getSource() == getMultiRunButton()) {
- getJTextFieldNumOfTrials().setEnabled(true);
- getJTextFieldNumOfParallelLocalRuns().setEnabled(false);
- getJTextFieldNumOfParallelLocalRuns().setText(solverTaskDescription.getLangevinSimulationOptions().getNumOfParallelLocalRuns()+"");
- int numTrials = solverTaskDescription.getNumTrials();
- if(numTrials > 1) { // a multi-trial number is already set
- getJTextFieldNumOfTrials().setText(numTrials+"");
+ getTotalNumberOfJobsJTextField().setEnabled(true);
+ getNumberOfConcurrentJobsJTextField().setEnabled(true);
+ int totalNumberOfJobs = solverTaskDescription.getLangevinSimulationOptions().getTotalNumberOfJobs();
+ if(totalNumberOfJobs > 1) { // a multi-trial number is already set
+ getTotalNumberOfJobsJTextField().setText(totalNumberOfJobs+"");
+ getNumberOfConcurrentJobsJTextField().setText(solverTaskDescription.getLangevinSimulationOptions().getNumberOfConcurrentJobs()+"");
} else {
- solverTaskDescription.setNumTrials(SolverTaskDescription.DefaultNumTrials);
- getJTextFieldNumOfTrials().setText(SolverTaskDescription.DefaultNumTrials+"");
+ solverTaskDescription.getLangevinSimulationOptions().setTotalNumberOfJobs(LangevinSimulationOptions.DefaultTotalNumberOfJobs);
+ solverTaskDescription.getLangevinSimulationOptions().setNumberOfConcurrentJobs(LangevinSimulationOptions.DefaultNumberOfConcurrentJobs);
+ getTotalNumberOfJobsJTextField().setText(solverTaskDescription.getLangevinSimulationOptions().getTotalNumberOfJobs()+"");
+ getNumberOfConcurrentJobsJTextField().setText(solverTaskDescription.getLangevinSimulationOptions().getNumberOfConcurrentJobs()+"");
}
} else if(e.getSource() == randomSeedCheckBox) {
randomSeedTextField.setEditable(randomSeedCheckBox.isSelected());
@@ -113,29 +114,43 @@ public void focusLost(java.awt.event.FocusEvent e) {
if (e.isTemporary()) {
return;
}
- if (e.getSource() == getJTextFieldNumOfParallelLocalRuns() ||
- e.getSource() == getJTextFieldIntervalImage() ||
+ if (e.getSource() == getJTextFieldIntervalImage() ||
e.getSource() == getJTextFieldIntervalSpring() ||
e.getSource() == getNumPartitionsXTextField() ||
e.getSource() == getNumPartitionsYTextField() ||
e.getSource() == getNumPartitionsXTextField() ||
e.getSource() == getRandomSeedTextField() ) {
setNewOptions();
- } else if(e.getSource() == getJTextFieldNumOfTrials()) {
- int numTrials;
+ } else if(e.getSource() == getTotalNumberOfJobsJTextField()) {
+ int totalNumberOfJobs;
try {
- numTrials = Integer.parseInt(getJTextFieldNumOfTrials().getText());
- if(numTrials < 2) {
- numTrials = SolverTaskDescription.DefaultNumTrials;
+ totalNumberOfJobs = Integer.parseInt(getTotalNumberOfJobsJTextField().getText());
+ if(totalNumberOfJobs < 2) {
+ totalNumberOfJobs = LangevinSimulationOptions.DefaultTotalNumberOfJobs;
}
} catch(NumberFormatException ex) {
- numTrials = solverTaskDescription.getNumTrials();
- if(numTrials < 2) {
- numTrials = SolverTaskDescription.DefaultNumTrials;
+ totalNumberOfJobs = solverTaskDescription.getLangevinSimulationOptions().getTotalNumberOfJobs();
+ if(totalNumberOfJobs < 2) {
+ totalNumberOfJobs = LangevinSimulationOptions.DefaultTotalNumberOfJobs;
}
}
- solverTaskDescription.setNumTrials(numTrials);
- getJTextFieldNumOfTrials().setText(numTrials+"");
+ solverTaskDescription.getLangevinSimulationOptions().setTotalNumberOfJobs(totalNumberOfJobs);
+ getTotalNumberOfJobsJTextField().setText(totalNumberOfJobs+"");
+ } else if(e.getSource() == getNumberOfConcurrentJobsJTextField()) {
+ int numberOfConcurrentJobs;
+ try {
+ numberOfConcurrentJobs = Integer.parseInt(getNumberOfConcurrentJobsJTextField().getText());
+ if(numberOfConcurrentJobs < 2) {
+ numberOfConcurrentJobs = LangevinSimulationOptions.DefaultNumberOfConcurrentJobs;
+ }
+ } catch(NumberFormatException ex) {
+ numberOfConcurrentJobs = solverTaskDescription.getLangevinSimulationOptions().getNumberOfConcurrentJobs();
+ if(numberOfConcurrentJobs < 2) {
+ numberOfConcurrentJobs = LangevinSimulationOptions.DefaultNumberOfConcurrentJobs;
+ }
+ }
+ solverTaskDescription.getLangevinSimulationOptions().setNumberOfConcurrentJobs(numberOfConcurrentJobs);
+ getNumberOfConcurrentJobsJTextField().setText(numberOfConcurrentJobs+"");
}
}
}
@@ -164,8 +179,8 @@ private void initialize() {
gbc.gridx = 0;
gbc.gridy = 0;
gbc.fill = GridBagConstraints.BOTH;
-// gbc.weightx = 1.0;
-// gbc.weighty = 1.0;
+ gbc.weightx = 1.0;
+ gbc.weighty = 1.0;
gbc.insets = new Insets(1,1,1,1);
getContentPanel().add(trialPanel, gbc);
@@ -173,8 +188,8 @@ private void initialize() {
gbc.gridx = 1;
gbc.gridy = 0;
gbc.fill = GridBagConstraints.BOTH;
-// gbc.weightx = 1.0;
-// gbc.weighty = 1.0;
+ gbc.weightx = 1.0;
+ gbc.weighty = 1.0;
gbc.insets = new Insets(1,1,1,1);
getContentPanel().add(centerPanel, gbc);
@@ -182,7 +197,7 @@ private void initialize() {
gbc.gridx = 2;
gbc.gridy = 0;
gbc.fill = GridBagConstraints.BOTH;
- gbc.weightx = 1.0;
+ gbc.weightx = 0.0;
gbc.weighty = 1.0;
gbc.insets = new Insets(1,1,1,1);
getContentPanel().add(rightPanel, gbc);
@@ -221,7 +236,7 @@ private void initialize() {
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(0,22,1,6);
- trialPanel.add(getNumOfTrialsLabel(), gbc);
+ trialPanel.add(getTotalNumberOfJobsLabel(), gbc);
gbc = new GridBagConstraints();
gbc.gridx = 2;
@@ -229,7 +244,8 @@ private void initialize() {
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(0,5,3,1);
- trialPanel.add(getJTextFieldNumOfTrials(), gbc);
+ gbc.weightx = 1.0;
+ trialPanel.add(getTotalNumberOfJobsJTextField(), gbc);
gbc = new GridBagConstraints();
gbc.gridx = 1;
@@ -237,7 +253,7 @@ private void initialize() {
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(0,22,1,6);
- trialPanel.add(getNumOfParallelLocalRunsLabel(), gbc);
+ trialPanel.add(getNumberOfConcurrentJobsLabel(), gbc);
gbc = new GridBagConstraints();
gbc.gridx = 2;
@@ -245,7 +261,8 @@ private void initialize() {
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(0,5,3,1);
- trialPanel.add(getJTextFieldNumOfParallelLocalRuns(), gbc);
+ gbc.weightx = 1.0;
+ trialPanel.add(getNumberOfConcurrentJobsJTextField(), gbc);
gbc = new GridBagConstraints();
gbc.gridx = 0;
@@ -269,6 +286,7 @@ private void initialize() {
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(5,5,3,1);
+ gbc.weightx = 1.0;
trialPanel.add(getNumPartitionsXTextField(), gbc);
gbc = new GridBagConstraints();
@@ -285,6 +303,7 @@ private void initialize() {
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(0,5,3,1);
+ gbc.weightx = 1.0;
trialPanel.add(getNumPartitionsYTextField(), gbc);
gbc = new GridBagConstraints();
@@ -301,16 +320,9 @@ private void initialize() {
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(0,5,3,1);
+ gbc.weightx = 1.0;
trialPanel.add(getNumPartitionsZTextField(), gbc);
-// gbc = new GridBagConstraints(); // --- empty panel (filler)
-// gbc.gridx = 3;
-// gbc.gridy = 1;
-// gbc.anchor = GridBagConstraints.EAST;
-// gbc.fill = GridBagConstraints.HORIZONTAL;
-// gbc.weightx = 1.0;
-// trialPanel.add(new JLabel(""), gbc);
-
// ----- centerPanel -----------------------------------------------------
gbc = new GridBagConstraints();
gbc.gridx = 0;
@@ -318,6 +330,7 @@ private void initialize() {
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(0,26,1,5);
+ gbc.weightx = 0.0;
centerPanel.add(new JLabel("Spring Interval"), gbc);
gbc = new GridBagConstraints();
@@ -326,13 +339,15 @@ private void initialize() {
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(0,5,3,1);
+ gbc.weightx = 1.0;
centerPanel.add(getJTextFieldIntervalSpring(), gbc);
gbc = new GridBagConstraints();
gbc.gridx = 2;
gbc.gridy = 0;
gbc.anchor = GridBagConstraints.WEST;
- gbc.insets = new Insets(0,6,1,22);
+ gbc.insets = new Insets(0,6,1,0);
+ gbc.weightx = 0.0;
centerPanel.add(new JLabel("s"), gbc);
gbc = new GridBagConstraints();
@@ -341,6 +356,7 @@ private void initialize() {
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(0,26,1,5);
+ gbc.weightx = 0.0;
centerPanel.add(new JLabel("Image Interval"), gbc);
gbc = new GridBagConstraints();
@@ -349,13 +365,15 @@ private void initialize() {
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(0,5,3,1);
+ gbc.weightx = 1.0;
centerPanel.add(getJTextFieldIntervalImage(), gbc);
gbc = new GridBagConstraints();
gbc.gridx = 2;
gbc.gridy = 1;
gbc.anchor = GridBagConstraints.WEST;
- gbc.insets = new Insets(0,6,1,22);
+ gbc.insets = new Insets(0,6,1,0);
+ gbc.weightx = 0.0;
centerPanel.add(new JLabel("s"), gbc);
gbc = new GridBagConstraints(); // --- empty panel (filler)
@@ -363,13 +381,13 @@ private void initialize() {
gbc.gridy = 2;
gbc.anchor = GridBagConstraints.EAST;
gbc.fill = GridBagConstraints.VERTICAL;
- gbc.weightx = 1.0;
+ gbc.weightx = 0.0;
gbc.weighty = 1.0;
centerPanel.add(new JLabel(""), gbc);
// ----- rightPanel ----------------------------------------------------
gbc = new GridBagConstraints();
- gbc.gridx = 3;
+ gbc.gridx = 0;
gbc.gridy = 0;
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.BOTH;
@@ -409,8 +427,8 @@ private void initialize() {
getButtonGroupTrials().add(getMultiRunButton());
getButtonGroupTrials().setSelected(getTrajectoryButton().getModel(), true);
- getJTextFieldNumOfTrials().setEnabled(false);
- getJTextFieldNumOfParallelLocalRuns().setEnabled(false);
+ getTotalNumberOfJobsJTextField().setEnabled(false);
+ getNumberOfConcurrentJobsJTextField().setEnabled(false);
getNumPartitionsXTextField().setEnabled(true);
getNumPartitionsYTextField().setEnabled(true);
@@ -455,30 +473,30 @@ private javax.swing.JRadioButton getMultiRunButton() {
}
return multiRunRadioButton;
}
- private javax.swing.JTextField getJTextFieldNumOfTrials() {
- if (ivjJTextFieldNumOfTrials == null) {
+ private javax.swing.JTextField getTotalNumberOfJobsJTextField() {
+ if (totalNumberOfJobsJTextField == null) {
try {
- ivjJTextFieldNumOfTrials = new javax.swing.JTextField();
- ivjJTextFieldNumOfTrials.setName("JTextFieldNumOfTrials");
- ivjJTextFieldNumOfTrials.setColumns(9);
- ivjJTextFieldNumOfTrials.setText("");
+ totalNumberOfJobsJTextField = new javax.swing.JTextField();
+ totalNumberOfJobsJTextField.setName("JTextFieldNumOfTrials");
+ totalNumberOfJobsJTextField.setColumns(9);
+ totalNumberOfJobsJTextField.setText("");
} catch (java.lang.Throwable ivjExc) {
handleException(ivjExc);
}
}
- return ivjJTextFieldNumOfTrials;
+ return totalNumberOfJobsJTextField;
}
- private javax.swing.JLabel getNumOfTrialsLabel() {
- if (numOfTrialsLabel == null) {
+ private javax.swing.JLabel getTotalNumberOfJobsLabel() {
+ if (totalNumberOfJobsLabel == null) {
try {
- numOfTrialsLabel = new javax.swing.JLabel();
- numOfTrialsLabel.setName("NumOfTrials");
- numOfTrialsLabel.setText("Num. Of Trials");
+ totalNumberOfJobsLabel = new javax.swing.JLabel();
+ totalNumberOfJobsLabel.setName("TotalNumberOfJobs");
+ totalNumberOfJobsLabel.setText("Total Num. Of Jobs");
} catch (java.lang.Throwable ivjExc) {
handleException(ivjExc);
}
}
- return numOfTrialsLabel;
+ return totalNumberOfJobsLabel;
}
private JCheckBox getRandomSeedCheckBox() {
if(randomSeedCheckBox == null) {
@@ -597,30 +615,30 @@ private javax.swing.JLabel getNumPartitionsLabel() {
return numPartitionsLabel;
}
- private javax.swing.JTextField getJTextFieldNumOfParallelLocalRuns() {
- if (ivjJTextFieldNumOfParallelLocalRuns == null) {
+ private javax.swing.JTextField getNumberOfConcurrentJobsJTextField() {
+ if (numberOfConcurrentJobsJTextField == null) {
try {
- ivjJTextFieldNumOfParallelLocalRuns = new javax.swing.JTextField();
- ivjJTextFieldNumOfParallelLocalRuns.setName("JTextFieldNumOfParallelLocalRuns");
- ivjJTextFieldNumOfParallelLocalRuns.setColumns(3);
- ivjJTextFieldNumOfParallelLocalRuns.setText("");
+ numberOfConcurrentJobsJTextField = new javax.swing.JTextField();
+ numberOfConcurrentJobsJTextField.setName("NumberOfConcurrentJobsJTextField");
+ numberOfConcurrentJobsJTextField.setColumns(3);
+ numberOfConcurrentJobsJTextField.setText("");
} catch (java.lang.Throwable ivjExc) {
handleException(ivjExc);
}
}
- return ivjJTextFieldNumOfParallelLocalRuns;
+ return numberOfConcurrentJobsJTextField;
}
- private javax.swing.JLabel getNumOfParallelLocalRunsLabel() {
- if (numOfParallelLocalRuns == null) {
+ private javax.swing.JLabel getNumberOfConcurrentJobsLabel() {
+ if (numberOfConcurrentJobsLabel == null) {
try {
- numOfParallelLocalRuns = new javax.swing.JLabel();
- numOfParallelLocalRuns.setName("NumOfParallelLocalRuns");
- numOfParallelLocalRuns.setText("Parallel Local Runs");
+ numberOfConcurrentJobsLabel = new javax.swing.JLabel();
+ numberOfConcurrentJobsLabel.setName("NumberOfConcurrentJobsLabel");
+ numberOfConcurrentJobsLabel.setText("Num. Concurrent Jobs");
} catch (java.lang.Throwable ivjExc) {
handleException(ivjExc);
}
}
- return numOfParallelLocalRuns;
+ return numberOfConcurrentJobsLabel;
}
private JTextField getJTextFieldIntervalImage() {
@@ -681,8 +699,8 @@ private void initConnections() {
getRandomSeedCheckBox().addActionListener(ivjEventHandler);
getRandomSeedHelpButton().addActionListener(ivjEventHandler);
- getJTextFieldNumOfTrials().addFocusListener(ivjEventHandler);
- getJTextFieldNumOfParallelLocalRuns().addFocusListener(ivjEventHandler);
+ getTotalNumberOfJobsJTextField().addFocusListener(ivjEventHandler);
+ getNumberOfConcurrentJobsJTextField().addFocusListener(ivjEventHandler);
getJTextFieldIntervalImage().addFocusListener(ivjEventHandler);
getJTextFieldIntervalSpring().addFocusListener(ivjEventHandler);
getNumPartitionsXTextField().addFocusListener(ivjEventHandler);
@@ -704,20 +722,20 @@ private void refresh() {
getMultiRunButton().setEnabled(true);
LangevinSimulationOptions lso = solverTaskDescription.getLangevinSimulationOptions();
- int numTrials = solverTaskDescription.getNumTrials();
- int numOfParallelLocalRuns = lso.getNumOfParallelLocalRuns();
- if(numTrials == 1) {
+ int totalNumberOfJobs = lso.getTotalNumberOfJobs();
+ int numberOfConcurrentJobs = lso.getNumberOfConcurrentJobs();
+ if(totalNumberOfJobs == 1) {
getTrajectoryButton().setSelected(true);
- getJTextFieldNumOfTrials().setEnabled(false);
- getJTextFieldNumOfTrials().setText("");
- getJTextFieldNumOfParallelLocalRuns().setEnabled(false);
- getJTextFieldNumOfParallelLocalRuns().setText("");
+ getTotalNumberOfJobsJTextField().setEnabled(false);
+ getTotalNumberOfJobsJTextField().setText("");
+ getNumberOfConcurrentJobsJTextField().setEnabled(false);
+ getNumberOfConcurrentJobsJTextField().setText("");
} else {
getMultiRunButton().setSelected(true);
- getJTextFieldNumOfTrials().setEnabled(true);
- getJTextFieldNumOfTrials().setText(numTrials+"");
- getJTextFieldNumOfParallelLocalRuns().setEnabled(false);
- getJTextFieldNumOfParallelLocalRuns().setText(numOfParallelLocalRuns + "");
+ getTotalNumberOfJobsJTextField().setEnabled(true);
+ getTotalNumberOfJobsJTextField().setText(totalNumberOfJobs+"");
+ getNumberOfConcurrentJobsJTextField().setEnabled(true);
+ getNumberOfConcurrentJobsJTextField().setText(numberOfConcurrentJobs + "");
}
getNumPartitionsXTextField().setText(lso.getNPart(0) + "");
@@ -744,17 +762,23 @@ private void setNewOptions() {
return;
}
try {
- LangevinSimulationOptions sso = solverTaskDescription.getLangevinSimulationOptions();
- int numOfParallelLocalRuns = 1;
+ LangevinSimulationOptions sso = solverTaskDescription.getLangevinSimulationOptions();
+ int totalNumberOfJobs = 1;
+ int numberOfConcurrentJobs = 1;
double intervalImage = solverTaskDescription.getLangevinSimulationOptions().getIntervalImage();
double intervalSpring = solverTaskDescription.getLangevinSimulationOptions().getIntervalSpring();
int[] npart = solverTaskDescription.getLangevinSimulationOptions().getNPart();
- if(getMultiRunButton().isSelected()) { // we can get here only on FocusLost event in the numOfTrials text field
+ if(getMultiRunButton().isSelected()) { // we can get here only on FocusLost event in the totalNumberOfJobs text field
+ try {
+ totalNumberOfJobs = Integer.parseInt(getTotalNumberOfJobsJTextField().getText());
+ } catch (NumberFormatException ex) {
+ totalNumberOfJobs = sso.getTotalNumberOfJobs();
+ }
try {
- numOfParallelLocalRuns = Integer.parseInt(getJTextFieldNumOfParallelLocalRuns().getText());
+ numberOfConcurrentJobs = Integer.parseInt(getNumberOfConcurrentJobsJTextField().getText());
} catch (NumberFormatException ex) {
- numOfParallelLocalRuns = sso.getNumOfParallelLocalRuns();
+ numberOfConcurrentJobs = sso.getNumberOfConcurrentJobs();
}
}
@@ -780,7 +804,8 @@ private void setNewOptions() {
// make a copy
LangevinSimulationOptions lso = new LangevinSimulationOptions(sso);
- lso.setNumOfParallelLocalRuns(numOfParallelLocalRuns);
+ lso.setTotalNumberOfJobs(totalNumberOfJobs);
+ lso.setNumberOfConcurrentJobs(numberOfConcurrentJobs);
lso.setRandomSeed(randomSeed);
lso.setIntervalImage(intervalImage);
lso.setIntervalSpring(intervalSpring);
diff --git a/vcell-core/src/main/java/cbit/vcell/math/VCML.java b/vcell-core/src/main/java/cbit/vcell/math/VCML.java
index 75b946a1fa..afea7780cc 100644
--- a/vcell-core/src/main/java/cbit/vcell/math/VCML.java
+++ b/vcell-core/src/main/java/cbit/vcell/math/VCML.java
@@ -253,6 +253,9 @@ public class VCML {
public final static String LangevinSimulationOptions_Partition_Nx = "PartitionNx";
public final static String LangevinSimulationOptions_Partition_Ny = "PartitionNy";
public final static String LangevinSimulationOptions_Partition_Nz = "PartitionNz";
+ public final static String LangevinSimulationOptions_numberOfConcurrentJobs = "NumberOfConcurrentJobs";
+ public final static String LangevinSimulationOptions_totalNumberOfJobs = "TotalNumberOfJobs";
+ // deprecated, kept for backward compatibility with old .vcml files; use totalNumberOfJobs instead
public final static String LangevinSimulationOptions_numOfParallelLocalRuns = "NumOfParallelLocalRuns";
public final static String NFSimSimulationOptions = "NFSimSimulationOptions";
diff --git a/vcell-core/src/main/java/cbit/vcell/solver/LangevinSimulationOptions.java b/vcell-core/src/main/java/cbit/vcell/solver/LangevinSimulationOptions.java
index 9cc9136252..24d6c83a88 100644
--- a/vcell-core/src/main/java/cbit/vcell/solver/LangevinSimulationOptions.java
+++ b/vcell-core/src/main/java/cbit/vcell/solver/LangevinSimulationOptions.java
@@ -27,7 +27,8 @@
public class LangevinSimulationOptions implements Serializable, Matchable, VetoableChangeListener {
- // TODO: add the partition definitions in the LangevinOptionsPanel
+ public final static int DefaultNumberOfConcurrentJobs = 20; // used for multiple runs on the cluster
+ public final static int DefaultTotalNumberOfJobs = 100;
public final static String Partition_Nx = "Partition Nx: ";
public final static String Partition_Ny = "Partition Ny: ";
@@ -46,7 +47,11 @@ public class LangevinSimulationOptions implements Serializable, Matchable, Vetoa
// randomSeed may be null, in which case the solver will generate its own randomSeed as it already does
protected BigInteger randomSeed = null;
- protected int numOfParallelLocalRuns = 1; // how many instances of the solver run in parallel
+ // both initialized to 1 - only one job will be run on the cluster
+ protected int totalNumberOfJobs = 1; // how many jobs will be run on the cluster
+ protected int numberOfConcurrentJobs = 1; // how many instances of the solver may run concurrently on the cluster
+// @Deprecated
+ protected int numOfParallelLocalRuns = 1; // replaced by numberOfConcurrentJobs but kept for backward compatibility
protected double intervalSpring = 1.00E-9; // default: dtspring: 1.00E-9 - from advanced
protected double intervalImage = 1.00E-4; // default: dtimage: 1.00E-4 - from advanced
@@ -63,7 +68,9 @@ public LangevinSimulationOptions() {
public LangevinSimulationOptions(LangevinSimulationOptions langevinSimulationOptions) {
this();
randomSeed = langevinSimulationOptions.randomSeed;
- numOfParallelLocalRuns = langevinSimulationOptions.numOfParallelLocalRuns;
+// numOfParallelLocalRuns = langevinSimulationOptions.numOfParallelLocalRuns;
+ totalNumberOfJobs = langevinSimulationOptions.totalNumberOfJobs;
+ numberOfConcurrentJobs = langevinSimulationOptions.numberOfConcurrentJobs;
intervalSpring = langevinSimulationOptions.intervalSpring;
intervalImage = langevinSimulationOptions.intervalImage;
npart[0] = langevinSimulationOptions.npart[0];
@@ -84,7 +91,10 @@ public boolean compareEqual(Matchable obj) {
if(randomSeed != langevinSimulationOptions.randomSeed) {
return false;
}
- if(numOfParallelLocalRuns != langevinSimulationOptions.numOfParallelLocalRuns) {
+ if(totalNumberOfJobs != langevinSimulationOptions.totalNumberOfJobs) {
+ return false;
+ }
+ if(numberOfConcurrentJobs != langevinSimulationOptions.numberOfConcurrentJobs) {
return false;
}
if(intervalSpring != langevinSimulationOptions.intervalSpring) {
@@ -102,10 +112,17 @@ public boolean compareEqual(Matchable obj) {
}
// -----------------------------------------------------------------------------------
- // can be between 0 and numOfTrials-1
- public int getNumOfParallelLocalRuns() {
- return numOfParallelLocalRuns;
+// @Deprecated
+// public int getNumOfParallelLocalRuns() { // // can be between 0 and numOfTrials-1
+// return numOfParallelLocalRuns;
+// }
+ public int getTotalNumberOfJobs() {
+ return totalNumberOfJobs;
}
+ public int getNumberOfConcurrentJobs() { // // can be between 0 and totalNumberOfJobs-1
+ return numberOfConcurrentJobs;
+ }
+
public double getIntervalSpring() {
return intervalSpring;
}
@@ -122,8 +139,15 @@ public BigInteger getRandomSeed() {
return randomSeed;
}
- public final void setNumOfParallelLocalRuns(int newValue) {
- this.numOfParallelLocalRuns = newValue;
+// @Deprecated
+// public final void setNumOfParallelLocalRuns(int newValue) {
+// this.numOfParallelLocalRuns = newValue;
+// }
+public final void setTotalNumberOfJobs(int newValue) {
+ this.totalNumberOfJobs = newValue;
+}
+ public final void setNumberOfConcurrentJobs(int newValue) {
+ this.numberOfConcurrentJobs = newValue;
}
public final void setIntervalSpring(double newValue) {
this.intervalSpring = newValue;
@@ -187,7 +211,8 @@ public String getVCML() {
buffer.append("\t\t" + VCML.LangevinSimulationOptions_Partition_Nx + " " + npart[0] + "\n");
buffer.append("\t\t" + VCML.LangevinSimulationOptions_Partition_Ny + " " + npart[1] + "\n");
buffer.append("\t\t" + VCML.LangevinSimulationOptions_Partition_Nz + " " + npart[2] + "\n");
- buffer.append("\t\t" + VCML.LangevinSimulationOptions_numOfParallelLocalRuns + " " + numOfParallelLocalRuns + "\n");
+ buffer.append("\t\t" + VCML.LangevinSimulationOptions_numberOfConcurrentJobs + " " + numberOfConcurrentJobs + "\n");
+ buffer.append("\t\t" + VCML.LangevinSimulationOptions_totalNumberOfJobs + " " + totalNumberOfJobs + "\n");
buffer.append("\t" + VCML.EndBlock + "\n");
return buffer.toString();
}
@@ -211,7 +236,13 @@ public void readVCML(CommentStringTokenizer tokens) throws DataAccessException {
randomSeed = new BigInteger(token);
} else if(token.equalsIgnoreCase(VCML.LangevinSimulationOptions_numOfParallelLocalRuns)) {
token = tokens.nextToken();
- numOfParallelLocalRuns = Integer.parseInt(token);
+ numOfParallelLocalRuns = Integer.parseInt(token); // not in use anymore, may be present in some old VCML files
+ } else if(token.equalsIgnoreCase(VCML.LangevinSimulationOptions_totalNumberOfJobs)) {
+ token = tokens.nextToken();
+ totalNumberOfJobs = Integer.parseInt(token);
+ } else if(token.equalsIgnoreCase(VCML.LangevinSimulationOptions_numberOfConcurrentJobs)) {
+ token = tokens.nextToken();
+ numberOfConcurrentJobs = Integer.parseInt(token);
} else if(token.equalsIgnoreCase(VCML.LangevinSimulationOptions_intervalSpring)) {
token = tokens.nextToken();
intervalSpring = Double.parseDouble(token);
diff --git a/vcell-core/src/main/java/cbit/vcell/solver/SolverLongDesc.java b/vcell-core/src/main/java/cbit/vcell/solver/SolverLongDesc.java
index 79960ae175..e01b920a18 100644
--- a/vcell-core/src/main/java/cbit/vcell/solver/SolverLongDesc.java
+++ b/vcell-core/src/main/java/cbit/vcell/solver/SolverLongDesc.java
@@ -467,7 +467,7 @@ interface SolverLongDesc {
"LangevinNoVis is a free, open-source, particle-based, stochastic, simulator platform suitable " +
"for modeling mesoscopic systems, which are far too large to be modeled with molecular dynamics " +
"but which require more detail than obtainable with macroscopic continuum models. Molecules are " +
- "modeled as a collection of impenetrable spheres (called “sites”) linked by stiff springs." +
+ "modeled as a collection of impenetrable spheres (called 'sites') linked by stiff springs." +
"