linux – 使用qsub运行shellscript的’意外的文件结束’和’错误导入功能定义’错误

我有以下 shellscript:
#!/bin/sh
cd /sw/local/bin/
export LD_LIBRARY_PATH=/sw/local/lib:/usr/local/Trolltech/Qt-4.7.2/lib:$LD_LIBRARY_PATH
./FeatureFinderRaw -in /homes/JG-C1-18.mzML -out /homes/test_remove_after_use.featureXML -threads 20

当我从自己的命令行运行它时,它工作正常,但是当我尝试做:

qsub -q ningal.q -cwd -V -o /homes/queue.out -e /queue.err featureFind_C1-18_20t.sh

我收到以下错误

/bin/sh: module: line 1: Syntax error: unexpected end of file
/bin/sh: error importing function deFinition for `module'
./FeatureFinderRaw: error while loading shared libraries: libOpenMS.so: cannot open shared object file: No such file or directory
/bin/sh: module: line 1: Syntax error: unexpected end of file
/bin/sh: error importing function deFinition for `module'
./FeatureFinderRaw: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory
/bin/sh: module: line 1: Syntax error: unexpected end of file
/bin/sh: error importing function deFinition for `module'
./FeatureFinderRaw: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory
/bin/bash: module: line 1: Syntax error: unexpected end of file
/bin/bash: error importing function deFinition for `module'
./FeatureFinderRaw: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory
/bin/sh: module: line 1: Syntax error: unexpected end of file
/bin/sh: error importing function deFinition for `module'
./FeatureFinderRaw: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory
/bin/sh: module: line 1: Syntax error: unexpected end of file
/bin/sh: error importing function deFinition for `module'

我不明白为什么在使用qsub时会收到此错误,但是在直接在同一个集群机器上运行脚本时却并不明白.如何使用qsub运行脚本?

解决方法

在使用的包装器脚本中也有这个问题
qsub -shell no -b yes -cwd -V somescript.bash arg1 arg2 etc

如果您使用它来提交另一个bash shell脚本.它产生了声音

/bin/sh: module: line 1: Syntax error: unexpected end of file
/bin/sh: error importing function deFinition for `BASH_FUNC_module'

(这是在CentOS 6.6上运行的Sun Grid Engine 211.11)通过简单地将以下内容放在包装器脚本(而不是包装的脚本)上来解决问题:

unset module

就这样.

相关文章

Linux中的ARP防火墙主要用于防御ARP欺骗攻击,其效果取决于多...
insmod和modprobe加-f参数导致Invalid module format错误 这...
将ArchLinux安装到U盘 几个月前入门Arch的时候上网搜了不少安...
1、安装Apache。 1)执行如下命令,安装Apache服务及其扩展包...
一、先说一下用ansible批量采集机器信息的实现办法: 1、先把...
安装配置 1. 安装vsftpd 检查是否安装了vsftpd # rpm -qa | ...