In this tutorial you will learn how to take advantage of ENVI Servers to run processes in the background. This frees you from having to wait for ENVI to finish whatever you ask it to do. You will also learn how to scale your processing power by setting up and using other ENVI Servers in a distributed environment. Jobs that would take hours or days on one machine can run in parallel on several computers, each running multiple jobs at the same time.

See the following sections:

System Requirements


You can designate one or more computers as ENVI Servers to run jobs. Each ENVI Server must have the following installed:

  • ENVI 5.6.1 or higher installed (note that versions 5.6.1 and higher include a Geospatial Services Framework (GSF) installer, which must also be installed)

  • Windows or Linux operating system.
  • A valid license for ENVI and any additional modules that you might run on this server.

The next section describes how to get started with installing ENVI and GSF.

Set Up an ENVI Server


You can designate a local computer as an ENVI Server to run ENVI jobs in the background and in parallel. With parallel processing, you can run multiple jobs on one computer at the same time. Running jobs in the background means that you do not have to watch a progress bar while ENVI completes a process. You can continue working on your next task or visualizing images. You can even close ENVI, and ENVI Server will continue working on the jobs you submitted until they are done.

The following steps describe how to configure an ENVI Server on a local computer for personal use.

  1. Install ENVI using the default options.
  2. Use the License Administrator to license ENVI.
  3. Install GSF using the default options. GSF is a job scheduler application that will convert ENVI into ENVI Server.

When installation is complete, a web browser displays the Geospatial Services Framework page. This page contains examples, help, and links to the GSF job console and client SDKs. The URL for this page is http://localhost:9191, which is the server name that will be used for your local machine.

Run Tasks in the Background


The following steps demonstrate how to run a simple task in the background on your local ENVI Server. This allows you to complete other activities in ENVI while the job is running.

  1. Start ENVI.
  2. In the ENVI Toolbox, expand the Band Algebra folder and double-click Spectral Indices. The Data Selection dialog appears.
  3. Click the Open File button in the Data Selection dialog.
  4. Navigate to the ENVIxx\data folder of your ENVI installation path and select qb_boulder_msi. Click Open.
  5. Click OK in the Data Selection dialog. The Spectral Indices dialog appears.
  6. In the Index list, select Green Difference Vegetation Index.
  7. Select the File radio button, and leave the Output Raster field blank.
  8. Click the drop-down arrow and select Run Task in the Background.
  9. The Spectral Indices task runs in the background while the ENVI Server Job Console displays. The job console reports the processing status of the job you submitted. You can continue to do other things in ENVI while the job is running.

  10. When the job is complete, click the Display Results link in the job console to display the Green Difference Vegetation Index (GDVI) image in ENVI; for example:
  11. ENVI writes the GDVI image to a numbered folder in your GSF workspace. Click the folder icon to open that folder in Windows Explorer or Linux terminal window; for example:
  12. Next, you will run more Spectral Indices jobs in the background.

  13. Click the icon in the job console to rerun the Spectral Indices task.
  14. Select any Index.
  15. Click the drop-down arrow and select Run Task in the Background.
  16. While that job is running, click the icon in the job console again, select another Index, and select Run Task in the Background. Repeat these steps as many times as you want.
  17. The job console lists each job that you ran. You can click Display results to view each spectral index image that was created. The results of each job are written to a new numbered subfolder in your local GSF workspace.

Run Models in the Background


In this section you will run an ENVI Modeler model in the background on your local computer.

  1. From the ENVI main menu bar, select Display > ENVI Modeler. The ENVI Modeler appears.
  2. From the ENVI Modeler menu bar, select File > Open Example > Simple Model. The example model for Simple Model appears.
  3. This model performs ISODATA unsupervised classification and smooths the classification image. Notice the green-colored View and Data Manager nodes. When the model runs, it displays the resulting image in the current view and adds the result to the Data Manager. When you run models in the background, you should add an Output Parameters node to the models so that the results can be displayed in the job console. You will do this in the next step.

  4. Select the View node and press the Delete key on your keyboard to remove it from the model.
  5. In the Basic Nodes list, double-click Output Parameters to add an Output Parameters node to the model.
  6. Drag the Output Parameters node to the end of the model, then draw a connector between it and the Classification Smoothing node; for example:
  7. Click the drop-down arrow next to the Run button at the top of the ENVI Modeler, and select Run Model in the Background.
  8. When the model runs, you are prompted to select an Input Raster. Click the Browse button and select qb_boulder_msi from the ENVIxx\data folder of your installation path.
  9. Click OK in the Data Selection dialog, then OK in the Input Raster dialog.
  10. While the model runs in the background, the job console shows its status; for example:
  11. When processing is complete, click the Display Results link in the job console to view the smoothed classification image.

Next, you will learn how to batch-process multiple datasets in the ENVI Modeler.

Perform Batch Processing in the ENVI Modeler


