Guide to installing and running the simulation component of the Fast MOST experiment.
This document makes a whole bunch of assumptions and you should have more than a familiarity with NTCP before trying this. Going through the whole Mini-MOST experience should be a help. This is targeted at the advanced class :-)
These instructions are geared towards running this on Windows, but should work on Linux, or other OSes. It's all Java. Just make sure to set environmental variables correctly on your OS and use the correct directory seperator.
Be warned, this is a pretty complex install and is very error prone. It would be nice to package it in some better form, but this is what we have.
- Standard prequisite software
- Standard environmental variables
- Set the system environment variable called MATLAB_JAVA to point to the location %JAVA_HOME%\jre. Doing this will make Matlab use the version of Java that you installed on your system. This seems to fix issues relating to timouts in the experimental site simulations.
Installing NTCP Server
- Now we must checkout the NTCP server code from CVS. Set your CVSROOT to :pserver:email@example.com:/disks/cvs/neesgrid. Checkout module NTCP/server with tag ntcp_30_freeze.
ant -Dogsa.root=%OGSA_HOME% undeployCleanAll
ant -Dogsa.root=%OGSA_HOME% deployGar
Installing NTCP mplugin
Note: If you are doing this on your NEESpop, it comes preinstalled with the NTCP mplugin, so you can skip this step.
- Download and unzip NTCP matlab distribution.
ant -Dogsa.root=%OGSA_HOME% deployGar
NTCP needs to be told what plugin to load. This sets that plugin to the Malab plugin. This step must be performed whenever you reinstall the NTCP server, since it will reset the plugin to the default dummy one.
Edit %OGSA_HOME%\server-config.wsdd to set the proper NTCP plugin type. The line that should be changed in the server-config.wsdd file is
<parameter name="ntcpBackendFactory" value="org.nees.ntcp.server.backend.test.DummyControlFactory"/>
Should be changed to
<parameter name="ntcpBackendFactory" value="org.nees.ntcp.plugins.matlab.core.MatlabPluginFactory"/>
Setup the Java environment to use the grid and NTCP classes.
- Standard matlab NTCP configuration.
The %NTCP_HOME% in this document refers to the NTCP matlab distribution, not the NTCP server checked out from CVS.
Install Matlab Simulations
- Download and unzip the Fast MOST Matlab distribution. This directory will be refered to as %FAST_MOST_HOME%.
Install Java Simulation Coordinator
- Set your CVSROOT to :pserver:firstname.lastname@example.org:/CVS/fastmost. Checkout module JavaSimulationCoordinator. This modules directory will be known as %SIM_COORD_HOME%.
Configure NTCP URL's
- Edit %FAST_MOST_HOME%\most_config.m. Find the URL's for each site and change them to correspond to the hostname/port of your NTCP servers. This should look something like this if everything is run on the same computer:
ncsaURL = 'http://127.0.0.1:8090';
ucalURL = 'http://127.0.0.1:8091';
ucolURL = 'http://127.0.0.1:8092';
uiucURL = 'http://127.0.0.1:8093';
ubufURL = 'http://127.0.0.1:8094';
lehiURL = 'http://127.0.0.1:8095';
- Edit %SIM_COORD_HOME%\input\config.xml. Find the URL's for each site and change them to correspond to the hostname/port of your NTCP servers.
Start NTCP Servers
You will need to start 5 NTCP servers. One for each experimental site. You should start each NTCP server in a different command prompt window.
ant startContainer -Dservice.port=8091
ant startContainer -Dservice.port=8092
ant startContainer -Dservice.port=8093
ant startContainer -Dservice.port=8094
ant startContainer -Dservice.port=8095
Yes, we are actually going to do something.
- Start up 5 instances of Matlab. Change the working directory for each of them to %FAST_MOST_HOME%.
- Open a command prompt and run the following commands:
This will start up the simulation coordinator.
- Go to each Matlab window and start up an experimental site simulation. Start only one experimental site in each window. The commands to start the experimental site simulations are below:
The simulation should now be running. Look at the output from the Matlab windows for the status of the simulation.
To see the results of the simulation, look at the following files: