This eclipse is a modified version of:
eclipse-parallel-indigo-SR2-incubation-linux-gtk-x86_64.tar.gz or
eclipse-parallel-indigo-SR2-incubation-macosx-cocoa-x86_64.tar.gz or
Modifications include the updated PTP projects in the dropins folder.

----------------------------------------------------------
  Preparing your client machine for managed connections:
----------------------------------------------------------

Eclipse PTP makes multiple connections to system resources, and this is
a problem for systems with one-time passwords (i.e. cryptokey). To work
around this problem, you need to configure your ssh client to use managed
connections, either on a per-host basis, or for all connections. Under 
managed connections, the first connection to the remote host (ssh) becomes the 
master connection, and all subsequent connection requests (ssh, scp, sftp,
rsync) are tunneled through the master connection, until the master session
terminates. For more information, see the man page for ssh_config.

The following instructions assume a linux or macos client. Choose ONE of
the following two options:

1) You want managed connections for ALL HOSTS (will affect ALL ssh
   connections):

   To configure ssh for managed connections on all hosts, edit your
   $HOME/.ssh/config file (or create one, if you don't have one) and add the
   following lines using a text editor:

     Host *
     ControlMaster=auto
     ControlPath=~/.ssh/cm_socket/%r@%h:%p

2) You want managed connections for ONE HOST (for example, surveyor):

   To configure ssh for managed connections on one host, edit your
   $HOME/.ssh/config file (or create one, if you don't have one) and add the
   following lines using a text editor:

     Host surveyor
     Hostname=surveyor.alcf.anl.gov
     ControlMaster=auto
     ControlPath=~/.ssh/cm_socket/%r@%h:%p

After editing the config file, create the directory which will hold the
connections:

  $ mkdir $HOME/.ssh/cm_socket

If you don't do this, your connections will fail with the following error 
(or something similar):

  muxserver_listen bind(): No such file or directory

--------------------------------------------
  Using Eclipse PTP with ALCF BGP support:
  Configuring a Resource Manager
--------------------------------------------

To launch eclipse, change to the eclipse directory and run the eclipse
executable. For the first launch, run eclipse with the "-clean" parameter.

$ cd eclipse
$ ./eclipse -clean

When prompted to select a workspace location, enter a location for your
local eclipse workspace. When the main welcome window appears, click on 
the "Workbench: Go To Workbench" icon.

To configure a connection to an ALCF resource, such as Surveyor, do the
following:

1) change to the "System Monitoring" Perspective. In the Main Menu, select
the Window -> Open Perspective -> Other... option, then select "System
Monitoring".

2) in the "Resource Managers" tab, right-click with the mouse and select
the "Create "Add Resource Manager" item.

3) in the "Choose Resource Manager Type" window, choose the
"gov.anl.alcf.bgp.batch" item, and select "Next".

4) In the "Control Connection configuration" window, select the following:
   Remote service provider: Remote Tools
   Connection Name: select the "New..." button.

5) In the "Generic Remote Host" sub-window, enter a meaningful name, such
as "Surveyor" in the "Target Name" field. In the "Host Information" area,
enter:

Remote Host (selected)
Host: surveyor.alcf.anl.gov
User: your username

Do not enter the password here, you will be prompted for it.  For Surveyor, 
you can also configure a public key authentication method.  For Intrepid or 
Challenger, select the "password" method, as public key method will not 
work. Press "finish" to accept the configuration.

6) Back in the "Control Connection Configuration", confirm that your new
host is selected in the "Connection Name" selection box, and press the
"Next" button.

7) In the "Monitor Connection configuration" window, press "Next".

8) In the "Common Resource Manager Configuration" window, you can accept
the default name or (better) un-check the "Use default name and description"
box and enter a more meaningful name in the "Name" text box. Press
"Finish" to accept your new connection.

9) To start and test the new connection, double-click with the mouse on the
new Resource Manager, or right-click with the mouse and select the "Start
Resource Manager" item.

