Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ptp-dev] LANL's Eclipse Cheat Sheet

Attached is the cheat sheet Laura and I have for one of the clusters at LANL.

Hopefully, this will help Steve's configuration sheet.

Happy Labor Day!

Ginger
Created:        8/27/2011
Last Modified:  9/01/2011

Eclipse IDE for Parallel Application Developers (includes Incubating components)
Version: Indigo Release
Build id: 20110615-0604

----------------------------------------------------------------------------------------
Information on eclipse: http://wiki.eclipse.org/Main_Page

Documentation on eclipse Parallel Tools Platform (PTP)
        http://eclipse.org/ptp/doc.php
        http://wiki.eclipse.org/PTP/designs/2.x/launch_platform#Implementation_Details

PTP Help:
  http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.ptp.doc.user%2Fhtml%2Ftoc.html


Instructions for Linux (32 or 64 bit) on Yellowrail.lanl.gov

As of 31 August 2011, Yellowrail has been set-up to be able to run eclipse. To manage 
a sychronized project, eclipse needs Git to be installed on the remote cluster. This 
has been done for yellowrail.

------------------------------------------------------------------------------------------

Getting Started

1. Set-up the following environment variables:

       CVS_RSH=ssh, 
       http_proxy="http://proxyout.lanl.gov:8080";,
       http_proxyPort=8080, and 
       no_proxy=localhost,127.0.0.0/8

       (using tcsh, this can be done by adding the following lines to your .cshrc:
          setenv CVS_RSH ssh
          setenv http_proxy "http://proxyout.lanl.gov:8080";
          setenv http_proxyPort 8080
          setenv no_proxy localhost,127.0.0.0/8
        )

        If these environment variables are not set, all sorts of problems can ensue.
        There will also be numerous problems if there are errors in your .cshrc
        file on the remote system.

        NOTE - for PTP developers, also add
        setenv CVSROOT anonymous@xxxxxxxxxxxxxxx:/cvsroot/tools

2. Go to http://eclipse.org/downloads/ 

   Download: Eclipse IDE for Parallel Application Developers 

   Notice that you need to choose the correct packages for your system
   (Linux/Windows/Mac OS).

   The following instructions are for an installation on a Linux System.

3. Install eclipse, which will create a directory named "eclipse":

      If you want eclipse installed into a different directory than the one
      downloaded to:
         mv eclipse-parallel-indigo...tar.gz <installation_directory>
         cd to <installation_directory>.

      Unzip the file:
         gunzip eclipse-parallel-indigo...tar.gz

      Untar the file:
         tar xvf eclipse-parallel-indigo...tar

4. Run eclipse: 

       cd <installation_directory>/eclipse
       ./eclipse&

    Enter the path and name for a workspace directoryin the popup window 
    when requested. Eclipse works best when there is a different workspace 
    for each project, so be mindful of the name you choose.

    To select a new workspace, in the eclipse application: 
       Choose menu item: File -> Switch Workspace

    You may select from existing workspaces or enter a new one.

5. Verify settings:

    In the eclipse application, select menu item: 
        Window -> Preferences -> Network Connections

    The drop down <Active Provider> is <Native>

    In the Proxy entries table, the last item is selected with
    the following values:
      
        HTTP            proxyout.lanl.gov:8080        Native           false

    This is set automatically by the environment values in step 1.

6. Setup a Remote Environment:

    In the eclipse application, select menu item: 

       Select Window -> Show View -> Other
       Click  [black triangle] by <Remote Tools>    - expands the folder
       Select <Remote Environments>
       Click  [OK] 

    In the Remote Environments tab, 
       Right Click [Remote Host] 
       Select      [Create]

       Enter the following:
          Target Name:         <Yellowrail>
          Select Radio Button: Remote Host
          Host:                <yr-fe1.lanl.gov>
          User:                <your_moniker>
          Select Radio Button: password based authentication
          Password:            (leave this blank, it requires your cryptocard password)
       Click [Finish]

    When Remote Host is expanded, there is a listing for Yellowrail. 

