BECAUSE OF LICENSE REQUIREMENTS; ONLY NTNU EMPLOYEE AND STUDENTS CAN RUN MATLAB ON VILJE AND IDUN/EPIC/MAUR CLUSTER
A.1. Matlab Unix Group on Vilje
If you got this message: "To use matlab on vilje you must be a member of the matlab unix group ...", then you have to send a email to firstname.lastname@example.org and ask for to be a member of the Matlab Unix Group.
A.2. Random numbers
On vilje/Kongull you will see that the "rand" command generates same numbers on every started compute node in a job.
To avoid this you have to use seed command "rng" with a unique number on each compute node, and an example of finding a unique number:
Use the internal clock as.
seed=t(6) * 1000; % Seed with the second part of the clock array.
How to compile c-code into Matlab.
module load gcc/4.7.4 and module load matlab/R2014a
module load gcc/4.9.1 and module load matlab/R2016b
mex CC=gcc CFLAGS="\$CFLAGS -fopenmp" LDFLAGS="\$LDFLAGS -fopenmp" mycode.c