Commit 4a6f944d authored by Kasper Gammeltoft's avatar Kasper Gammeltoft
Browse files

Merge branch 'next' of https://github.com/eclipse/ice into next

parents 9fa51f5c 6c05cc6b
......@@ -9,3 +9,4 @@
/GeometryEditorTutorial.log
/GeometryEditorTutorial.out
/geometryEditorTutoria.synctex.gz
/src/
\chapter{Geometry Editor}
This article is designed to outline the basic controls of ICE's Geometry Editor.
\section{Getting Started}
......@@ -166,4 +166,11 @@ and clicking the Delete button, highlighted below.
\begin{center}
\includegraphics[width=12cm]{images/GeometryDeleteButton.jpg}
\end{center}
\ No newline at end of file
\end{center}
\section{Saving}
You may save the contents of the Geometry Editor. This can be done as normal for
an Eclipse file, using the Save button or Ctrl + S. The result will be a file
named Geometry\_Editor.xml in the ItemDB folder. The Geometry Editor can be
reponed by double clicking on this file.
......@@ -200,3 +200,13 @@ The Toggle Axis button on the toolbar will show/hide the axes in the editor.
\begin{center}
\includegraphics[width=12cm]{images/MeshEditorToggleAxis}
\end{center}
The Toggle HUD button will remove or display the small info bar beneath the
editor which shows the current cursor and camera positions.
\section{Saving}
You may save the contents of the Mesh Editor. This can be done as normal for
an Eclipse file, using the Save button or Ctrl + S. The result will be a file
named Mesh\_Editor.xml in the ItemDB folder. The Mesh Editor can be
reponed by double clicking on this file.
\ No newline at end of file
......@@ -5,9 +5,11 @@ ICE features functionality for visualizing models using ParaView.
\section{Installation and Configuration}
ParaView use for ICE requires a Mac OS or Linux operating system, as ICE does
not currently support ParaView connections on Windows. You will also need an
installation of ParaView on your local machine. ParaView can be downloaded from
its \href{http://www.paraview.org/download/}{official website}. The ICE
not currently support ParaView connections to Windows hosts. However, it will
still be possible to connect from ICE on Windows to a Mac or Linux machine
that has ParaView installed. You will also need an installation of ParaView on
your local machine.
ParaView can be downloaded from its \href{http://www.paraview.org/download/}{official website}. The ICE
development team recommends using the latest available version of ParaView,
currently 5.0 at the time of this writing. You will further need a custom
Python HTTP web server implementation, which can be downloaded from the
......@@ -47,7 +49,8 @@ On Linux, the path will end with the top level folder into which ParaView was un
On Mac, the path will end with the folder containing your ParaView.app. For example, if you have installed ParaView to your Applications folder, the path will simply be /Applications
\textbf{Server Script Path:} The full path to the http_pvw_server.py file, ending with the folder containing it. For example if the file is on your desktop, the path might be /home/username/Desktop.
\textbf{Server Script Path:} The full path to the http\_pvw\_server.py file,
ending with the folder containing it. For example if the file is on your desktop, the path might be /home/username/Desktop.
\textbf{Visualizer Port:} The port number for the ParaView web visualizer. The default value will be fine, but if you change it, then it must be different from the port number you provide for Port.
......@@ -94,7 +97,10 @@ inside the display area or adjust the zoom by scrolling the mouse wheel.
\includegraphics[width=12cm]{images/ParaViewPlotEditor}
\end{center}
The buttons in the upper left can also be used to manipulate the camera. The green plus sign will zoom in, while the black minus sign will zoom out. The green circular arrow button will reset the camera to its default position.
The buttons in the upper left can also be used to manipulate the camera. The
green plus sign will zoom in, while the black minus sign will zoom out. The
yellow and blue circular arrow button will reset the camera to its default
position.
\subsubsection{Selecting the Plot}
......
......@@ -248,7 +248,8 @@ Component}.}
In the lower left of the \texttt{Visualization Model} are three tabs, hilighted
in Figure \ref{fig:itemtabs}.
Switch to the \texttt{Resource Component} tab in your Item and tothe \texttt{Resources} tab on the left, as shown below.
Switch to the \texttt{Resource Component} tab in your Item and to the
\texttt{Resources} tab on the left, as shown below.
\begin{figure}[!h]
\includegraphics[width=12cm]{images/ResourcesTab}
......
......@@ -99,7 +99,7 @@ VisIt session on the machine running ICE. If VisIt in installed on this machine,
use the Browse button to enter the directory containing the VisIt executable
into the Path to VisIt field. Optionally, set a port number (default 9600) that
VisIt will use to serve data to ICE, and if this VisIt session will be shared
with multiple userd, set a password.
with multiple users, set a password.
\textbf{2) Launch VisIt remotely -} Using this method of connecting will launch
a new VisIt session on a machine other than the one used to run ICE. Specify the
......@@ -192,7 +192,7 @@ Once a file is in the Visualization File Viewer, create a plot by selecting the
file, and then clicking the Add a Plot to the List button located in the VisIt
Plot Viewer in the lower part of the column on the left side of the workbench.
The resulting dialog allows the user to select plots from the file to view.
After mading a selection or selctions and pressing OK, these plots will be
After making a selection or selctions and pressing OK, these plots will be
placed in the VisIt Plot Viewer.
\begin{center}
......
......@@ -29,7 +29,6 @@ import org.eclipse.ice.datastructures.form.DataComponent;
import org.eclipse.ice.datastructures.form.Form;
import org.eclipse.ice.datastructures.form.ResourceComponent;
import com.spotify.docker.client.DefaultDockerClient;
import com.spotify.docker.client.DockerCertificateException;
import com.spotify.docker.client.DockerClient;
import com.spotify.docker.client.DockerException;
......@@ -123,7 +122,7 @@ public class JobLauncherForm extends Form {
private static final String TBBEntryName = "Number of TBB Threads";
private DockerClientFactory clientFactory;
/**
* <p>
* The constructor.
......@@ -142,19 +141,23 @@ public class JobLauncherForm extends Form {
// Make a DataComponent for the input files
DataComponent fileComponent = new DataComponent();
fileComponent.setId(filesId);
fileComponent.setDescription("This section contains the name of the file(s) " + "used by this Job.");
fileComponent
.setDescription("This section contains the name of the file(s) "
+ "used by this Job.");
fileComponent.setName("Input File(s)");
DataComponent dockerComponent = new DataComponent();
dockerComponent.setName("Docker Configuration");
dockerComponent.setDescription("This section enables the use of docker for this Job Launch.");
dockerComponent.setDescription(
"This section enables the use of docker for this Job Launch.");
dockerComponent.setId(dockerId);
// Create a docker launch check box.
IEntry dockerLaunch = new DiscreteEntry("true", "false");
dockerLaunch.setDefaultValue("false");
dockerLaunch.setName("Launch with Docker");
dockerLaunch.setDescription("Check to perform this job launch in a docker container.");
dockerLaunch.setDescription(
"Check to perform this job launch in a docker container.");
dockerLaunch.setId(33);
dockerComponent.addEntry(dockerLaunch);
......@@ -163,14 +166,17 @@ public class JobLauncherForm extends Form {
IEntry imagesList = new DiscreteEntry("Select Image") {
@Override
public void update(IUpdateable component) {
if (component instanceof DiscreteEntry && "Launch with Docker".equals(component.getName())) {
boolean enable = Boolean.valueOf(((IEntry) component).getValue());
if (component instanceof DiscreteEntry
&& "Launch with Docker".equals(component.getName())) {
boolean enable = Boolean
.valueOf(((IEntry) component).getValue());
setReady(enable);
if (enable) {
// Set up the allowed values
DockerClient dockerClient;
try {
dockerClient = new DockerClientFactory().getDockerClient();
dockerClient = new DockerClientFactory()
.getDockerClient();
if (dockerClient != null) {
allowedValues = new ArrayList<String>();
for (Image i : dockerClient.listImages()) {
......@@ -181,15 +187,20 @@ public class JobLauncherForm extends Form {
}
setValue(allowedValues.get(0));
} else {
logger.error("Error in getting a reference to Docker or listing available Images.");
logger.error(
"Error in getting a reference to Docker or listing available Images.");
allowedValues = new ArrayList<String>();
allowedValues.add("Error connecting to Docker.");
allowedValues
.add("Error connecting to Docker.");
setValue(allowedValues.get(0));
return;
}
} catch (DockerCertificateException | DockerException | InterruptedException | IOException e1) {
} catch (DockerCertificateException | DockerException
| InterruptedException | IOException e1) {
e1.printStackTrace();
logger.error("Error in getting a reference to Docker or listing available Images.", e1);
logger.error(
"Error in getting a reference to Docker or listing available Images.",
e1);
allowedValues = new ArrayList<String>();
allowedValues.add("Error connecting to Docker.");
setValue(allowedValues.get(0));
......@@ -202,11 +213,12 @@ public class JobLauncherForm extends Form {
};
imagesList.setName("Available Images");
imagesList.setDescription("Select the docker image to use for this docker launch.");
imagesList.setDescription(
"Select the docker image to use for this docker launch.");
imagesList.setReady(false);
imagesList.setId(34);
dockerComponent.addEntry(imagesList);
// Register the list of images as a listener
// of the docker launch entry.
dockerLaunch.register(imagesList);
......@@ -214,13 +226,13 @@ public class JobLauncherForm extends Form {
// Add the data components
addComponent(fileComponent);
addComponent(dockerComponent);
// Create a ResourceComponent
ResourceComponent outputData = new ResourceComponent();
outputData.setName("Output Files and Data");
outputData.setId(outputId);
outputData.setDescription(
"This section describes all of the data " + "and additional output created by the job launch.");
outputData.setDescription("This section describes all of the data "
+ "and additional output created by the job launch.");
// Add the ResourceComponent
addComponent(outputData);
......@@ -254,7 +266,8 @@ public class JobLauncherForm extends Form {
* The default number of processes for MPI to use.
* </p>
*/
public void enableMPI(int minProcesses, int maxProcesses, int defaultProcesses) {
public void enableMPI(int minProcesses, int maxProcesses,
int defaultProcesses) {
// Local Declarations - Check for negative or zero values
final int minProcessesFixed = Math.max(minProcesses, 1);
......@@ -266,7 +279,8 @@ public class JobLauncherForm extends Form {
// Only create the Entry and add it to the DataComponent if the numbers
// are right
if (minProcessesFixed <= maxProcessesFixed && defaultProcessesFixed >= minProcessesFixed
if (minProcessesFixed <= maxProcessesFixed
&& defaultProcessesFixed >= minProcessesFixed
&& defaultProcessesFixed <= maxProcessesFixed) {
// Get the parallelism component.
parallelismComponent = getParallelismComponent();
......@@ -292,7 +306,8 @@ public class JobLauncherForm extends Form {
mpiEntry.setName(mpiEntryName);
mpiEntry.setId(1);
mpiEntry.setDescription("The number of processes to use with " + "MPI");
mpiEntry.setDescription(
"The number of processes to use with " + "MPI");
// Add the Entry to the Component
parallelismComponent.addEntry(mpiEntry);
}
......@@ -318,7 +333,8 @@ public class JobLauncherForm extends Form {
if (parallelComponentEnabled) {
parallelismComponent = getParallelismComponent();
if (!parallelismComponent.contains(openMPEntryName)
&& !parallelismComponent.contains(JobLauncherForm.TBBEntryName)) {
&& !parallelismComponent
.contains(JobLauncherForm.TBBEntryName)) {
removeParallelismComponent();
}
// Otherwise just remove the MPI Entry
......@@ -358,7 +374,8 @@ public class JobLauncherForm extends Form {
* job.
* </p>
*/
public void enableOpenMP(int minThreads, int maxThreads, int defaultThreads) {
public void enableOpenMP(int minThreads, int maxThreads,
int defaultThreads) {
// Local Declarations - Check for negative or zero values
final int minThreadsFixed = Math.max(minThreads, 1);
......@@ -370,7 +387,8 @@ public class JobLauncherForm extends Form {
// Only create the Entry and add it to the DataComponent if the numbers
// are right
if (minThreadsFixed <= maxThreadsFixed && defaultThreadsFixed >= minThreadsFixed
if (minThreadsFixed <= maxThreadsFixed
&& defaultThreadsFixed >= minThreadsFixed
&& defaultThreadsFixed <= maxThreadsFixed) {
// Get the parallelism component)
parallelismComponent = getParallelismComponent();
......@@ -384,19 +402,22 @@ public class JobLauncherForm extends Form {
allowed.add(String.valueOf(minThreadsFixed));
allowed.add(String.valueOf(maxThreadsFixed));
openMPEntry.setAllowedValues(allowed);
openMPEntry.setDefaultValue(String.valueOf(defaultThreadsFixed));
openMPEntry
.setDefaultValue(String.valueOf(defaultThreadsFixed));
openMPEntry.setValue(String.valueOf(defaultThreadsFixed));
} else {
openMPEntry = new DiscreteEntry();
allowed.add(String.valueOf(minThreadsFixed));
openMPEntry.setAllowedValues(allowed);
openMPEntry.setDefaultValue(String.valueOf(defaultThreadsFixed));
openMPEntry
.setDefaultValue(String.valueOf(defaultThreadsFixed));
openMPEntry.setValue(String.valueOf(defaultThreadsFixed));
}
openMPEntry.setName(openMPEntryName);
openMPEntry.setId(1);
openMPEntry.setDescription("The number of threads to use with " + "OpenMP");
openMPEntry.setDescription(
"The number of threads to use with " + "OpenMP");
// Add the Entry to the Component
parallelismComponent.addEntry(openMPEntry);
}
......@@ -422,7 +443,8 @@ public class JobLauncherForm extends Form {
parallelismComponent = getParallelismComponent();
// If MPI and TBB are disabled, remove the whole component
if (!parallelismComponent.contains(mpiEntryName)
&& !parallelismComponent.contains(JobLauncherForm.TBBEntryName)) {
&& !parallelismComponent
.contains(JobLauncherForm.TBBEntryName)) {
removeParallelismComponent();
}
// Otherwise just remove the MPI Entry
......@@ -473,7 +495,8 @@ public class JobLauncherForm extends Form {
// Only create the Entry and add it to the DataComponent if the numbers
// are right
if (minThreadsFixed <= maxThreadsFixed && defaultThreadsFixed >= minThreadsFixed
if (minThreadsFixed <= maxThreadsFixed
&& defaultThreadsFixed >= minThreadsFixed
&& defaultThreadsFixed <= maxThreadsFixed) {
// Get the parallelism component)
parallelismComponent = getParallelismComponent();
......@@ -501,7 +524,8 @@ public class JobLauncherForm extends Form {
tBBEntry.setName(JobLauncherForm.TBBEntryName);
tBBEntry.setId(2);
tBBEntry.setDescription("The number of threads to use with " + "Thread Building Blocks");
tBBEntry.setDescription("The number of threads to use with "
+ "Thread Building Blocks");
// Add the Entry to the Component
parallelismComponent.addEntry(tBBEntry);
}
......@@ -527,7 +551,8 @@ public class JobLauncherForm extends Form {
parallelismComponent = getParallelismComponent();
// If MPI and OpenMP is disabled, remove the whole component
if (!parallelismComponent.contains(mpiEntryName)
&& !parallelismComponent.contains(JobLauncherForm.openMPEntryName)) {
&& !parallelismComponent
.contains(JobLauncherForm.openMPEntryName)) {
removeParallelismComponent();
}
// Otherwise just remove the TBB Entry
......@@ -554,14 +579,15 @@ public class JobLauncherForm extends Form {
* @param files
* List of files available for the job.
*/
public void setInputFiles(String name, String desc, ArrayList<String> files) {
public void setInputFiles(String name, String desc,
ArrayList<String> files) {
// Local Declarations
int oldId = 0;
IEntry oldEntry = null;
DataComponent fileComponent = ((DataComponent) getComponent(1));
final ArrayList<String> finalFiles = (files != null) ? (ArrayList<String>) files.clone()
: new ArrayList<String>();
final ArrayList<String> finalFiles = (files != null)
? (ArrayList<String>) files.clone() : new ArrayList<String>();
String oldValue = "";
// Determine if the Entry already exists in the component and remove it
......@@ -580,13 +606,9 @@ public class JobLauncherForm extends Form {
// Set the name and description of the Filename entry
fileEntry.setDescription(desc);
fileEntry.setName(name);
fileEntry.setId((oldId > 0) ? oldId : fileComponent.retrieveAllEntries().size()); // FIXME!
// Bug
// -
// needs
// a
// unique
// id
// FIXME! Bug - needs a unique id
fileEntry.setId((oldId > 0) ? oldId
: fileComponent.retrieveAllEntries().size());
// Keep the original value, if possible
if (fileEntry.getAllowedValues().contains(oldValue)) {
fileEntry.setValue(oldValue);
......@@ -633,6 +655,10 @@ public class JobLauncherForm extends Form {
* This method removes an input file type from the Form. If null is passed
* in, nothing is changed.
*
* CLIENTS SHOULD NOT use this operation to remove input types. Instead,
* call see
* {@link org.eclipse.ice.item.jobLauncher.JobLauncher.removeInputType}.
*
* @param name
* The name of the input file type
*/
......@@ -677,8 +703,8 @@ public class JobLauncherForm extends Form {
accountEntry.setValue("none");
accountEntry.setId(3);
accountEntry.setName("Account Code/Project Code");
accountEntry
.setDescription("Account code or project name that " + "should be used when launching the simulation.");
accountEntry.setDescription("Account code or project name that "
+ "should be used when launching the simulation.");
// Add the Entry to the component
parallelismComponent.addEntry(accountEntry);
......@@ -706,7 +732,9 @@ public class JobLauncherForm extends Form {
*/
private DataComponent getParallelismComponent() {
return (parallelComponentEnabled) ? (DataComponent) getComponent(parallelId) : createParallelismComponent();
return (parallelComponentEnabled)
? (DataComponent) getComponent(parallelId)
: createParallelismComponent();
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment