Software/Geant4/Eclipse: Difference between revisions

From PBTWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
== Why use Eclipse ==
== Why use Eclipse ==


Eclipse allows for editing files remotely using an environment that gives rudimentary debugging tools and a easy to use remote file explorer. Furthermore, this method allows support of remote file editing on an operating system that does not have native access to the bash terminal (i.e. windows).
Eclipse allows for editing files remotely using an environment that gives rudimentary debugging tools and a simple remote file explorer.
Furthermore, this method supports remote file editing on an operating system that does not have native access to the bash terminal (i.e. Windows).


It should be noted that this tutorial is written with the C/C++ Oxygen version of the Eclipse IDE in mind, as the Remote System Explorer plug-ins are included in this package, but the tutorial should work for other packages.  
It should be noted that this tutorial is written with the C/C++ Oxygen version of the Eclipse IDE in mind, as the Remote System Explorer plug-ins are included in this package, but the tutorial should work for other packages.  
Line 18: Line 19:
3) In the New Connection window that opened, select the 'SSH Only' System type.
3) In the New Connection window that opened, select the 'SSH Only' System type.


4) In the Host name text box, enter the server address that you want to SSH into. For use with the pbt server, enter
4) In the hostname text box, enter the server address that you want to SSH into. For use with the pbt server, enter
<pre>
<pre>
plus1.hep.ucl.ac.uk
plus1.hep.ucl.ac.uk
Line 26: Line 27:
5) In the Remote Systems panel opened earlier, you should see a new connection with then connection name you chose earlier. Opening the tree from <code>Stfp Files > Root</code>, you will be prompted to enter a User ID and password. In their respective text boxes, enter your pbt User ID and Password. You are now connected remotely to the <code>plus1</code> server.*
5) In the Remote Systems panel opened earlier, you should see a new connection with then connection name you chose earlier. Opening the tree from <code>Stfp Files > Root</code>, you will be prompted to enter a User ID and password. In their respective text boxes, enter your pbt User ID and Password. You are now connected remotely to the <code>plus1</code> server.*


