2012-05-08 7 views
9

का उपयोग कर चल रहा है निम्नलिखित shellscript:'फ़ाइल की अनपेक्षित समाप्ति' और 'त्रुटि फ़ंक्शन परिभाषा का आयात' त्रुटि shellscript qsub

#!/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 का उपयोग करते समय rror, लेकिन एक ही क्लस्टर मशीन पर सीधे स्क्रिप्ट चलाने पर नहीं। Qsub का उपयोग करके मैं एक स्क्रिप्ट कैसे चला सकता हूं?

उत्तर

2

किसी कारण मुझे हर पंक्ति के अंत में अर्धविराम जोड़ने के लिए अज्ञात के लिए समस्या तय।

+0

/usr/share/मॉड्यूल/init/bash की प्रत्येक पंक्ति पर? (यहां एक ही समस्या है)। – Eureka

+0

शेलस्क्रिप्ट –

1

सबसे संभावित कारण है कि आप डॉस लाइन अंत (\ r \ n) के बजाय POSIX लाइन अंत (\ r) के साथ फाइल सेव जोड़ने अर्धविराम एक फर्क है, तो है।

+0

के अंत में नहीं, मैंने dos2unix चलाया, जिसने कोई फर्क नहीं पड़ता। इसके अलावा, मैंने इसे लिनक्स पर लिखा है और यह काम करता है जब मैं इसे qsub का उपयोग किए बिना उसी लिनक्स क्लस्टर पर चलाता हूं। –

4

/usr/share/मॉड्यूल/init/बैश में 'निर्यात -f मॉड्यूल' लाइन बाहर टिप्पणी की।

एक सामान्य लॉगिन खोल में, modules.sh profile.d से बुलाया जाएगा तो मॉड्यूल आदेश उपलब्ध है। एक गैर लॉगिन खोल में, एक ऐप रैपर स्क्रिप्ट की तरह यह केवल उपर्युक्त फ़ाइल को स्रोत करता है।

आम तौर पर आवेदन पत्र लिपि में फ़ाइल ऊपर सोर्सिंग वे फिर से आदेश "मॉड्यूल लोड क्षुधा/विक्रेता/एप्लिकेशन" जो अतिरिक्त सोर्सिंग का मतलब देने के बाद।

संदर्भ :: - http://gridengine.org/pipermail/users/2011-November/002019.html

9

इसके अलावा

qsub -shell no -b yes -cwd -V somescript.bash arg1 arg2 etc 

का उपयोग करता है अगर आप इसका इस्तेमाल एक और बैश शेल स्क्रिप्ट प्रस्तुत करने के लिए एक आवरण स्क्रिप्ट में यह समस्या है। यह annonying

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

(इस CentOS 6.6 पर चलने वाले सूर्य ग्रिड इंजन 211.11 है) पैदा करता है बाहर कर देता है बातें बस आवरण स्क्रिप्ट (लिपटे स्क्रिप्ट के नहीं) के शीर्ष पर निम्नलिखित डाल द्वारा हल कर रहे हैं:

unset module 

सब है कि।

संबंधित मुद्दे