Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A11Q2 CPU limit exceeded

115 views
Skip to first unread message

Marco

unread,
Mar 31, 2012, 1:55:09 AM3/31/12
to
I'm getting timeouts / CPU limit exceeded on the release tests of A11Q2 however when run my program on the code they give for the release tests it works perfectly fine....

Everything seems to be working (unless when it says malloc and free in the notes it doesn't actually mean new: and delete: from the alloc.asm). Is there any reason this could be happening?

Marco

unread,
Mar 31, 2012, 2:25:03 AM3/31/12
to
On Saturday, March 31, 2012 1:55:09 AM UTC-4, Marco wrote:
> I'm getting timeouts / CPU limit exceeded on the release tests of A11Q2 however when run my program on the code they give for the release tests it works perfectly fine....
>
> Everything seems to be working (unless when it says malloc and free in the notes it doesn't actually mean new: and delete: from the alloc.asm). Is there any reason this could be happening?

In addition to it working when I run the program, one of the release tests for a11q3 also uses new (no delete) and my program passes it, if that means anything.

Aaron Neufeld

unread,
Mar 31, 2012, 8:52:56 PM3/31/12
to
I'm having the same problem...

On Saturday, March 31, 2012 1:55:09 AM UTC-4, Marco wrote:
Message has been deleted

Marco

unread,
Apr 1, 2012, 4:07:42 AM4/1/12
to
Yeah this is really bothering me, I copied the alloc.asm, I copied the procedure from the notes with the fix that someone posted on the news group, it also runs perfectly on putty, why would this happen with marmoset?

Pondfiller

unread,
Apr 1, 2012, 11:28:30 AM4/1/12
to
same here, I get timeout on Q2 released test t3.

I browser the whole sample program and find out that the program halt half way. I guess there's some kind of timing mechanism for marmoset which limit the time for test.

On Saturday, 31 March 2012 01:55:09 UTC-4, Marco wrote:
> I'm getting timeouts / CPU limit exceeded on the release tests of A11Q2 however when run my program on the code they give for the release tests it works perfectly fine....
>
> Everything seems to be working (unless when it says malloc and free in the notes it doesn't actually mean new: and delete: from the alloc.asm). Is there any reason this could be happening?



Aaron Neufeld

unread,
Apr 1, 2012, 1:12:53 PM4/1/12
to
Exactly. And the test input is cut off on marmoset, so you can't even test it on your own and figure out why it is taking so long. For some of the other long inputs they gave (for t1 and t2) my compiler takes maybe 3 seconds, so I don't know why any input would be timing out. The only thing I can think of is that there is something wrong with alloc.asm, and I'm not taking the time to debug 600 lines of assembly code (or any code that is given to us for that matter). As for our code generation stuff, there's not really much we can do wrong, it's only a few lines of code besides calling the given procedures.

Pondfiller

unread,
Apr 1, 2012, 2:18:31 PM4/1/12
to
The sample program halts here for my compiler:


v90 = new int[2];
*v90 = 3748;
v91 = new int[1];
*v9

what about yours ?

Basically what released test 3 of Q2 is just keep newling and deleting massive amount of pointers and println some of them.

I've created some similar test (1000 lines +) and my compiler works perfectly.

I really hope they post the full t3 file.

Marco

unread,
Apr 1, 2012, 4:39:52 PM4/1/12
to
Yup, again considering there's no time out errors in the other questions that use new/delete, this is really messed up. It's not like my program is outputting some sort of infinite loop....

S. Craig

unread,
Apr 1, 2012, 5:27:59 PM4/1/12
to
Sidenote:

If you repeat the new/remove stuff 6 times (* 150 variables), you can get a stack overflow error in java.

-sc

Ravi A-B

unread,
Apr 1, 2012, 9:51:43 PM4/1/12
to
They aren't. In the notes, malloc and free take arguments as total
numbers of bytes. So when you pass in an argument as a number of word,
you need to multiply by 4. In the provided code, the argument they
take is in number of words. This was mentioned in the last day of
class.

That being said, I have the same problem - it works fine at home
(instantly) for me as well.

Marco

unread,
Apr 1, 2012, 11:47:19 PM4/1/12
to
On Saturday, March 31, 2012 1:55:09 AM UTC-4, Marco wrote:
> I'm getting timeouts / CPU limit exceeded on the release tests of A11Q2 however when run my program on the code they give for the release tests it works perfectly fine....
>
> Everything seems to be working (unless when it says malloc and free in the notes it doesn't actually mean new: and delete: from the alloc.asm). Is there any reason this could be happening?



On Saturday, March 31, 2012 1:55:09 AM UTC-4, Marco wrote:
> I'm getting timeouts / CPU limit exceeded on the release tests of A11Q2 however when run my program on the code they give for the release tests it works perfectly fine....
>
> Everything seems to be working (unless when it says malloc and free in the notes it doesn't actually mean new: and delete: from the alloc.asm). Is there any reason this could be happening?



On Saturday, March 31, 2012 1:55:09 AM UTC-4, Marco wrote:
> I'm getting timeouts / CPU limit exceeded on the release tests of A11Q2 however when run my program on the code they give for the release tests it works perfectly fine....
>
> Everything seems to be working (unless when it says malloc and free in the notes it doesn't actually mean new: and delete: from the alloc.asm). Is there any reason this could be happening?

Okay I emailed the tutors, they suggested trying taking out the error checking code to see if that is the problem and low and behold my program passes marmoset now. I'm guessing my error checking just isn't that efficient and has a bad runtime.

Aaron Neufeld

unread,
Apr 2, 2012, 3:01:17 PM4/2/12
to
> Okay I emailed the tutors, they suggested trying taking out the error checking code to see if that is the problem and low and behold my program passes marmoset now. I'm guessing my error checking just isn't that efficient and has a bad runtime.

Do you mean the checkTypes() function? I tried taking that out and mine still times out.

Marco

unread,
Apr 2, 2012, 5:07:44 PM4/2/12
to
On Monday, April 2, 2012 3:01:17 PM UTC-4, Aaron Neufeld wrote:
> > Okay I emailed the tutors, they suggested trying taking out the error checking code to see if that is the problem and low and behold my program passes marmoset now. I'm guessing my error checking just isn't that efficient and has a bad runtime.
>
> Do you mean the checkTypes() function? I tried taking that out and mine still times out.

I literally took out everything from assignment 9 except for my function that creates a symbol table (since I needed it for something in my code generation).

Aaron Neufeld

unread,
Apr 2, 2012, 7:27:37 PM4/2/12
to
ok, thanks. I got it now, I was doing excessive string manipulation which was causing it to time out.
0 new messages