- World's Largest Collection of Frequently Asked Questions
Tuesday, September 2, 2014 Home| Ask Questions| About Us| Feedback| Contact Us|
 Common FAQs  
 Our Services  

Question :
How do I setup and run a parallel Matlab batch job on the HPCVL clusters?
Category Matlab Interview Questions
Rating (0.3) By 15 users
Added on 4/28/2009
Views 324
Rate it!

In most cases, you will run Matlab in parallel "Batch" mode on our clusters. Since you have to have access to Matlab outside of the HPCVL license, most interactive work could be done elsewhere, whereas the computationally intensive runs can be executed on HPCVL clusters.

Production jobs on HPCVL clusters are submitted via the GridEngine, which is a load-balancing software. To obtain details, read our Gridengine FAQ . For a Matlab batch job, this means that you have to prepare your Matlab setup to interface with GridEngine.

To setup running parallel jobs, you need to create a "Parallel Configuration" in Matlab. This needs to be done only once. First, you call a Configuration Manager by selecting the Parallel tab and the Manage Configurations sub-tab in the Matlab GUI. In the Configuration Manager Window, select File -> New -> generic to add a new configuration. Youu will be given a Generic Scheduler Configuration Properties window, and need to fill in the following items:

* Choose a Configuration name (for instance SGE), and enter it in the corresponding text box.
* Into the (ClusterMatlabRoot) box, enter /opt/matlab/R2008b/64bit.
* Into the (ClusterSize) box, enter 16.
* Into the (ParallelSubmitFunction) box, enter {@sgeParallelSubmitFcn,'','/scatch'}.
* Into the (SubmitFunction) box, enter {@sgeSubmitFcn,'','/scatch'}.
* In the (ClusterOsType) tab, select unix.
* In the (HasSharedFileSystem) tab, select True if you are setting up Matlab on an HPCVL node, and False if you are setting up on a remote system.

After making these entries, you select from the main Matlab window Parallel -> Select Configuration -> SGE (assuming you called the new configuration SGE. You should also go back ionto the Configuration Manager by selecting Parallel -> Manage Configurations and select SGE as a default. The Configuration Manager also lets you validate your new configuration by highlighting it and press the Start Validation button.

Once your parallel configuration is properly set up to enable job submission to the HPCVL production clusters, you can create a so-called Matlab Pool by typeing the following command in the main Matlab window or command line:

matlabpool open SGE 8

where we are assuming that you called the configuration SGE and want to run you Matlab program with 8 processors. Note that you should not select more than 16 processes because that was the ClusterSize limit defined in the configuration SGE.

At this point Matlab will submit a reservation of 8 processors to the Grid Engine, and SGE will schedule it when the requested resources (i.e. enough processors and licenses) are available. Of course, you have not yet defined what you want to run with these 8 processors. Let us assume you have a parallel Matlab program, for instance the following simple mywave.m:

parfor i=1:1024
A(i) = sin(i*2*pi/1024);

which computes 1024 points in a sinewave and stores the result in a vector called "A". You can submit this program by typing


and it will use the Matlab pool of processes that you just started for execution. Once the program returns from its run (i.e. the prompt re-appears) you don't need the pool anymore and can close it with

matlabpool close

All of these command can be included in a single file, for instance the mywave.m file, and the quence reduces to simply typing

If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

    Related Questions
    View Answer
    How do I run "Matlab" interactively?
    View Answer
    Where is "Matlab " located and how do I access it?
    View Answer
    How does MATLAB perform on machine X?
    View Answer
    What's new in MATLAB 4.0?
    View Answer
    Are there any publications related to MATLAB?
    View Answer
    How can I join a MATLAB user group?
    View Answer
    Are there any standards for MATLAB-type tools?
    View Answer
    What non-commercial MATLAB-type environments exist?
    View Answer
    What commercially available MATLAB-type environments are sold?
    View Answer
    What is MATLAB?
    View Answer

    Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

    Notify me when better answer is posted!

    View ALL Matlab Interview Questions


    Google Search

    Business FAQs, Internet FAQs, Accounts FAQs, Computer FAQs, Insurance FAQs, Frequently Asked Questions & Related Pages

    Arts and Entertainment Frequently Asked Questions | Business Frequently Asked Questions | Computers Frequently Asked Questions | Programming Languages Frequently Asked Questions | Education Frequently Asked Questions | Electronic gadgets Frequently Asked Questions | Health Frequently Asked Questions | People and Relationships Frequently Asked Questions | Food and Cooking Frequently Asked Questions | History Politics and Society Frequently Asked Questions | Home, Farm and Garden Frequently Asked Questions | Insurance Frequently Asked Questions | Jobs & Careers Frequently Asked Questions | Law and Legal Issues Frequently Asked Questions | Money and Credit Frequently Asked Questions | Science and Technology Frequently Asked Questions | Religion and Spirituality Frequently Asked Questions | Shopping Frequently Asked Questions | Sports Frequently Asked Questions | Travels Frequently Asked Questions | Animal Life Frequently Asked Questions | Literature and Language Frequently Asked Questions | Vehicles Frequently Asked Questions | Plants and Trees Frequently Asked Questions | Miscellaneous Frequently Asked Questions | Software Testing Frequently Asked Questions | Electronics Frequently Asked Questions | Certification Frequently Asked Questions | Web Hosting Frequently Asked Questions | SAP Module Frequently Asked Questions | Database Frequently Asked Questions | Operating System Frequently Asked Questions | Soft Skills Frequently Asked Questions | Hobbies and Collectibles Frequently Asked Questions | Humour and Amusement Corner Frequently Asked Questions | Community life and Leisure Frequently Asked Questions | Street Care and Cleaning Frequently Asked Questions | Technology Frequently Asked Questions | Celebrities Frequently Asked Questions | India Information Frequently Asked Questions | Microsoft Frequently Asked Questions | Multimedia Frequently Asked Questions |
    Copyright © 2005-2014. One Stop All rights reserved Privacy Policy | Terms and Conditions | About Us
    Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Cool Interview | Discussions World | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Indian Free Ads | Freshers & Experienced Jobs | New Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Web Hosting in India | Free SMS | Quick Site Kit | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Testing Interview Questions | Free Online Exam | The Galz | Fun & Entertainment | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World
    Page URL:
    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Greetings