Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

PTP/photran/documentation/photran8installation

You are here: PTP > Photran > Documentation > Photran 8.2 Installation Guide

Photran 8.2 Installation Guide

System Requirements

To install Photran 8.2...

  1. You must have a Java 1.7 or later Java Virtual Machine (JVM). To get reasonable performance, we recommend Sun's JVM [1] or IBM's J9 [2]. OpenJDK (the default JVM on newer versions Fedora Linux) also works well, although GNU Classpath (the default JVM on older versions of Fedora) is generally too slow to be useful.
  2. If you want to compile and build Fortran applications, you must have a make program (such as GNU Make) and a Fortran compiler (such as gfortran, the GNU Fortran compiler) in your system path. To debug Fortran applications, you must have GNU GDB installed. Many Linux/Unix systems include these; details on installing them in Windows and Mac are below.

Overview

There are two ways to get Photran.

  • (Option 1) The easiest way is to install the Eclipse for Parallel Application Developers. This includes Photran, as well as the C/C++ Development Tools, the Eclipse Parallel Tools Platform, and several other plug-ins.
  • (Option 2) Alternatively, you can install Eclipse 4.4 (Luna) and manually add Photran to your installation. This is how Photran was installed in prior releases.

Option 1: Installing the Eclipse for Parallel Application Developers

The easiest way to get Photran is to go to the Eclipse downloads page and install Eclipse for Parallel Application Developers. Details of package contents are shown on Eclipse for Parallel Application Developers package. This includes Photran, as well as the C/C++ Development Tools, the Eclipse Parallel Tools Platform, and several other plug-ins.

Option 2: Installing Photran into an Existing Eclipse Installation

Requirements

To install Photran 8.2 into an existing Eclipse installation, you must be running Eclipse 4.4 (Luna). Photran 8.2 will not install correctly into earlier versions of Eclipse.

  1. You should have the C/C++ Development Tools (CDT) 8.4 installed. If you do not...
    1. If you downloaded Eclipse from eclipse.org and you will be following the instructions below for "Installing on a Machine With Internet Access," then CDT should be installed automatically when you install Photran.
    2. Otherwise, CDT probably will not be installed automatically (this is also true if you installed Eclipse from a Linux distribution like Ubuntu). You will need to install CDT manually. Follow the instructions below for "Installing on a Machine Without Internet Access."

Installing on a Machine With Internet Access

To install Photran, start Eclipse, then...

  1. Click on Help > Install New Software...
  2. Click on the "Available Software Sites" hyperlink
  3. Look for http://download.eclipse.org/tools/ptp/updates/luna in the list.
    1. If it is in the list, check the box next to it (if it is not already checked).
    2. If it is not in the list...
      1. Click on the "Add..." button
      2. In the Location field, type http://download.eclipse.org/tools/ptp/updates/luna
      3. Click OK to close the Add Site dialog. This will return you to the Install dialog.
  4. Click OK to close the Preferences dialog (i.e., the list of available software sites). This will return you to the Install dialog.
  5. In the "Work with:" dropdown, choose http://download.eclipse.org/tools/ptp/updates/luna
  6. Expand "Fortran Development Tools (Photran)" and check the box next to "Photran End-User Runtime"
  7. If you are running Linux and have the Intel Fortran Compiler installed, or if you are on a Macintosh and have the IBM XL Fortran compiler installed, expand "Fortran Compiler Support" and select the appropriate compiler.
  8. Click on the "Next" button
  9. If you get an error message, see below for troubleshooting information.
  10. Click the Finish button and agree to the license to complete the installation.


Installing on a Machine Without Internet Access

You will the following files:

  1. If you do not have CDT installed, you will need to download the latest 8.4.x "CDT master update archive" from http://www.eclipse.org/cdt/downloads.php. This should be a file named cdt-master-8.4.x.zip (for some value of x)
  2. To install Photran, you will need the latest PTP update site archive from http://wiki.eclipse.org/PTP/builds#Release_builds[3]. This will be a file named ptp-master-8.0.x-I2014xxxxxxxx.zip

If you do not have CDT installed, start Eclipse, then...

  1. Click on Help > Install New Software...
  2. Click on the "Add..." button
  3. Click on the "Archive..." button
  4. Point it to the file cdt-master-8.4.x.zip
  5. Click OK to close the Add Site dialog. This will return you to the Install dialog.
  6. Expand "CDT Main Features" and check the box next to "Eclipse C/C++ Development Tools"
  7. Click on the "Next" button
  8. Click the Finish button and agree to the license to complete the installation.
  9. After CDT is installed, you will be asked to restart Eclipse. You may then proceed to install Photran.

To install Photran, start Eclipse, then...

  1. Click on Help > Install New Software...
  2. Click on the "Add..." button
  3. Click on the "Archive..." button
  4. Point it to the file ptp-master-8.0.x-I2014xxxxxxxx.zip
  5. Click OK to close the Add Site dialog. This will return you to the Install dialog.
  6. Expand "Fortran Development Tools (Photran)" and check the boxes next to "Photran End-User Runtime" and "Rephraser Engine End-User Runtime" (the latter is a supporting component)
  7. If you are running Linux and have the Intel Fortran Compiler installed, or if you are on a Macintosh and have the IBM XL Fortran compiler installed, expand "Fortran Compiler Support" and select the appropriate compiler.
  8. Click on the "Next" button
  9. If you get an error message, see below for troubleshooting information.
  10. Click the Finish button and agree to the license to complete the installation.