---!!! WARNING !!!---
Due to a bug(?) in Eclipse PTP, if you enter the password incorrectly,
you might end up in a cryptocard challenge-response reset loop. If that
happens, force-quit eclipse (by killing the application). There is no 
other exit...
---!!! WARNING !!!---

After some initialization, you should see the active partitions for the
resource in the "system: hostname" tab. The active running jobs will be 
listed in the "Active Jobs" tab. If you select an active running job, its
job details will appear in the "Further" tab.

--------------------------------------------
  Using Eclipse PTP with ALCF BGP support:
  Creating a synchronized project
--------------------------------------------

Note: Even though we are creating an MPI Fortran application, we will
create it through the C/C++ perspective, to avoid a known bug.

1) Switch to the Remote C/C++ perspective. Under the main menu, select the
"Window -> Open Perspective -> Other..." item. In the "Open Perspective"
window, choose the "Remote C/C++" perspective and press the "OK" button.

2) Create a new project. Right-click with the mouse in the "Project Explorer"
tab, and select the "New... -> Synchronized C/C++ Project" item.

3) In the "New Synchronized Project" window, enter a project name in the 
"Project Name" box. Select the "Makefile project -> Demo Hello World - 
Fortran using MPI" option under "Project Type", and select "Remote Linux
GCC Tool Chain" under the "Toolchains". Press "Next" to continue.

4) In the "Basic Settings" window, enter changes if desired. Press "Next".

5) In the "Select Configurations" window, accept the defaults and press "Next".

6) In the "Configure Remote Synchronization" window, select your configured
resource manager in the "Connection" selection box. In the "Location" field, 
press the "Browse..." button and select a remote location for your project. 
If you enter a new directory, it will be created for you.

--------------------------------------------
  Using Eclipse PTP with ALCF BGP support:
  Running a synchronized project
--------------------------------------------

1) Select your project in the "Project Ecplorer" tab. 

2) Build your project by right-clicking with the mouse on your
project name, and select the "Build Project" item, or by selecting "Project ->
Build Project" in the main menu. Be patient as the build runs locally and on
the remote system.  The build will also run automatically when the run is
submitted.

3) In the main menu, select the "Run -> Run Configurations..." item.

4) In the "Run Configurations" window, double-click with the mouse on the 
"Parallel Application" item.

5) In the "Resources" tab, select your resource manager.

6) In the "Basic PBS Settings" tab, enter the job information. These values
will be passed to the qsub program. For example:

Account: some meaningful account
Queue: default
Number of Nodes: 32
BG/P Mode: vn

7) In the "Application" tab, select the "Application program" by pressing on
the "Browse" button, and navigating to the project directory on the remote
host, then expand the bin directory to find your executable.

8) In the "Arguments" tab, de-select the "Use default working directory"
checkbox, and browse to your remote project main directory.

9) Run the program by pressing the "run" button.

10) The remote build will happen automatically, and the job will be submitted.
You can monitor the build process by switching to the "Console" tab in the
bottom sub-window.  There is a current bug in which the job will mark itself
COMPLETED in the Eclipse interface as soon as it is submitted. That is only
because it does not show up immediately in the "qstat" results.

11) Switch to the "System Monitoring" perspective, and wait for your job to appear
in the "Active Jobs" tab, and in the system map tab.

12) when the job completes, you can view the output logs by synchronizing the
projects in eclipse. To force synchronization, switch back to the "Remote
C/C++" perspective.  Right-click with the mouse on your project, and select the
"Synchronization -> Sync all now" item. The job cobaltlog, error and output
files should appear in the "Project Explorer" tab.  

--------------------------------------------
  Using Eclipse PTP with ALCF BGP support:
  Exiting Eclipse
--------------------------------------------

To avoid the cryptocard challenge-response reset loop, stop the Resource
Manager before exiting eclipse. To stop the resource manager, change to
the "System Monitoring" perspective, and right-click with the mouse on the
running resource manager. Select "Stop Resource Manager".

If you do end up in the reset loop, just force terminate eclipse.




