CTFFIND3 seg fault

I have a user running CTFFIND3 release 20120506 on a 64-bit Red Hat 5.8 machine. Their command script looks like this:


/programs/x86_64-linux/ctf/20120506/bin/ctffind3.exe > ctffind3.log << EOF
image.mrc
new.ctf
2, 120, 0.1, 72000, 4480
512, 10, 100, 2000, 6000, 200
EOF

It spins for a few seconds and then seg faults. Running gdb on the core file gets me:

Reading symbols from /nfs/programs/x86_64-linux/ctf/20120506/bin/ctffind3.exe...done.
[New LWP 16855]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/programs/x86_64-linux/ctf/20120506/bin/ctffind3.exe'.
Program terminated with signal 11, Segmentation fault.
#0 0x00000000004059c5 in msmooth () at ctffind3.f:487
487 SUM=SUM+ABOX(ID)
(gdb) bt
#0 0x00000000004059c5 in msmooth () at ctffind3.f:487
#1 0x0000000000405704 in filter () at ctffind3.f:394
#2 0x0000000000404ee5 in ctffind3 () at ctffind3.f:297
#3 0x0000000000402ec0 in main ()
#4 0x00002ba0aa82076d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#5 0x0000000000402dea in _start ()

The MP version crashes at the same line, so I am guessing there's something wonky in their MRC file that is causing problems. Or is it something else? What other information is needed for troubleshooting?

Thanks.

The newer versions of ctffind3 require 7 parameters in the fourth input line. Perhaps this is the problem? Try running the program interactively to see if all of the input parameters are entered.

Axel

In reply to by Axel

Interactive:

$ ctffind3.exe

CTF DETERMINATION, V3.5 (7-March-2012)
Distributed under the GNU General Public License (GPL)

Input image file name
image.mrc
image.mrc

Output diagnostic file name
new.ctf
new.ctf

CS[mm], HT[kV], AmpCnst, XMAG, DStep[um]
2, 120, 0.1, 72000, 4480
2.0 120.0 0.10 72000.0 4480.000

Positive defocus values for underfocus
Box, ResMin[A], ResMax[A], dFMin[A], dFMax[A], FStep[A], dAst[A]
512, 10, 100, 2000, 6000, 200

ERROR reading CARD 4. Trying old CARD 4...
512 10.0 100.0 2000.0 6000.0 200.0

Setting DAST = 100.0

Opening MRC/CCP4 file for READ...
File : 1_s2.mrc
NX, NY, NZ: 2048 2048 1
MODE : real
Min, max : -6.909167 14.21168
Mean, RMS : 0.1297257 0.000000
TITLE 1: EMAN 8/05/2012 14:18
Exp#=70545,C=4096,F='Gain Normalized',Bin=1,Z=1.00,ExpT=1
TITLE 2: EMAN 8/05/2012 14:22 EMAN 8/05/2012 14:18
Exp#=70545,C=4096,F='Gain No

READING IMAGE...
NX, NY= 2048 2048

TILING IMAGE...

Total tiles and number used 16 14
Lower resolution limit reset to 50.00000 A

FILTERING POWER SPECTRUM...

Segmentation fault (core dumped)

There is an error message about the missing value, but it sets a default value and still crashes. This command script is output during RELION's preprocessing stage, so maybe my next step is to email Sjors.

Any other ideas? Thanks.

In reply to by bene

One more idea. I believe your DStep is 4480, which seems a bit big. This should be the physical pixel size, and is usually between 5 and 20.
If you bin the data, this is multiplied by the bin factor, but it would have to be unreasonably binned to get a number like 4480.

How do you arrive at the 4480 value? Does giving a more reasonable value fix the problem?

Axel

In reply to by Axel

Hi Axel,

Yes, that was it. Setting DStep to 5 let's CTFFIND run to completion. I am not sure how the user ended up with that value. The RELION interface lets the user specify a range between 5 and 20, so it's either a bug in RELION or the user tweaked it by hand to produce that value.

Thanks for your guidance.