-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readline() on closed filehandle _IN at METABOLIC-C.pl line 1909. Cannot fork: Cannot allocate memory at /home/hyShen/miniconda3/envs/METABOLIC #193
Comments
A potentially useful modification when system resources are low is to alter the code slightly. By using search and replace, you can change the original line that looks like this: _run_parallel("$output/tmp_calculate_depth.sh", $i); `rm $output/tmp_calculate_depth.sh`; to: system("bash $output/tmp_calculate_depth.sh"); `rm $output/tmp_calculate_depth.sh`; This can greatly reduce system load. Possible reason: sub _run_parallel{
my $file = $_[0];
my $cpu_numbers_ = $_[1];
my @Runs;
open ___IN, $file;
while (<___IN>){
chomp;
push @Runs, $_;
}
close ___IN;
my $pm = Parallel::ForkManager->new($cpu_numbers_);
foreach my $run (@Runs){
my $pid = $pm->start and next;
`$run`;
$pm->finish;
}
$pm->wait_all_children;
} This function defines the initial number of threads to ensure that many threads are running simultaneously, similar to the parallel command in shell scripting, which in itself is not a problem. However, the issue arises because each sub-command in the generated temporary tmp_xxx.sh scripts specifies something like |
Thanks for your help. I found the two lines "_run_parallel("$output/tmp_calculate_depth.sh", $i); |
Hello, after replacing the original line, a similar error still occurs. My server has 64 threads. Is it not possible to set the progress of 40 threads? |
It seems like your .faa files maybe too large, or input files were demaged.
Possible your faa files too large, to store into RAM. If you find that there is always ample remaining memory during the program's execution, but you still receive the same error message, then please check if your input file is corrupted. |
hmmsearch takes too long to run (7g data over 15h) |
This is abnormal. Normally, hmmsearch with 40 threads processing 10GB/sample, for dozens of samples, would take only about a dozen hours. Since I'm not clear about your work environment, I can only guess that it might be a system issue. Try using the |
Describe the bug
After successfully running the test, I cannot run the process with my data. And the same error is reported many times.
To Reproduce
Steps to reproduce the behavior:
[2024-08-09 00:12:11] The Prodigal annotation is finished
readline() on closed filehandle _IN at METABOLIC-C.pl line 1909.
[2024-08-09 00:23:36] The hmmsearch is running with 60 cpu threads...
Cannot fork: Cannot allocate memory at /home/hyShen/miniconda3/envs/METABOLIC_v4.0/lib/perl5/site_perl/5.22.0/Parallel/ForkManager.pm line 52.
'
The hmmsearch is running with 60 cpu threads...
Cannot fork: Cannot allocate memory at /home/hyShen/miniconda3/envs/METABOLIC_v4.0/lib/perl5/site_perl/5.22.0/Parallel/ForkManager.pm line 52.
The text was updated successfully, but these errors were encountered: