CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
scripts die when calling other program, but only certian circumstances

 



xtony
New User

Oct 17, 2008, 9:53 PM

Post #1 of 4 (572 views)
scripts die when calling other program, but only certian circumstances Can't Post

Hi, hopefully someone can help me out.

Short version: my scripts is a GUI wrapper which directly/indirectly calls other applications, it runs ok with small datasets, but dies when I test it with large datasets.



Long form:

I'm using Perl/Tk to design a GUI, in the scripts a subroutine A calls another Perl scripts call_B.pl, which in turn calls a third party application C.

I have lines like this:

my $call = system("call_B.pl -a option1 -b option2 -c option3");

my $res = $path . "$result_file_generated_by_application_C";

The lines work no problem when my datasets are small (1 Gigs), and with small datasets, it takes about 2 or 3 minutes for C to complete; however the line of 'my $res' complains uninitilized $result_file_generated_by_application_C when my testing datasets are big (10 Gigs); with big datasets, it usually takes 10-30 minutes for C to complete. In the failing case, I found no result_file_generated_by_application_C file generated. In another word, it looks like my scripts keeps going forward even the calling of call_B.pl (and then calling application C) does not finish.

I wonder if the problem is because my scripts calls B, which is submitted and returned, even C is still running. However, if my guess is right, then it should have problem too even when my datasets are small. Since no code available for application C, I think maybe I should try to incorporate call_B.pl codes into my scripts, which I hate to do because of legal issue.

Anyone knows what might cause the problem when my datasets are big?


shawnhcorey
Enthusiast


Oct 18, 2008, 12:58 AM

Post #2 of 4 (569 views)
Re: [xtony] scripts die when calling other program, but only certian circumstances [In reply to] Can't Post


In Reply To
Anyone knows what might cause the problem when my datasets are big?


Windows or Linux?

How much RAM do you have?

Does the C program have a memory leak?

__END__

I love Perl; it's the only language where you can bless your thingy.

Perl documentation is available at perldoc.perl.org. The list of standard modules and pragmatics is available in perlmodlib.

Get Markup Help. Please note the markup tag of "code".


xtony
New User

Oct 18, 2008, 2:13 PM

Post #3 of 4 (561 views)
Re: [shawnhcorey] scripts die when calling other program, but only certian circumstances [In reply to] Can't Post

Linux

7.5G memory --- it seems no problem for memory to handle the problem because if I run application C with large datasets while script A and B would not consume much memory.

Since C runs well, I guess no memory leak problem.


shawnhcorey
Enthusiast


Oct 18, 2008, 4:41 PM

Post #4 of 4 (557 views)
Re: [xtony] scripts die when calling other program, but only certian circumstances [In reply to] Can't Post


In Reply To
Linux

7.5G memory --- it seems no problem for memory to handle the problem because if I run application C with large datasets while script A and B would not consume much memory.

Since C runs well, I guess no memory leak problem.


I would run the C program individually while monitoring the memory usage so I get an idea of how it uses memory. Then I would run it from the Perl GUI and compare them.

Memory leaks are hard to track down and C seems to be the language that generates them more.

Of course, I can be wrong about it being a memory problem but then I would have a clue as to what the problem is.

__END__

I love Perl; it's the only language where you can bless your thingy.

Perl documentation is available at perldoc.perl.org. The list of standard modules and pragmatics is available in perlmodlib.

Get Markup Help. Please note the markup tag of "code".

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives