Difference between revisions of "HowTo:matlab"
(Created page with "= Gamess (US) = This is an introduction to the usage of the electronicstructure code "Gamess" on the HPCVL clusters. It is meant as an initial pointer to more detailed infor...") 
(→MATLAB) 

(19 intermediate revisions by the same user not shown)  
Line 1:  Line 1:  
−  =  +  = MATLAB (obsolete) = 
+  
+  This is a short help file on using the highlevel language code "Matlab" on our machines.  
+  
+  <span style="color:#ff00ff">'''<u>Important</u>: Pleased note that this file does not reflect the current licensing / installment of MATLAB at the Centre for Advanced Computing. It is kept for Documentation purposes only. Refer to the [[Software:matlabcurrent help file]] for accurate information.</span>  
+  
+  The software is only made available to persons who belong to a specific Unix group. See details below.  
−  
{ style="borderspacing: 8px;"  { style="borderspacing: 8px;"  
 valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; backgroundcolor:#e1eaf1; borderradius:7px"    valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; backgroundcolor:#e1eaf1; borderradius:7px"   
== Features ==  == Features ==  
−  +  From the Matlab web page: "MATLAB® is a highlevel technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numeric computation. [...] You can use MATLAB in a wide range of applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology. Addon toolboxes (collections of specialpurpose MATLAB functions, available separately) extend the MATLAB environment to solve particular classes of problems in these application areas."  
−  +  Here is a list of features, also from the webpage:  
+  * Highlevel language for technical computing  
+  * Development environment for managing code, files, and data  
+  * Interactive tools for iterative exploration, design, and problem solving  
+  * Mathematical functions for linear algebra, statistics, Fourier analysis, filtering, optimization, and numerical integration  
+  * 2D and 3D graphics functions for visualizing data  
+  * Tools for building custom graphical user interfaces  
+  * Functions for integrating MATLAB based algorithms with external applications and languages, such as C, C++, Fortran, Java, COM, and Microsoft Excel  
+  * The full Matlab program and most Toolboxes are installed on our systems, but '''the license for their usage is supplied by the user.'''  
−  +  == Location and Setup ==  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  The present version of Matlab is R2014a for Linux. The programs in the Matlab package are located in the directory /opt/matlab. Matlab processes should only be run in batch mode through our Gridengine scheduler.  
−  and  +  Note that many of the Matlab Toolboxes are installed on our clusters. Users who have a preexisting Matlab license can submit and run '''serial''' Matlab jobs on our cluster nodes. '''We do not hold a socalled DCS (DistributedCompute Server) license''' and can therefore not run parallel MATLAB jobs. 
−  +  It is [http://cac.queensu.ca/wpcontent/files/cacmatlabstatement.pdf required that you sign a statement] if you want to use MATLAB. We will confirm this statement, and you will then be made a member of a Unix group "matlab", which enables you to access the software. Contact us if you are in doubt of whether you will be able to run Matlab on our system.  
−  +  To set the proper environment variables and include the directories with the binaries in your PATH, you should type:  
−  +  <pre>use matlab</pre>  
−  +  To avoid having to do this before every Matlab session, you may also include this command in your setup file, e.g. .bash_profile.  
+  Finally you may have to point an environment variable LM_LICENSE_FILE to the proper license file:  
−  =  +  <pre>export LM_LICENSE_FILE=lic_file</pre> 
−  +  Here lic_file stands for the full path and file name of your license file. You need to make sure that the latter cannot be accessed by anyone but you. This command may of course also be placed into a setup file to avoid retyping.  
+  
+  Since the Matlab licenses are specific to the user (as the user is who supplies them), it is possible that specific setups are required, and the simple "use" command won't work. In this case, please get in touch and we modify the setup to work with your specific case.  
}  }  
+  
{ style="borderspacing: 8px;"  { style="borderspacing: 8px;"  
 valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; backgroundcolor:#f7f7f7; borderradius:7px"    valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; backgroundcolor:#f7f7f7; borderradius:7px"   
−  == Running  +  == Running from a command line== 
−  +  The core of Matlab is a highlevel programming language and an interactive programming/computing environment. Since you have to be a licensed user of Matlab to run Matlab programs on our machines, it is possible for you to either allow us access to an external license server, or to move your license file to our systems. In either case, you are responsible for maintaining the license.  
−  +  
−  +  
−  +  Here, we discuss how to run an interactive Matlab session on one of our servers such as the workup/login node swlogin1. We assume that you are included in the "matlab" Unix group, and therefore have proper access to /opt/matlab where the software resides.  
−  +  Once Matlab usage is set up properly, you only need to type  
+  <pre>matlab</pre>  
+  to start the GUI of the Matlab programming environment. Issuing the command with the ''nodisplay'' will give you a commandline version that does not use the GUI.  
−  +  == Batch jobs ==  
−  +  In many cases, you will run Matlab in '''batch mode'''. Interactive work should be done elsewhere, whereas the computationally more intensive runs could be executed on our clusters.  
−  +  Production jobs on our clusters '''must be''' submitted via the scheduler Grid Engine. To obtain details, [[HowTo:Schedulerread our Help File]]. For a Matlab batch job, this means that you have to prepare a job script and you have to call Matlab without the Graphical User Interface. If you encounter issues with preparing such a script, please contact us for assistance.  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
−  +  
}  }  
{ style="borderspacing: 8px;"  { style="borderspacing: 8px;"  
 valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; backgroundcolor:#e1eaf1; borderradius:7px"    valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; backgroundcolor:#e1eaf1; borderradius:7px"   
−  
−  
−  
−  
−  
−  
== Where can I get more detailed information ? ==  == Where can I get more detailed information ? ==  
−  +  Matlab is a complex software package, and requires some practice to be used efficiently. In this FAQ we can not explain its use in any detail.  
−  *  +  * MATLAB features a complete set of onlinedocumentation that may be accessed from inside the GUI by selecting the Help tab. 
−  +  * There are also a Getting Started Tutorial and various Demos.  
+  * Online documentation is also available at [http://www.mathworks.com/help/matlab/ http://www.mathworks.com/help/matlab/].  
+  * If you have problems with the GridEngine, [[HowTo:Schedulerread our help file on that subject]]  
* '''[mailto:cac.help@queensu.ca Send email to cac.help@queensu.ca]'''. We're happy to help.  * '''[mailto:cac.help@queensu.ca Send email to cac.help@queensu.ca]'''. We're happy to help.  
}  } 
Latest revision as of 19:51, 30 May 2017
Contents
MATLAB (obsolete)
This is a short help file on using the highlevel language code "Matlab" on our machines.
Important: Pleased note that this file does not reflect the current licensing / installment of MATLAB at the Centre for Advanced Computing. It is kept for Documentation purposes only. Refer to the current help file for accurate information.
The software is only made available to persons who belong to a specific Unix group. See details below.
FeaturesFrom the Matlab web page: "MATLAB® is a highlevel technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numeric computation. [...] You can use MATLAB in a wide range of applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology. Addon toolboxes (collections of specialpurpose MATLAB functions, available separately) extend the MATLAB environment to solve particular classes of problems in these application areas." Here is a list of features, also from the webpage:
Location and SetupThe present version of Matlab is R2014a for Linux. The programs in the Matlab package are located in the directory /opt/matlab. Matlab processes should only be run in batch mode through our Gridengine scheduler. Note that many of the Matlab Toolboxes are installed on our clusters. Users who have a preexisting Matlab license can submit and run serial Matlab jobs on our cluster nodes. We do not hold a socalled DCS (DistributedCompute Server) license and can therefore not run parallel MATLAB jobs. It is required that you sign a statement if you want to use MATLAB. We will confirm this statement, and you will then be made a member of a Unix group "matlab", which enables you to access the software. Contact us if you are in doubt of whether you will be able to run Matlab on our system. To set the proper environment variables and include the directories with the binaries in your PATH, you should type: use matlab To avoid having to do this before every Matlab session, you may also include this command in your setup file, e.g. .bash_profile. Finally you may have to point an environment variable LM_LICENSE_FILE to the proper license file: export LM_LICENSE_FILE=lic_file Here lic_file stands for the full path and file name of your license file. You need to make sure that the latter cannot be accessed by anyone but you. This command may of course also be placed into a setup file to avoid retyping. Since the Matlab licenses are specific to the user (as the user is who supplies them), it is possible that specific setups are required, and the simple "use" command won't work. In this case, please get in touch and we modify the setup to work with your specific case. 
Running from a command lineThe core of Matlab is a highlevel programming language and an interactive programming/computing environment. Since you have to be a licensed user of Matlab to run Matlab programs on our machines, it is possible for you to either allow us access to an external license server, or to move your license file to our systems. In either case, you are responsible for maintaining the license. Here, we discuss how to run an interactive Matlab session on one of our servers such as the workup/login node swlogin1. We assume that you are included in the "matlab" Unix group, and therefore have proper access to /opt/matlab where the software resides. Once Matlab usage is set up properly, you only need to type matlab to start the GUI of the Matlab programming environment. Issuing the command with the nodisplay will give you a commandline version that does not use the GUI. Batch jobsIn many cases, you will run Matlab in batch mode. Interactive work should be done elsewhere, whereas the computationally more intensive runs could be executed on our clusters. Production jobs on our clusters must be submitted via the scheduler Grid Engine. To obtain details, read our Help File. For a Matlab batch job, this means that you have to prepare a job script and you have to call Matlab without the Graphical User Interface. If you encounter issues with preparing such a script, please contact us for assistance. 
Where can I get more detailed information ?Matlab is a complex software package, and requires some practice to be used efficiently. In this FAQ we can not explain its use in any detail.
