Software/Geant4/Eclipse: Difference between revisions
SimonJolly (talk | contribs) No edit summary |
SaadShaikh (talk | contribs) |
||
Line 13: | Line 13: | ||
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: | 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 <code>Window > Perspective > Open Perspective > Other</code>, and then choosing Remote System Explorer. | 1) Open the Remote System Explorer (RSE). This is done by going to <code>Window > Perspective > Open Perspective > Other</code>, and then choosing Remote System Explorer. (Note: If it is not visible, it can be installed by <code>Help > Install New Software > Work with: All Available Sites</code>, and then searching ''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 <code>New > Connection</code>. | 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 <code>New > Connection</code>. |
Revision as of 10:45, 30 July 2018
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. (Note: If it is not visible, it can be installed by Help > Install New Software > Work with: All Available Sites
, and then searching 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 UCL HEP cluster, as well as the ability to perform all other standard bash commands on the pbt server.