Software/Geant4/Eclipse: Difference between revisions

From PBTWiki
Jump to navigation Jump to search
m (undid last edit, applied change to correct link)
m (formatting)
Line 25: Line 25:
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.*
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 in the[http://www.hep.ucl.ac.uk/pbt/wiki/Software/Geant4/Eclipse#Running_a_SSH_Shell_in_Eclipse Running a SSH Shell in Eclipse] section.
* 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_a_SSH_Shell_in_Eclipse Running a SSH Shell in Eclipse] section.


== Using Eclipse ==
== Using Eclipse ==

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