Prev: imfreehand in a GUI
Next: File Conversion
From: Bryn on 7 Jun 2010 12:30 I'm having trouble sending out a batch job. Here's the background: I'm running a program that is doing spatial analysis of a video. The program opens one frame at a time, finds a point in the frame using an algorithm, writes the x,y coordinates of that point, closes the image, and opens the next frame. It does this for 5400 frames of a movie. I have 92 movies to analyze, and it takes about 45 min per movie, so I'd really like to be able to analyze four movies in parallel. I have an i7 quad core processor, and the parallel code execution packages are installed in matlab. To get the movies to analyze serially, I have the following script, called it "movie.m" cd movie1 behavior cd .. cd movie2 behavior cd .. cd movie3 behavior cd .. where "behavior" is the above described algorithm. In the past, I've been able to use a .m file like this and analyze all the movies serially, but I didn't use a batch command to open up the other processors on this machine, so it took a long time. Yesterday I tried the batch command. Here's what I did: >>matlabpool open 4 >>j=batch('moviej') (I also assigned k, l, and m pool job objects for moviek, moviel, and moviem. Each of the movie scripts have a quarter of the movies I have to analyze, the idea being that I just spread the work across the four processors evenly) This morning, the task has completed with one error. Here's the error: ??? Error using ==> distcomp.abstractjob.load at 56 Error encountered while running the batch job. The error was: Cannot CD to movie1 (Name is nonexistent or not a directory). I read online that the default directory for batch jobs is the MATLAB folder, and all of these movie files are in that folder. Again, I was able to use this exact script for serial movie analysis, and the only thing different now is that it's running in batch mode. Any thoughts? I'd love to get this stuff analyzed ASAP. thanks! Bryn
From: Ashish Uthama on 7 Jun 2010 16:23 On Mon, 07 Jun 2010 12:30:42 -0400, Bryn <bgaertne(a)uoregon.edu> wrote: Its probably best if you can provide absolute paths instead. cd(fullfile(<...>)) Also, it might help to replace your algo with a no-op first time around to ensure that your logic around the batch job works fine instead of having to wait a day to find an error in the last line :)
From: Bryn on 7 Jun 2010 16:42 Heh. That's what was so frustrating-- I did not exactly a no-op, but I changed the number of frames to analyze for the first file of each batch so it would only take a minute to analyze, so if the .mat file appeared I knew it worked. I THOUGHT it worked, so I ended everything, changed the number of frames for those first files, and then restarted everything. Then it didn't work, and it looks like maybe it didn't actually work the first time around (it was late, I was tired, etc...) With respect to using absolute paths, and knowing very little about how parallel processors work, should there be any difference in the default folder? Should I specify a filepath in the command array? Or is this more covering-bases than anything else? Thanks! "Ashish Uthama" <first.last(a)mathworks.com> wrote in message <op.vdx5ktp2a5ziv5(a)uthamaa.dhcp.mathworks.com>... > On Mon, 07 Jun 2010 12:30:42 -0400, Bryn <bgaertne(a)uoregon.edu> wrote: > > Its probably best if you can provide absolute paths instead. > cd(fullfile(<...>)) > > > Also, it might help to replace your algo with a no-op first time around to > ensure that your logic around the batch job works fine instead of having > to wait a day to find an error in the last line :)
From: Ashish Uthama on 8 Jun 2010 16:36 On Mon, 07 Jun 2010 16:42:06 -0400, Bryn <bgaertne(a)uoregon.edu> wrote: I believe the path defaults to the 'current directory' of the client. type "doc batch" at the command line search for 'CurrentDirectory' in the help. You could override this to ensure the batch jobs start in a known directory. Or, you could use absolute paths for your CD's in the script.
|
Pages: 1 Prev: imfreehand in a GUI Next: File Conversion |