Troubleshooting

Eclipse's installer gives notoriously cryptic error messages, which, unfortunately, are out of Photran's control. Some of the more common ones are below. If you run into a different error message and cannot resolve it, please ask for help on the Photran mailing list.


Problem: You receive the following error message during installation.
Cannot complete the install because one or more required items could not be found.
Software being installed: Photran End-User Runtime 8.2.x.xxxxxxxxxxxx (org.eclipse.photran.feature.group 8.2.x.xxxxxxxxxxxx)
Missing requirement: Photran VPG CDT Interface Plug-in 8.2.x.xxxxxxxxxxxx (org.eclipse.photran.cdtinterface.vpg 8.4.x.xxxxxxxxxxxx) requires 'bundle org.eclipse.cdt.core 0.0.0' but it could not be found
Cannot satisfy dependency:
From: Photran End-User Runtime 8.0.x.xxxxxxxxxxxx (org.eclipse.photran.feature.group 8.0.x.xxxxxxxxxxxx)
To: org.eclipse.photran.cdtinterface.vpg [8.0.x.xxxxxxxxxxxx]
Solution: You do not have CDT 8.4 installed, and it couldn't be downloaded and installed automatically. Try installing CDT 8.4 first, then retry installing Photran.

Additional Instructions for Windows Users

To compile and run Fortran programs in Photran, you will need to have a Fortran compiler and make utility installed. gfortran and GNU Make are commonly used (and free). Most Linux/Unix distributions include these. Under Windows, you will need to install Cygwin [4] (which optionally includes gfortran and GNU Make) or MinGW [5] and put them on your Windows PATH.

Instructions for Cygwin

  1. Install Cygwin; the defaults are mostly OK, but you will need to explicitly tell it to include the "Devel" packages (at least gcc4-fortran, gdb, and make) when the installer asks you to select what packages to install. (If gcc4-fortran is not listed under the "Devel" packages, you may have chosen a bad mirror; restart the Cygwin installation, and choose a different mirror instead. Georgia Tech's mirror at gtlib.gatech.edu is generally quite fast and reliable, for example.)
  2. Add the Cygwin directories to your Windows PATH. Under Windows XP, the process is as follows:
    1. Make sure you are logged in under an administrator account.
    2. Open the Control Panel.
    3. Double-click the System icon.
    4. Switch to the Advanced tab.
    5. Click the Environment Variables button.
    6. Under System Variables, find the variable "Path" in the list, and click on it.
    7. Click Edit.
    8. At the end of the "Variable Value" text, add
      ;C:\Cygwin\bin;C:\Cygwin\usr\bin;C:\Cygwin\usr\local\bin;C:\Cygwin\lib;C:\Cygwin\usr\lib
    9. Click OK, click OK, click OK, and close the Control Panel.
    10. Close and re-open Photran. Windows should now search C:\Cygwin\bin, C:\Cygwin\usr\bin, etc. when it's looking for executables (including make.exe, gcc.exe, and gfortran.exe).

Additional Instructions for Mac OS X Users

If you install gfortran on Mac OS X, it may be installed in /usr/local/bin, or possibly /usr/local/gfortran/bin, neither of which is on the PATH (by default). If you are launching Eclipse from a Terminal, the PATH can be set by modifying /etc/paths. However, if you are launching Eclipse from the Finder (by double clicking on it) or the Dock, then the PATH is not obtained from the shell or /etc/paths.

On Mac OS X Lion (10.7), Snow Leopard (10.6), and Earlier

On OS X 10.7 and earlier, the PATH is obtained from ~/.MacOSX/environment.plist. The format of the environment.plist file is as follows (change the path appropriately). If you create or edit this file, you will need to log out (or reboot) before the changes will take effect.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>PATH</key>
    <string>/usr/local/mpi/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/sbin:/usr/sbin:/Developer/Tools:/usr/texbin:/Users/greg/bin</string>
</dict>
</plist>

On Mac OS X Mountain Lion (10.8) and later

On OS X 10.8, you will need to modify the Info.plist file for the Eclipse executable, and then re-register the Eclipse application with the Launch Service database.

1. In the Finder, locate the Eclipse application. Right-click on it, and click Show Package Contents.

2. Open the Contents folder.

3. Right-click on Info.plist, select Open With, and select Other. Choose TextEdit, and click OK. The Info.plist file will open in TextEdit.

4. Add an LSEnvironment dictionary below the <dict> line and above the <key>CFBundleExecutable</key> line. An example is shown below. Be sure to change the path appropriately for your system; this example adds /usr/local/gfortran/bin and /usr/local/bin to an otherwise-typical path. When you finish editing the file, save it, and quit TextEdit.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

<dict>
        <key>LSEnvironment</key>
                <dict>
                        <key>PATH</key>
                        <string>/usr/local/gfortran/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
                </dict>
        <key>CFBundleExecutable</key>
                <string>eclipse</string>
...

5. Now, open the Terminal utility, and type the following command. Replace "/path/to/eclipse/Eclipse.app" with the correct path to the Eclipse application on your system.

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister \
    -v -f \
    /path/to/eclipse/Eclipse.app

References:
http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html
http://stackoverflow.com/questions/829749/launch-mac-eclipse-with-environment-variables-set

Back to the top