MATLAB Answers

Saving workpace to a log file. Is that possible

6 views (last 30 days)
antonet
antonet on 8 Aug 2013
Hi all,
I have a question. Is it possible to save the workspace as a ".log" file? thanks

  3 Comments

antonet
antonet on 8 Aug 2013
I am running a sampler in a multi-core processor (Condor) and the guidelines say "To retrieve the output of a Condor job which mainly tends to be in the form of a “.log” file repeat the steps..."
Hope this helps
antonet
antonet on 8 Aug 2013
I found this
Matlab jobs in Condor Q. How Can I Run Matlab jobs under Condor? A. The general procedure is to create an M-file for the job, create a submit file and then submit the job for execution. This must be done from a CAE linux or Unix workstation. Condor on CAE Windows machines cannot run Matlab. Steps
Create an M-file for the Matlab script that you want to run. Your M-file should operate entirely in text mode, outputting either directly to a file or just printing to the screen. Let's say your file is called mat.m
Create a condor submit file. This file tells Condor information such as what program to run, where to get the input, and where to store the output. A basic example is: # # Submit a matlab job # Executable = /afs/engr.wisc.edu/apps/bin/matlab Arguments = -nodisplay Universe = vanilla Getenv = True Log = mat.log Output = mat.out Error = mat.err Input = mat.m Queue 1 Save this to a file named mat.condor Explaination of this file: The Executable line specifies the full path of the Matlab program at CAE (you can get this path directly by entering "which matlab" at a command prompt.) The second line gives the command line arguments to Matlab, which in this case simply mean run text-only. The Universe and Getenv lines indicate that we are running a vanilla (non Condor-compiled) program that should have the standard environment variables set. The Log through Input lines specify I/O files relative to the current working directory. Finally the Queue line means submit 1 job. You could include multiple Queue lines in the file, telling Condor to submit the job multiple times with different input files. For large numbers of jobs, you might also add the line: Requirements = OpSys == "LINUX" || OpSys == "SOLARIS29" This will allow your job to run on both Linux and Unix computers (by default Condor only executes jobs on the same architecture from which you originally submitted the job.)

Sign in to comment.

Answers (0)

Sign in to answer this question.

Tags