Software/Geant4/Eclipse: Difference between revisions

From PBTWiki
Jump to navigation Jump to search
(Created page with "Editing Geant4 input files in Eclipse.")
 
(Added page with tutorial to using Eclipse to SSH into the pbt server)
Line 1: Line 1:
Editing Geant4 input files in Eclipse.
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 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).
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 [https://www.eclipse.org/downloads/eclipse-packages/ 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 Host name text box, enter the server address that you want to SSH into. For use with the pbt server, enter
<pre>
PLUS1.HEP.UCL.AC.UK
</pre>
and give the connection a name, for example <code>PLUS1</code>.
5) In the Remote Systems panel opened earlier, you should see a new connection with then connection name you chose earlier. Opening the tree by going 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 [http://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Eclipse&action=submit#Running_a_SSH_Shell_in_Eclipse here].
== Using Eclipse ==
=== 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.
=== 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 a 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.

Revision as of 12:53, 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 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).

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 Host name 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 by going 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 here.

Using Eclipse

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.

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 a 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.