7. Connecting to the Target Environment (Yellowrail):

    This allows you to synchronize a project on Yellowrail and start batch jobs.

    In the "Remote Environments" tab,
       Right Click <Yellowrail> 
       Select      <Edit>                      - pops up "Target Environment
                                                 Configuration" menu

       Password: enter a password from your cryptocard  
       Click [Finish] 

    In the "Remote Environments" tab, 
       Click  [green triangle]                  - pops up "Start the
                                                  Environment" window

    The [green triangle] initiates a connection to Yellowrail.

    The display in "Remote Environments" tab will change:
       a [red square] is displayed; you can click this to stop the connection.
       Remote Host -> Yellowrail's Status is Running

8. Create Resource Manager

    To open the Parallel Runtime perspective:
       Select Window -> Open Perspective -> Other...   - pops up 
                                                         "Open Perspective" menu
       Select <Parallel Runtime> 
       Click  [OK] 

    In the Resource Managers tab, 
       Right  Click in this window
       Select       <Add Resource Manager...>          - pops up 
                                                         "Resource Manager Type" menu
       Select <PBS-Generic-Batch> 
       Click  [Next>]

       Select Remote service provider: <Remote Tools] 
       Select Connection name:         <Yellowrail]

       Click  [black triangle] by      [Advanced Options]

       Select Radio Button:            [SSH port forwarding] 
       Click  [Next>] 

       Unselect Box:                   [Same as control connection]
       Select Remote service provided: <Remote Tools>
       Select Connection name:         <Yellowrail>
       Click  [black triangle] by      [Advanced Options]  - displays advanced options

       Select Radio Button:            <SSH port forwarding> 
       Click  [Next>] 

       Unselect Box: Use default name and description
       Enter:
         Name:  PBS-Generic-Batch-ProjectName         - enter in a unique name 
                                                        for each project.
       Click  [Finish] 

    The new resource manager "PBS-Generic-Batch-ProjectName (LML_JAXB)" is 
    displayed in the "Resource Managers" tab.

    To start the Resource Manager (which is necessary to run a program on Yellowrail).

       Right Click <PBS-Generic-Batch (LML_JAXB)> 
       Select      <Start Resource Manager>

    This starts the resource manager, so a batched job can be run on Yellowrail
    in a synchronized project.

9. Create a Demo Synchronized Project

      Select File -> New -> Project...              - pops up "New Project" menu
      Select Remote 
      Select Synchronized C/C++ Project             - even for a Fortran Project!
      Click [Next>]                                 - pops up "New Synchronized
                                                      Project" menu

      Enter the following:
        Project name: FortranProject

      Select <Demo - calculate Pi - Fortran using MPI> 
      Select <Linux GCC>
      Click  [Next>]

      Enter the following:
        Author:            <Your Name>
        Copyright notice:  <Your copyright notice>
        Greeting:          Hello MPI PI Fortran World
      Click  [Next>]
 
      Click  [Next>] 

      Set Synchronization Provider: to <Git>
      Set Remote Provider:          to <Remote Tools> 
      Set Connection:               to <Yellowrail>
      Set Location:                 to <remote work-compile directory>

      You can enter the directory information directly, or:

      Select [Browse]                               - pops up a file selection menu
      Select a work-compile directory on the remote system. 
             For this example: /panfs/scratch3/vol5/moniker/FortranProject

      It's best to have space on /usr/projects/packages/.

      Click  [Finish]

    The synchronized demo project is created. On Yellowrail, there is a copy of 
    the Makefile and source code in the location you selected
    (/panfs/scratch3/vol5/moniker/FortranProject).

