This document is intended for Techila End-Users using MATLAB as their primary development environment. This document contains minimal information allowing you to run your first MATLAB computations.
For more information about the Techila MATLAB API and walkthroughs of example material, please see the full guide.
Note! In order to complete the configuration, you will need the following:
C-compiler compatible with your MATLAB Compiler
Please also note that in order to perform the steps described here, you will also need access to Techila SDK.
If you have not downloaded the Techila SDK, please download the plugin package (TechilaSDK.zip) before continuing. The TechilaSDK.zip can be downloaded from the Techila Configuration Wizard, after you have launched the Techila Distributed Computing environment.
Extract the previously downloaded TechilaSDK.zip to your computer, e.g. to your home directory.
When extracted, the TechilaSDK.zip file will create a directory called
techilawith the folder structure illustrated in the example screenshot below. In this example, the TechilaSDK.zip file was extracted to
Verify that you have the MATLAB Compiler by executing ver in MATLAB and checking the output.
In MATLAB, change your current working directory to
techila/lib/Matlabin the Techila SDK.
Execute command the following command in MATLAB:
This command updates the MATLAB’s search path to include the Techila SDK’s
Test the network connection to the Techila Server by executing the following command in MATLAB.
If the network connection test was successful, the function should return the value 0 as illustrated in the example screenshot below.
Execute the following command in MATLAB and follow the on-screen instructions configure your MATLAB compiler:
The screenshot below illustrates what the output looks like when
Microsoft Windows SDK 7.1has been configured as the C compiler.
cloudfor helper function included in the Techila SDK can be used to execute computationally intensive
for-loop iterations simultaneously in a TDCE environment.
cloudfor examples can be found in the following chapter of the complete guide.
Note! For the
cloudfor function to work, the code must be stored in an m-file. You cannot copy-paste
cloudfor loops to the MATLAB Command Window.
To run the code snippet below, place it in an m-file named
main.m and run the
main() function in MATLAB.
Note! If this is the first MATLAB Project you are running in your TDCE environment, the Project may take up to 1 hour due to initial configuration steps. After the initial Project has been completed, subsequent Projects will be quicker.
function result = main()
loops = 10;
result=zeros(1,10); % Create an empty vector for the result values
cloudfor counter=1:10 % Beginning of the cloudfor-block
cloudend % End of the cloudfor-block
Congratulations! You should have been able to run your first computations in TDCE. Next, you can start modifying your own code to run in TDCE.
The complete MATLAB guide contains additional examples and information about the Techila MATLAB API. This document can be used to reference how to implement various features available in TDCE when modifying your code.