In this section you will learn how to process multiple datasets in parallel on a local ENVI Server. Follow these steps:

  1. Select the Input Parameters node and the Data Manager node, then press the Del key on your keyboard to remove them from the model.
  2. In the Basic Nodes list, double-click Dataset. The Select Type dialog appears.
  3. Click Raster. A data selection dialog appears.
  4. Click the Open File button in the Data Selection dialog.
  5. Go to the ENVIxx\data folder of your installation path and select Avon.dat, then click Open.
  6. In the Data Selection dialog, use Ctrl-click to select the following files and click OK:
    • Avon.dat
    • qb_boulder_msi

    A blue-colored [Raster] Dataset node is added to the model.

  7. Select both files in the Data Selection dialog and click OK.
  8. Drag the Dataset node to the front of the model as follows:
  9. In the Basic Nodes list, double-click Iterator to add an Iterator node to the model.
  10. Place the Iterator node between the Dataset node and ISODATA Classification node.
  11. Draw a connector between the Dataset node and the Iterator node.
  12. Draw a connector between the end of the Iterator node and the front of the ISODATA Classification node. The Connect Parameters dialog appears.
  13. Click the Output button on the left side of the Connect Parameters dialog. A red line connects Output to Input Raster:
  14. Click OK in the Connect Parameters dialog. The model should look like this:
  15. The Iterator node allows you to batch-process both rasters (Avon.dat and qb_boulder_msi) specified in the Dataset node. If you were to run this model now, the rasters would be processed one at a time in the current ENVI session. The next steps describe how to run the model as multiple, parallel jobs on your local ENVI Server.

  16. Click the button in the Iterator node. The Set ENVI Servers dialog appears.
  17. Click the Add Servers button in the Set ENVI Servers dialog.
  18. In the Add Servers dialog, select This Computer and click OK. The Set ENVI Servers dialog shows a URL of http://localhost:9191, which means that the jobs will run on your local ENVI Server.
  19. Click OK. The model is now ready to run.
  20. Click the Run button at the top of the ENVI Modeler. As the model runs, the ENVI Job Console shows two separate jobs, one for each input raster:
  21. When the jobs are complete, click the Display Results link next to each job. The smoothed classification image results from Avon.dat and qb_boulder_msi are displayed in ENVI:
  22. When you are finished, save the modified model to a new file on your local computer. Then close the ENVI Modeler and job console.

This was a simple example of running multiple jobs in the ENVI Modeler, each with a different input raster. By adding an Iterator node to the model and specifying the ENVI Server where the jobs will run, you split the work into parallel processes that both ran on the same ENVI Server.

You can also run tasks and models on multiple ENVI Servers. The next section describes how to configure ENVI Servers for distributed processing.

Optional: Distributed Batch Processing Using Multiple ENVI Servers


If you have more than one ENVI license, you can configure one or more ENVI Servers to be used as network resources for distributed processing. For example, you may have one local ENVI Server and three additional ENVI Servers on a network. This allows you to scale jobs even further by sending them to multiple computers working in parallel. Thus, all of the jobs can finish in a fraction of the time it would take for a single computer, especially if the other computers have powerful hardware and resources.

  • A network of ENVI Servers that work together must have the same operating system, since they must access data with the same network paths.
  • The following are general steps on how to install and configure the necessary software for multiple ENVI Servers:

    1. For each computer on your network, install ENVI and GSF. In the Configuration: External Address panel of the GSF installation process, note the external URL of the computer. You will need this later.
    2. Ensure that input data is in a shared location that the client and server computers can access.
    3. Set the location of output files (also called the workspace in GSF) to a shared network location that all computers can access. To do this, open the file config.json in a text editor and add a "root" value as shown below:

      "workspaceManager": {
        "type":"gsf-basic-workspace-manager",
        "root":"shared network directory"

      Note: if you're running GSF as a Service, make sure the user that is the owner of the service has proper writing permissions to this shared network location.

    4. Stop and restart the GSF service so that the changes take effect.
    5. Now you are ready to run ENVI tasks and models on the ENVI Servers.

    6. From the ENVI main menu bar, select Server > Manage Servers. The Manage ENVI Server dialog appears with "This Computer" as the only entry. "This Computer" is the local ENVI Server that you set up earlier. ENVI uses "localhost" as the URL for this ENVI Server.
    7. Click the Add button. The Add ENVI Server dialog appears.
    8. In the Server URL field, enter the URL of a server computer where ENVI and GSF are installed. See Step 1 above. The URL can be just the server name. A port number is not required as long as it is the default port (9191). For non-default ports, include the port number; for example:
    9. gsfserver:port_number
    10. For the Workspace Folder, you have two options:
      • Leave the field blank.
      • Enter a shared network directory that both the local ENVI Server and remote ENVI Server can access.
    11. Click OK in the Add ENVI Server dialog.
    12. Select the new ENVI Server in the Manage ENVI Servers dialog. Click the Info button to display more information about that computer, including the software versions that are installed on it.
    13. Click OK to dismiss the Manage ENVI Servers dialog.

    Now you can run tasks and models on the remote ENVI Server by clicking the drop-down arrow in the task dialog or ENVI Modeler and selecting Run Task/Model on remote computer name. Make sure the data you are processing is in a network location that can be accessed with the same path in both your local ENVI Server and remote ENVI Servers.

    This concludes the tutorial. When you are finished, close ENVI.