From: us on 21 Jun 2010 16:19 "Nicholas " <bootsman(a)ualberta.ca> wrote in message <hvoh3b$p8o$1(a)fred.mathworks.com>... > Sorry, I should have included this information before. > > Here is the code: > > CentroidLine; %this script always runs > PAX; % but the ones after it are sometimes skipped. > BSR; > > The fact that these all work when called seperately in the terminal lead me to believe that it is not a problem with scripts themselves. > > I can tell the first script completes by the output files that it produces. It does not change the directory, so that is not an issue. Furthermore, no errors come up when the program skips to the next data set. > > Another thing that I forgot to mention was that when I set up break points and actually step into the second script, the program will run properly. > > > "Andy " <theorigamist(a)gmail.com> wrote in message <hvog8d$1q9$1(a)fred.mathworks.com>... > > "Nicholas " <bootsman(a)ualberta.ca> wrote in message <hvofg5$d4g$1(a)fred.mathworks.com>... > > > Hey all, > > > > > > I am having a rather odd problem with my program. At one point the the program runs a few other scripts in succession, but for some reason, in certain data sets it will only run the first of these scripts and skip the rest. However, when the skipping happens, I can copy all the script calls into the terminal and they will all work. > > > > > > I am hoping someone might have an idea as to why this might be happening. > > > > > > Thank you > > > > How can you tell it's skipping the other scripts? Are errors coming up? Are you using the profiler or debugger? Are you certain the first script finished running? Is there any possibility that the first script changed the current directory so that the next scripts couldn't be found? > > > > There are lots of possibilities here. You need to provide much more information. great(!)... now that you've shown three file names, what do you think CSSMers are going to learn from this - let alone be able to give you any more help than before... CSSMers need real, clean, error-free, copy/paste-able (ie, including cont-line markers) ML code, which reproduces the problem at hand in the most frugal way... us
From: Andy on 21 Jun 2010 16:33 "Nicholas " <bootsman(a)ualberta.ca> wrote in message <hvoh3b$p8o$1(a)fred.mathworks.com>... > Sorry, I should have included this information before. > > Here is the code: > > CentroidLine; %this script always runs > PAX; % but the ones after it are sometimes skipped. > BSR; > > The fact that these all work when called seperately in the terminal lead me to believe that it is not a problem with scripts themselves. > > I can tell the first script completes by the output files that it produces. It does not change the directory, so that is not an issue. Furthermore, no errors come up when the program skips to the next data set. > > Another thing that I forgot to mention was that when I set up break points and actually step into the second script, the program will run properly. > > > "Andy " <theorigamist(a)gmail.com> wrote in message <hvog8d$1q9$1(a)fred.mathworks.com>... > > "Nicholas " <bootsman(a)ualberta.ca> wrote in message <hvofg5$d4g$1(a)fred.mathworks.com>... > > > Hey all, > > > > > > I am having a rather odd problem with my program. At one point the the program runs a few other scripts in succession, but for some reason, in certain data sets it will only run the first of these scripts and skip the rest. However, when the skipping happens, I can copy all the script calls into the terminal and they will all work. > > > > > > I am hoping someone might have an idea as to why this might be happening. > > > > > > Thank you > > > > How can you tell it's skipping the other scripts? Are errors coming up? Are you using the profiler or debugger? Are you certain the first script finished running? Is there any possibility that the first script changed the current directory so that the next scripts couldn't be found? > > > > There are lots of possibilities here. You need to provide much more information. 1) The file names are all but useless. Could you post the code for the three scripts involved? Do they depend on each other? (That is, do you need to run all of them? Do you need to run them in that order? Do later scripts rely on outputs from earlier scripts?) If not, have you tried commenting each one of them out individually to see which one is problematic? 2) It doesn't matter that the script produced output files. There may be something later in the script (after producing output files), such as an infinite loop, causing the later scripts to never run. 3) It is almost certainly something in the scripts themselves, not the way you're calling them. E.g. % save this as ascript.m a=1; % save this as bscript.m b=2; % save this as testscript.m a; b; Obviously running testscript puts a=1 and b=2 in the base workspace. From the code you've given us, your situation is the same. But this of course means the issue is in the code you didn't give us.
From: Nicholas on 21 Jun 2010 16:57 Unfortunately the scripts are each over hundred lines long and part of a much bigger program that takes in very large data sets as inputs, so posting them isn't really much of an option. Furthermore, the fact that this error only occurs in 3 data sets out of the 50+ I have, makes the problem all the more difficult to reproduce in a simpler matter. That being said, I have taken your other points into consideration and did some testing with the different scripts commented out and found that when the first script is commented out, then nothing in that section runs. As I have said, the individual scripts all work when called separately in that order (yes they do depend on eachother) and when I set up breakpoints and step into the second script in that section, everything works as it should. "Andy " <theorigamist(a)gmail.com> wrote in message <hvoiae$cma$1(a)fred.mathworks.com>... > "Nicholas " <bootsman(a)ualberta.ca> wrote in message <hvoh3b$p8o$1(a)fred.mathworks.com>... > > Sorry, I should have included this information before. > > > > Here is the code: > > > > CentroidLine; %this script always runs > > PAX; % but the ones after it are sometimes skipped. > > BSR; > > > > The fact that these all work when called seperately in the terminal lead me to believe that it is not a problem with scripts themselves. > > > > I can tell the first script completes by the output files that it produces. It does not change the directory, so that is not an issue. Furthermore, no errors come up when the program skips to the next data set. > > > > Another thing that I forgot to mention was that when I set up break points and actually step into the second script, the program will run properly. > > > > > > "Andy " <theorigamist(a)gmail.com> wrote in message <hvog8d$1q9$1(a)fred.mathworks.com>... > > > "Nicholas " <bootsman(a)ualberta.ca> wrote in message <hvofg5$d4g$1(a)fred.mathworks.com>... > > > > Hey all, > > > > > > > > I am having a rather odd problem with my program. At one point the the program runs a few other scripts in succession, but for some reason, in certain data sets it will only run the first of these scripts and skip the rest. However, when the skipping happens, I can copy all the script calls into the terminal and they will all work. > > > > > > > > I am hoping someone might have an idea as to why this might be happening. > > > > > > > > Thank you > > > > > > How can you tell it's skipping the other scripts? Are errors coming up? Are you using the profiler or debugger? Are you certain the first script finished running? Is there any possibility that the first script changed the current directory so that the next scripts couldn't be found? > > > > > > There are lots of possibilities here. You need to provide much more information. > > 1) The file names are all but useless. Could you post the code for the three scripts involved? Do they depend on each other? (That is, do you need to run all of them? Do you need to run them in that order? Do later scripts rely on outputs from earlier scripts?) If not, have you tried commenting each one of them out individually to see which one is problematic? > > 2) It doesn't matter that the script produced output files. There may be something later in the script (after producing output files), such as an infinite loop, causing the later scripts to never run. > > 3) It is almost certainly something in the scripts themselves, not the way you're calling them. E.g. > > % save this as ascript.m > a=1; > > % save this as bscript.m > b=2; > > % save this as testscript.m > a; > b; > > Obviously running testscript puts a=1 and b=2 in the base workspace. From the code you've given us, your situation is the same. But this of course means the issue is in the code you didn't give us.
From: dpb on 21 Jun 2010 17:01 Nicholas wrote: ....[Please don't top-post...hard conversation follow makes]... > Unfortunately the scripts are each over hundred lines long and part of a > much bigger program that takes in very large data sets as inputs, so > posting them isn't really much of an option. Furthermore, the fact that > this error only occurs in 3 data sets out of the 50+ I have, makes the > problem all the more difficult to reproduce in a simpler matter. .... Which means if it's difficult for you _WITH_ the code, how do you expect cssm'ers to do anything? From the last sentence, clearly you have a data-dependent problem--something in the logic of the script with the data it is being supplied is causing the symptom--either the data is malformed or incorrect or there's a valid set of data values that were unexpected and not handled correctly or somesuch... Your mission, if you wish to accept it, ... --
From: us on 21 Jun 2010 17:05 "Nicholas " <bootsman(a)ualberta.ca> wrote in message <hvojnh$cng$1(a)fred.mathworks.com>... > Unfortunately the scripts are each over hundred lines long and part of a much bigger program that takes in very large data sets as inputs, so posting them isn't really much of an option. Furthermore, the fact that this error only occurs in 3 data sets out of the 50+ I have, makes the problem all the more difficult to reproduce in a simpler matter. > > That being said, I have taken your other points into consideration and did some testing with the different scripts commented out and found that when the first script is commented out, then nothing in that section runs. > > As I have said, the individual scripts all work when called separately in that order (yes they do depend on eachother) and when I set up breakpoints and step into the second script in that section, everything works as it should. frankly and unfortunately, given this idiosyncratic setup, there's not much help you can expect from this NG (other than a bunch of useless guesses)... sorry... us
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: reading dates into excel Next: This installer must be rung from disk #1 |