INCA with MATLAB¶
These are the steps to get INCA to work with MATLAB on Kebnekaise.
Note
You need to get your own license for INCA!
- Get a license for INCA from http://mfa.vueinnovations.com/licensing
- Wait for license acceptance. It can take more than a day.
- Then go to download “Your premium content” while logged in: MFA Suite 2.3
- Transfer the zip file to Kebnekaise (filezilla is a good option - use
sftp
). There is a Guide for file transfers here. - Login to Kebnekaise. It is recommended you use ThinLinc.
- Open a terminal:
- In the ThinLinc menu: “Applications” -> “System Tools” -> “MATE Terminal”
- Unzip the downloaded zip file in your project folder (if you did not unzip it first and just transferred the folder).
- You should use this folder:
/proj/nobackup/<your-project>/<your-directory>
- change the<your-project>
to the name your project storage folder has, and then put it in<your-directory>
under it, if it is a shared folder. - The command to unzip is:
unzip incax.y.zip
(change the name of the zip file if it is not as here).
- You should use this folder:
- Use the terminal you just opened, or open a new terminal and configure MATLAB for parallel runs (DO ONCE PER VERSION of MATLAB!)
- Opening a terminal: “Applications” -> “System Tools” -> “MATE Terminal”
- For MATLAB 2023a: type
ml MATLAB/2023a.Update4
and press Enter - Type
configCluster.sh
and press Enter
- Start MATLAB. It should preferrably be done from the INCA folder so the working path of INCA is recognized
- Can either be done from menu:
- In ThinLinc this can be done from “Applications” -> “Programming” -> “MATLAB 2023a” (change to preferred version, same as you ran
configCluster.sh
for) - Set the working directory path to the INCA folder inside MATLAB
- In ThinLinc this can be done from “Applications” -> “Programming” -> “MATLAB 2023a” (change to preferred version, same as you ran
- Or you can do it from a terminal. Two ways to get a terminal and change to directory:
- Start a terminal from the menu and change to INCA directory then load the MATLAB module and start matlab:
- “Applications” -> “System Tools” -> “MATE Terminal”
- Then switch to inca directory by typing
cd /proj/nobackup/<your-project>/<path/to/inca>
and press enter. - Then type
ml MATLAB/2023a.Update4
and enter, then typematlab -singleCompThread
and press “enter” to start MATLAB version 2023a
- OR use the filebrowser (shortcut to your home folder on ThinLinc desktop) to find the folder and open a terminal from there, then load MATLAB and start it:
- Double-left-click on “YOURUSERNAME’s Home” on the ThinLinc desktop
- Click around in the file finder until you have the inca directory open
- Right-click in that window and pick “Open in Terminal”
- and then start MATLAB there by typing
ml MATLAB/2023a.Update4
and enter, then typematlab -singleCompThread
and press “enter” to start MATLAB version 2023a - NOTE that your project directory is found under “File System” -“proj” -> “nobackup” -> “directory-you-picked-for-project” in the file browser.
- Start a terminal from the menu and change to INCA directory then load the MATLAB module and start matlab:
- Can either be done from menu:
- Transfer the network .mat file to a subfolder in this INCA root folder to avoid the “rungui” error.
- Set job parameters for the batch system:
>> c = parcluster; >> % account name is your project id >> c.AdditionalProperties.AccountName = 'account-name'; >> % Ask for some time, here 5 hours >> c.AdditionalProperties.WallTime = '05:00:00'; >> % How many processors per node you want - here 20 >> c.AdditionalProperties.ProcsPerNode=20; >> % save the profile >> c.saveProfile
- You can check your settings with
c.AdditionalProperties
- You can clear a job setting by giving an empty value, like this:
c.AdditionalProperties.WallTime = '';
- Always save the settings after you have changed them, with
c.saveProfile
- Inside MATLAB, set path to where you put INCA with
addpath '/path/to/inca'
and also do this for your data directory.- Example for me: NOTE: if there are problems with the path, one solution is to start MATLAB from the inca directory, as describe further up on the page
- Start a parpool, here in this example for 16 workers
- Wait for it to have resources. Start inca by typing this inside MATLAB:
inca
- INCA should automatically use the parallel pool of workers when available, i.e. the ones we just asked for.
- Job monitoring:
- You can start a terminal and look there to see which jobs you have running (and get job-ids) with and then do You can also monitor the job with