10. Run the demo synchronized project

    In a terminal window, ssh onto Yellowrail (yr-fe1.lanl.gov):
       Set-up the following in your .cshrc on Yellowrail (yr-fe1):
          setenv CVS_RSH ssh
          setenv PATH    /usr/projects/packages/git-scm/got-1.7.5.4/bin:$PATH
          module load intel-c
          module load intel-f
          module load openmpi-intel

       On Yellowrail (yr-fe1):
          cd /panfs/scratch3/vol5/moniker/FortranProject
          mkdir bin
       
     Go back to your eclipse window, and open FortranProject.f90:
       Click  [black triangle] by FortranProject   - expands the folder

       Click  [black triangle] by src

       Double Click [FortranProject.f90]           - opens the file

       Right  Click on FortranProject.f90          - pops-up a menu
       Select       Run As -> Run Configurations...
       Right  Click [Parallel Application]
       Select       [New]                          - pops up a 
                                                     "Run Configurations" menu

     On the [Resources][Basic PBS Settings] tab,
       Set Resource Manager:    to <PBS-Generic-Batch>
       Set Queue:               to <Batch>
       Total Memory Needed:     to <30mb>
       MPI Command:             to <mpirun>
       MPI Number of Cores      to <3>

     On the [Resources][Advanced PBS Settings] tab,
       Set Queue:               to [Batch]

     On the [Resources][Import PBS Script] tab,
       Select box:        <Enable remote output file read>
       Select box:        <Enable remote error file read>

     On the [Application} tab,
       Parallel Project:        FortranProject
       Application Project:    
/panfs/scratch3/vol5/moniker/FortranProject/bin/FortranProject

     Click  [Apply]
     Click  [Run]

11. To view status/results of batched job

    On your Eclipse window:
       Select Window -> Open Perspective -> Other   - pops up a "Open Perspective" menu
       Select [System Monitoring]
       Click  [OK]                                  - opens up a "System Monitoring"
                                                      perspective

       Click [Inactive jobs] tab                    - displays the status of all
                                                      eclipse's batched jobs

    To view a batched job's error:
       Right Click an inactive job                  - pops up a menu
       Click [Get Job Error]
                        
       View  [Console] tab in lower left corner for results

    To view a batched job's output:
       Right Click an inactive job                  - pops up a menu
       Click [Get Job Output]
                        
       View  [Console] tab in lower left corner for results

    To view a batched job's status:
       Right Click an inactive job                  - pops up a menu
       Click [Refresh Job Status]                        
    
12. To create a new project:

    Create a new workspace:
      Select File -> Switch Workspace -> Other...
      Workspace: /home/moniker/projects/cplusWorkpace  - enter path and new name 
                                                         for a workspace

    Since this is a new workspace, you will need to repeat steps 6, 7, and 8 now.

    Create a new project:
      Select File -> New -> Project...              - pops up "New Project" menu
      Select <Remote> 
      Select <Synchronized C/C++ Project>
      Click  [Next>]                                - pops up "New Synchronized
                                                      Project" menu

      Enter the following:
        Project name: cplusProject

      Select <Empty Project> 
      Select <Linux GCC>
      Click  [Next>]
      Click  [Next>] 

      Select Synchronization Provider: to <Git>
      Select Remote Provider:          to <Remote Tools> 
      Select Connection:               to <Yellowrail>
      Select Location:                 to <remote work-compile directory> [Browse]

    You can enter the directory information directly, or:
      Select [Browse]                             - pops up a file selection menu
      Select a work-compile directory on the remote system. 
               For this example: /panfs/scratch3/vol5/moniker/FortranProject

      Click  [Finish]

   The syncronized project is created. On Yellowrail, the specified workspace has been
   created.

   To create a source directory:
      Select Window -> Open Perspective -> Other...  - pops up "Open Perspective" menu
      Select <C/C++>
      Click  [OK]
   
      Right Click <cplusProject>                     - pops up a menu
      Select      New -> File                        - pops up "New Folder" menu
      Enter the following:
                  Folder name: src
      Click       [Finish]

   To create a C++ File:
      Right Click <src>                              - pops up a menu
      Select      New -> Source File                 - pops up "New Source File" menu
      Enter the following:
                  Source file: main.cpp
      Click       [Finish]

   Then add your code...

   You will have to add Makefiles and other tools for your project to compile and run.

Back to the top