How to work: Note this software was generated using PCCTS and when executed usess Illinois Fast Messages any use/transfer of the ParC software or documents found in this cite is subject to the licensee aggrements of these systems found in www. and www. *- Copy all files from distribution CD or download/unzip pcomp.zip to your working directory. *- select all files in all directries and change them from read-only to read-write Configure Once!!! 0) Run FM (Illinois Fast Messages) refer to FM manual to do this a) Go to System properties from "control panel" and in the tab "Environment / System variables" set FMGRMNAME=ip_of_this_computer (you must have some ip address on your computer, if not install Microsoft loopback adaptor driver) To install Microsoft loopback adaptor driver: - Go to control panel - Go to network settings - In network settings go to adapters tab - Push Add button - Choose MS Loopback adapter from the list - Add some ip address (any valid ip like 128.0.0.1) b) Reboot the computer c) Return to a) for each computer participating in the cluster d) Edit file \fm\bin\fmconfig to contain the following string: 0 your_ip (128.0.0.1) e) Run FM Global resource manager from \fm\bin\fmgrm.exe on a single "master" computer f) Run FM Context manager from \fm\bin\fmcm.exe on a each computer participating in the cluster To compile a parc program: 1) Write a program in parc void ParMain() { int x; x = 0; parfor int i;0;100;1; { if (i % 2 == 0) x++; else x--; } printf("x = %d\n",x); } 2) Save the program at \1work\pcom\tests\y1.c 3) Run Microsoft Visual C++ (if not done so already) 4) Load the project \1work\pcom\pcom.dsw (File / Open Workspace) 5) Go to menu Project / Settings 6) Go to "Debug" tab 7) In edit box "Program Arguments" write tests\y1.c (the name of the program) 8) Press "OK" 9) Go to menu Build / "Build Pcom.exe" 10) Go to menu Build / Execute Pcom.exe 11) You can look at a compiled file in 1work\parc\tests\y1_par.cpp and 1work\parc\tests\Global_Struct.h 12) Pay attention: a) To all the external parameters to selector function For example x is passed as a pointer: int __Global_Class::__Selector1(ActivationRecord * __spRec, int *x) b) The translation of references to shared (external) variables. Global variables should remain without change Local variables of the activity should remain without change All the rest should be referenced through pointers For example x is incremented through a pointer: if (i % 2 == 0) (*x)++; else (*x)--; 13) Load the project \1work\simulator\simulator.dsw (File / Open Workspace) 14) Remove any old compiled file with a "xxxxxx_par.cpp" extension a) Point to the file with a mouse and click b) Press delete button 15) Add your compiled (from ParC) file to the Simulator progect a) Point mouse to Simulator files b) Press right mouse button c) Choose submenu: "Add files to Project" d) Browse to 1work\pcom\tests\y1_par.cpp and click on y1_par.cpp 16) Compile simulator with your file together a) Build / Build Simulator.exe b) Ignore the warning in the linkage step 17) If you want to run the program on more than a single computer you have to distribute the compiled program executable to all the computers participating in the cluster. You can do it using Microsoft explorer and sharing the directory containing the executables. - To create sharing to any directory in Windows NT open explorer - Point to directory you want to share with right mouse button - Go to submenu Sharing - Choose "Radio button" Share As: and press OK To get the disk on remote NT computer go to Start / Find / Computer. Look for the computer name containing the executables and make sharing to the needed directory 17) On each computer run a program simulator.exe that you got after the last compilation in Visual C++ from within a Visual C++. Use the sharing if you are running on more than one compter. When running the program on each computer give the first parameter in command line to be the total number of computers that will participate in the cluster. You can do it from within a Visual C++ using (again) Project/Settings / Debug tab. Write the number in the edit box Program Arguments 18) If you run simulator.exe without parameters it will give you the arguments and parameters you can specify in the command line. 19) If you want to change any parameter (for example the stack size, enter this parameter and the number in the command line the same way you did for the number of computers. 20) Time measures: You can get the time measure and any warning or error message you get during the program execution. Time is in seconds. Time is measured from start of ParMain up to the end of ParMain All these messages are going to disk files: ErrOut.txt where n is computer number. If you are interested only in time measures you can get them in ErrOut0.txt You can add your custom Timers in the program if you insert them inside the compiled C++ program for example: Acuumulating the time by the for loop is measured in this way TimeTmpVars TimedActivity; TimingCounter ForLoop; int j; START_CLOCK(TimedActivity); for (j = 0; j < x; j++); FINISH_CLOCK(TimedActivity); ForLoop.AddObservation(TimedActivity);