Troubleshooting: Difference between revisions

From Research Computing Center Wiki
Jump to navigation Jump to search
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
===Introduction===
===Introduction===


This page provides the common errors and solutions for job at GACRC cluster. The examples are made from Sapelo2, but it applies to other GACRC clusters as well.   
This page provides the common errors and solutions for jobs at GACRC cluster. The examples are made from Sapelo2 environment, 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 problmes, such as [https://www.editpadpro.com/tricklinebreak.html editpadpro]
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,sh as an example file name below:  
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 response are acceptable as long as it is ASCII text format without wrong endings:
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 easily to be fixed by saving the file in unix format or using the following command at cluster:
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
Line 31: Line 31:
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.  
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.  


[[#top|Back to Top]]
===Invalid DISPLAY variable===
Python script using matplotlib complains DISPLAY error. It is observed in faststructure, oligotyping, QIIME and other applications. Such as in QIIME:
<pre class="gscript">
ml qiime/1.9.1_conda
conda activate /usr/local/apps/gb/qiime/1.9.1_conda
python /usr/local/apps/gb/qiime/1.9.1_conda/bin/core_diversity_analyses.py
...
File "/usr/local/apps/gb/qiime/1.9.1_conda/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 138, in _create_qApp
    raise RuntimeError('Invalid DISPLAY variable')
RuntimeError: Invalid DISPLAY variable
</pre>
The solution is to define DISPLAY backend before the function script:
<pre class="gcommand">
ml qiime/1.9.1_conda
conda activate /usr/local/apps/gb/qiime/1.9.1_conda
echo "backend: Agg" > ~/.config/matplotlib/matplotlibrc
python /usr/local/apps/gb/qiime/1.9.1_conda/bin/core_diversity_analyses.py
</pre>
[[#top|Back to Top]]
===Unrecognized lines following backslash line continuation===
In case of using backslash to continue the lines, there should be no extra space after backslash. Otherwise the following lines will be parsed as separate command and cause errors:
<div class="gscript2">
<nowiki>#</nowiki>PBS -S /bin/bash<br>
<nowiki>#</nowiki>PBS -N j_blast<br>
<nowiki>#</nowiki>PBS -q batch<br>
<nowiki>#</nowiki>PBS -l nodes=<u>1</u>:ppn=<u>1</u>:<u>AMD</u><br>
<nowiki>#</nowiki>PBS -l walltime=<u>8:00:00</u><br>
<nowiki>#</nowiki>PBS -l mem=<u>10gb</u><br>
<nowiki>#</nowiki>PBS -M <u>username@uga.edu</u><br> 
<nowiki>#</nowiki>PBS -m abe<br>
<br>
cd $PBS_O_WORKDIR<br>
<br>
<span style="background:#fae406;">module load BLAST+/2.7.1-foss-2016b-Python-2.7.14 </span><br>
<span style="background:#fae406;">blastn -num_threads 4 \</span><br>
<span style="background:#fae406;">-db /db/ncbiblast/nrte/latest/nt \&nbsp;</span><br>
<span style="background:#fae406;">-query my_fasta.fa</span><br>
</div>
There is a space at line "-db /db/ncbiblast/nrte/latest/nt \ ". This will cause error as "-query my_fasta.fa" being taken as an individual command. The blast command will throw help prompt since there is no input file found. The other error could be "error as "Error: Too many positional arguments ..." due to the operand parameter line.
The solution is to simply remove the extra space(s).


[[#top|Back to Top]]
[[#top|Back to Top]]

Latest revision as of 12:29, 28 January 2019

Introduction

This page provides the common errors and solutions for jobs at GACRC cluster. The examples are made from Sapelo2 environment, 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.


Back to Top

Invalid DISPLAY variable

Python script using matplotlib complains DISPLAY error. It is observed in faststructure, oligotyping, QIIME and other applications. Such as in QIIME:

ml qiime/1.9.1_conda
conda activate /usr/local/apps/gb/qiime/1.9.1_conda
python /usr/local/apps/gb/qiime/1.9.1_conda/bin/core_diversity_analyses.py 
...
File "/usr/local/apps/gb/qiime/1.9.1_conda/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 138, in _create_qApp
    raise RuntimeError('Invalid DISPLAY variable')
RuntimeError: Invalid DISPLAY variable

The solution is to define DISPLAY backend before the function script:

ml qiime/1.9.1_conda
conda activate /usr/local/apps/gb/qiime/1.9.1_conda
echo "backend: Agg" > ~/.config/matplotlib/matplotlibrc
python /usr/local/apps/gb/qiime/1.9.1_conda/bin/core_diversity_analyses.py

Back to Top


Unrecognized lines following backslash line continuation

In case of using backslash to continue the lines, there should be no extra space after backslash. Otherwise the following lines will be parsed as separate command and cause errors:

#PBS -S /bin/bash
#PBS -N j_blast
#PBS -q batch
#PBS -l nodes=1:ppn=1:AMD
#PBS -l walltime=8:00:00
#PBS -l mem=10gb
#PBS -M username@uga.edu
#PBS -m abe

cd $PBS_O_WORKDIR

module load BLAST+/2.7.1-foss-2016b-Python-2.7.14
blastn -num_threads 4 \
-db /db/ncbiblast/nrte/latest/nt \ 
-query my_fasta.fa

There is a space at line "-db /db/ncbiblast/nrte/latest/nt \ ". This will cause error as "-query my_fasta.fa" being taken as an individual command. The blast command will throw help prompt since there is no input file found. The other error could be "error as "Error: Too many positional arguments ..." due to the operand parameter line.

The solution is to simply remove the extra space(s).

Back to Top