Troubleshooting: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
===Introduction=== | ===Introduction=== | ||
This page provides the common errors and solutions for | This page provides the common errors and solutions for jobs at GACRC cluster. The examples are made from Sapelo2, but the solutions apply to Linux clusters as well. | ||
===File format=== | ===File format=== | ||
The text files, such as submission script, fasta file or other text data files at Linux should be in ASCII format. If the files are generated under other operating system or copied from web, there could introduce hidden characters which cannot be recognized by Linux. Hence bring the error for the job. There are many posts elaborating this | The text files, such as submission script, fasta file or other text data files at Linux should be in ASCII format. If the files are generated under other operating system or copied from the web, there could introduce hidden characters which cannot be recognized by Linux. Hence bring the error for the job. There are many posts elaborating on this problem, such as [https://www.editpadpro.com/tricklinebreak.html editpadpro] | ||
Here is the command to check on the file format, using sub | Here is the command to check on the file format, using file sub.sh as an example file name below: | ||
<pre class="gcommand"> | <pre class="gcommand"> | ||
Line 13: | Line 13: | ||
</pre> | </pre> | ||
The expected the correct format is ASCII. There could be a variation of response, such as python script, ASCII with long lines. All these | The expected the correct format is ASCII. There could be a variation of response, such as python script, ASCII with long lines. All these responses are acceptable as long as it is ASCII text format without wrong endings: | ||
<pre class="gscript"> | <pre class="gscript"> | ||
sub.sh: Bourne-Again shell script, ASCII text | sub.sh: Bourne-Again shell script, ASCII text | ||
Line 24: | Line 24: | ||
</pre> | </pre> | ||
Most time it is | Most time it is easy to be fixed by saving the file in Unix format or using the following command at cluster: | ||
<pre class="gcommand"> | <pre class="gcommand"> | ||
dos2unix sub.sh | dos2unix sub.sh |
Revision as of 15:27, 9 July 2018
Introduction
This page provides the common errors and solutions for jobs at GACRC cluster. The examples are made from Sapelo2, but the solutions apply to Linux clusters as well.
File format
The text files, such as submission script, fasta file or other text data files at Linux should be in ASCII format. If the files are generated under other operating system or copied from the web, there could introduce hidden characters which cannot be recognized by Linux. Hence bring the error for the job. There are many posts elaborating on this problem, such as editpadpro
Here is the command to check on the file format, using file sub.sh as an example file name below:
file sub.sh
The expected the correct format is ASCII. There could be a variation of response, such as python script, ASCII with long lines. All these responses are acceptable as long as it is ASCII text format without wrong endings:
sub.sh: Bourne-Again shell script, ASCII text
Here are common wrong formats:
sub.sh: Bourne-Again shell script, UTF-8 Unicode text executable sub.sh: Bourne-Again shell script, ASCII text, with CRLF line terminators
Most time it is easy to be fixed by saving the file in Unix format or using the following command at cluster:
dos2unix sub.sh
For the file in UTF-8 Unicode encoding, the easiest way is to manually remove the weird characters in a Linux text editor, such as vi, nano or pico.