Problems Running rnafold

cuda RNAfold is slow

For random sequences of 120nt the CPU version processes about 66 per second. Whereas the GPU version processes about 7.4 per second.

Work around

Well none really. The automatically generated CUDA code has far too few threads, far too few blocks and diverges.

Reducing the number of threads (using -T 1) speeds up cuda RNAfold by about 18%.

No examples

Work around

See Vienna or Hosna Jabbari's Phd.

RNAfold < jabbari_1.lis

mfe: -9.80 kcal/mol
Suboptimal range: [-9.80 kcal/mol - -8.82 kcal/mol]

..............((((.(((((........)))))))))  (-8.90)  
.......(((...((((...(((....)))))))..)))..  (-9.30)  
....((.(((...((((...(((....)))))))..)))))  (-9.80)  
....((..((...((((...(((....))))))).))..))  (-8.90)  
....((.(((...((((...(((....))))))).))).))  (-9.00)  
0.005u 0.006s 0:00.11 0.0%      0+0k 0+0io 0pf+0w
Note Jabbari says the folding is
structure in thesis:		..............((((.(((((........)))))))))
Mirela's Simfold energy:	-10.10
ADP Simfold energy:		-10.100001
Approximate ADP timing:		4 sec
difference:			None 
RNAfold webserver says:
The optimal secondary structure in dot-bracket notation with a minimum free energy of -9.30 kcal/mol is given below.

1      ..............((((.(((((........)))))))))

Create random sequences. Eg gawk -f rand_dna.awk -v "total=1000" /dev/null > t1000.fasta

cuda RNAfold does not work with CUDA 6.0

Work around: replace cutil.h and update

nVidia no longer supplies cutil.h The one included in rnafold.tgz is pretty old and does not appear to be compatible with CUDA 6. The CUT_DEVICE_INIT macro in a more recent cutil.h has been tweaked to be compatible with RNAfold and CUDA 6.0

cudaMemcpyToSymbol calls in have also been tweaked.

Delete RNAfold and rebuild it using make

Problems linking adpc/rnafold/cpu

Known Centos Redhat problem

make fails with
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/ undefined reference to `PC'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/ undefined reference to `tgetflag'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/ undefined reference to `tgetent'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/ undefined reference to `UP'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/ undefined reference to `tputs'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/ undefined reference to `tgoto'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/ undefined reference to `tgetnum'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/ undefined reference to `BC'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/ undefined reference to `tgetstr'
collect2: ld returned 1 exit status

It appears this is a known problem with centos and Red hat linux distributions.

Work around

Explicitly link libtermcap or libncurses. Eg
gcc RNAfold.o adplib.o rnalib.o RNAfold_mfe.o -lreadline -lm -lncurses -o RNAfold

RNAfold Appears to Loop

By default RNAfold pretty prints all RNA structures within 10% of the optimal structure. With random RNA strands of a few hundred nucleotides the number of eligible structures is huge and RNAfold appears to be looping as it tries to print them all.

This is compounded by the fact that RNAfold's use of memory continues to grow as it outputs this huge file. (It looks like memory is allocated by myalloc() but not freed by memory_free().)

Work around

RNAfold's -e command line option overrides the percent -c option, hence
./RNAfold -e 0 < input_file
will ensure only the best folds are output.

RNAfold Appears to Loop

In the .lis format each line is regarded as the continuation of the previous one. Thus a multi-line .lis file is treated as one large sequence which has many ways of folding (which take a long time to find and report all).

Work around

Use fasta file format for each separate sequence.

W.B.Langdon Back 10 March 2015 (last update 11 Mar)