none
Matlab job submision in HPC server 2008 R2 RRS feed

  • Question

  • Hello,

    I built a windows HPC server 2008 r2. But i have many problems for submitting tasks. I don't know how to run matlab files , fluent files or any other programs ( except .EXE files) in HPC server.

    I want to use batch file for running tasks from command line.

    I have X.m (matlab file). how can I run it in HPC server ?

    Could you please help me.

    With regards, Shamim.

    Tuesday, June 17, 2014 7:28 AM

Answers

  • HPC just executes the cmd you specify on the cluster's nodes.

    If you can manually run X.m in a compute node's cmd, you can run it with HPC.

    That says, you should ensure that all the compute nodes in the cluster have been correctly configured and X.m, together with all the dependencies, exist on these nodes.

    • Marked as answer by Shamimaa Wednesday, June 18, 2014 4:58 AM
    Wednesday, June 18, 2014 2:05 AM

All replies

  • HPC just executes the cmd you specify on the cluster's nodes.

    If you can manually run X.m in a compute node's cmd, you can run it with HPC.

    That says, you should ensure that all the compute nodes in the cluster have been correctly configured and X.m, together with all the dependencies, exist on these nodes.

    • Marked as answer by Shamimaa Wednesday, June 18, 2014 4:58 AM
    Wednesday, June 18, 2014 2:05 AM
  • Many Thanks for replying.

    Yes your right.

    But I have problems for submitting a job ( like  X.m) on HPC cluster.

    I am looking for one sample , showing that one matlab file is submitted on HPC server 2008 r2.

    The cmd script on a computer node is like this:

    M1\M2\M3\matlab.exe -nosplash -nodisplay -nodesktop -r "run N1\N2\N3\X.m" -logfile G1\G2\G3\output.txt

    But this script is not working on HPC.

    Could you please guide me?

    Thank you so much.

    Wednesday, June 18, 2014 5:08 AM
  • You are welcome.

    I don't know if there exists any official doc on Matlab with HPC solution, but you can find a common job submitting guidance here:

    http://technet.microsoft.com/en-us/library/hh223497(v=ws.10).aspx

    And, please give more details about the failed job you submitted, error messages or strange job states for example.

    Wednesday, June 18, 2014 5:26 AM
  • Thanks,

    I read all documents about HPC server 2008 R2. All these documents say that , HPC server can only execute (.exe) files ( MPI and SOA ).

    But it is hard to convert all the programs format ( like (.m) for matlab  -  (.mph) for comsol - and fluent formats)  to (.exe) format.

    My problem is , how to submit a job with a format except (.exe) such as (.m)  on HPC from command line?

    I know how to submit a (.exe ) job on HPC. But for the other formats, I don't know how to write a script or batch file. I can run matlab or other programs from command line in each computer node. But when I try to use that command for HPC , the job failed or job finished without any result.


    • Edited by Shamimaa Wednesday, June 18, 2014 6:20 AM
    Wednesday, June 18, 2014 5:52 AM
  • Let me make it clearer.

    If you can

    1. Log on one CN

    2. Launch CMD window

    3. Navigate to a specific folder (if needed)

    4. Run <xx\xx\matlab.exe -xx -xx "run xx\xx\X.m">

    5. Wait for the execution finishes and get the result

    Then you can

    1. New a HPC job

    2. Set some common configuration (if you want)

    3. Add a task in Edit Tasks page with exactly the same command <xx\xx\matlab.exe -xx -xx "run xx\xx\X.m">

    4. Set the working directory if you have to navigate to a specific folder to run matlab.exe

    5. Submit the job

    The job should be scheduled to a suitable node, and what HPC agent on the node does is just navigating to the specific folder and running <xx\xx\matlab.exe -xx -xx "run xx\xx\X.m">

    If the job fails, maybe matlab.exe returns a non-zero exit code.

    If you want to get the result matlab.exe printed into CMD window, open the job and click the task in View Tasks page.

    If you want to get the log files, you can log on to the compute node or just write another task to send it to your share folder.



    • Edited by SnOoPy1214 Wednesday, June 18, 2014 8:46 AM
    • Marked as answer by Shamimaa Wednesday, June 18, 2014 9:00 AM
    • Unmarked as answer by Shamimaa Sunday, June 22, 2014 5:26 AM
    Wednesday, June 18, 2014 8:45 AM
  • Thanks Dear for your guidance.

    I try the way you said. thank you for your time.

    Wednesday, June 18, 2014 9:02 AM
  •  I'm having a similar issue. I can remote into the compute node and run from the command prompt: \\headnode\matlab\r2014a\bin\matlab -r bench

    This runs successfully from the compute node. I can also put a .m script into the starting folder and run it successfully.

    However, when I do the same thing from an HPC job template, I got two behaviors. Initially, the job hung. It did output an error in the .err file. It was trying to run a setup of some compilers. I had not run from the command prompt on that specific compute node yet. I went in and ran from the command prompt, and accepted the installation of the needed utilities. I then confirmed that this node would run Matlab as stated above.

    The second behavior I got was an immediate completion of the job. I then tried again from the HPC Job scheduler. The job immediately goes into the "finished" state and the output and error files are blank. I created a script that would create an output file and also tried to use the logfile feature. When run from the HPC Job manager, the output files are never created. For some reason, the job seems to complete immediately without doing anything or throwing any errors.

    I noticed that when Matlab is run from the command prompt, the prompt does not wait until you close Matlab to give you another prompt. When you run the Matlab command, it immediately give you another C: prompt and then Matlab starts. Matlab also does not close out if you close the command prompt window that you started it from. I don't know if this has anything do to with the behavior or not.

    Monday, September 8, 2014 6:24 PM