OGS HPC 集群中的 Perl 运行时错误

Perl runtime bug in OGS HPC cluster

我正在尝试调试 HPC 集群。

一个问题:通过 Open Grid Scheduler 将 Perl 脚本提交到数百个节点 Linux Suse 集群中(OGS/GE 2011.11)。

这会为群集中 "long queue" 上的 Perl 脚本生成运行时错误,但不会在 "short queue" 上生成运行时错误。

$> qsub -cwd -q short.q ./test.pl

输出正常

$> qsub -cwd -q long.q ./test.pl

输出错误日志, /var/spool/sge/comp26/job_scripts/3141815: 第 2 行:意外标记附近的语法错误 my' /var/spool/sge/comp26/job_scripts/3141815: line 2:open (my $fh, '>', 'test.out');'

如果我提交一个 shell 脚本到它工作的长队列,包含

perl ./test.pl 

有什么想法吗?

系统:GNU bash,版本 4.2.46(2),Perl v5.16.3 (yuk)

测试脚本

#!/usr/bin/perl
# Also tried #!/bin/perl
system("perl -v > perl.out");
open (my $fh, '>', 'test.out');
print $fh 'test';
close $fh;

如@bytepusher 所述,解决方案是

#!/usr/bin/env perl

并提交给 qsub -cwd -q long.q ./test.pl 没问题。