* It should be noted that you cannot subsequently SSH from the PLUS1 server into another pc in the pbt cluster using this method. Alternative methods to do so are discussed in the [http://www.hep.ucl.ac.uk/pbt/wiki/Software/Geant4/Eclipse#Running_an_SSH_Shell_in_Eclipse Running a SSH Shell in Eclipse] section.
* It should be noted that you cannot subsequently SSH from the <code>plus1</code> server into another pc in the pbt cluster using this method.  
Alternative methods to do so are discussed in the [http://www.hep.ucl.ac.uk/pbt/wiki/Software/Geant4/Eclipse#Running_an_SSH_Shell_in_Eclipse Running a SSH Shell in Eclipse] section.


== Using Eclipse ==
== Using Eclipse ==
Line 32: Line 34:
=== Remote System Details ===
=== Remote System Details ===


You can open a panel that displays details about the remote systems you have connected to. This is done by going to Window > Show View > Remote System Details. You can use this window in a manner similar to the Remote Systems file explorer panel, except that the Remote System Details panel gives more detail about the files contained (for example the time stamp of the last time the directory/file was edited etc). You can use the buttons at the top right of this panel to navigate through the servers directories.
You can open a panel that displays details about the remote systems you have connected to.
This is done from <code>Window > Show View > Remote System Details</code>.
You can use this window in a manner similar to the Remote Systems file explorer panel, except that the Remote System Details panel gives more detail about the files contained (for example the time stamp of the last time the directory/file was edited etc).  
You can use the buttons at the top right of this panel to navigate through the server's directories.


=== Easier File management ===
=== Easier File management ===


Instead of using a bash terminal, you can use the tree within the Remote Systems panel to move, copy, and open files. This is done by simple highlighting the file, right clicking, and selecting the required operation (copy/cut/delete etc.). It should be noted that this method of file management is significantly slower than performing the same action via a terminal.
Instead of using a bash terminal, you can use the tree within the Remote Systems panel to move, copy, and open files.
This is done by simple highlighting the file, right clicking, and selecting the required operation (copy/cut/delete etc.).
It should be noted that this method of file management is significantly slower than performing the same action via a terminal.


=== Running an SSH Shell in Eclipse ===
=== Running an SSH Shell in Eclipse ===


You can also open a bash terminal in Eclipse. In the Remote Systems panel, under the SSH connection you have created, you will see a subdirectory called 'Ssh Shells'. Right click this and select Launch Shell. This shell allows connection to internal pc's in the pbt cluster, as well as the ability to perform all other standard bash commands on the pbt server.
You can also open a bash terminal in Eclipse.
In the Remote Systems panel, under the SSH connection you have created, you will see a subdirectory called 'SSH Shells'.
Right click this and select <code>Launch Shell</code>.
This shell allows connections to internal PCs in the [[Software/Geant4/HEP_Linux_cluster|HEP Linux cluster]], as well as the ability to perform all other standard bash commands on the pbt server.

Revision as of 13:11, 27 September 2017

Editing Geant4 input files in Eclipse.

Why use Eclipse

Eclipse allows for editing files remotely using an environment that gives rudimentary debugging tools and a simple remote file explorer. Furthermore, this method supports remote file editing on an operating system that does not have native access to the bash terminal (i.e. Windows).

It should be noted that this tutorial is written with the C/C++ Oxygen version of the Eclipse IDE in mind, as the Remote System Explorer plug-ins are included in this package, but the tutorial should work for other packages. All of the current eclipse packages can be found here.

Connecting via SSH

Once you have downloaded, installed, and launched Eclipse, you will want to SSH into the plus1.hep.ucl.ac.uk server. This is done by the following steps:

1) Open the Remote System Explorer (RSE). This is done by going to Window > Perspective > Open Perspective > Other, and then choosing Remote System Explorer.

2) In the Panel containing the Remote Systems tab that appeared when the RSE was opened, define a new connection. This can be done by clicking the icon at the top of the panel, or right clicking on the panel and selecting New > Connection.

3) In the New Connection window that opened, select the 'SSH Only' System type.

4) In the hostname text box, enter the server address that you want to SSH into. For use with the pbt server, enter

plus1.hep.ucl.ac.uk

and give the connection a name, for example plus1.

5) In the Remote Systems panel opened earlier, you should see a new connection with then connection name you chose earlier. Opening the tree from Stfp Files > Root, you will be prompted to enter a User ID and password. In their respective text boxes, enter your pbt User ID and Password. You are now connected remotely to the plus1 server.*

  • It should be noted that you cannot subsequently SSH from the plus1 server into another pc in the pbt cluster using this method.

Alternative methods to do so are discussed in the Running a SSH Shell in Eclipse section.

Using Eclipse

Remote System Details

You can open a panel that displays details about the remote systems you have connected to. This is done from Window > Show View > Remote System Details. You can use this window in a manner similar to the Remote Systems file explorer panel, except that the Remote System Details panel gives more detail about the files contained (for example the time stamp of the last time the directory/file was edited etc). You can use the buttons at the top right of this panel to navigate through the server's directories.

Easier File management

Instead of using a bash terminal, you can use the tree within the Remote Systems panel to move, copy, and open files. This is done by simple highlighting the file, right clicking, and selecting the required operation (copy/cut/delete etc.). It should be noted that this method of file management is significantly slower than performing the same action via a terminal.

Running an SSH Shell in Eclipse

You can also open a bash terminal in Eclipse. In the Remote Systems panel, under the SSH connection you have created, you will see a subdirectory called 'SSH Shells'. Right click this and select Launch Shell. This shell allows connections to internal PCs in the HEP Linux cluster, as well as the ability to perform all other standard bash commands on the pbt server.