ctffind4 not taking command line inputs

Hello all,

I have compiled ctfffind 4.0.17 using gfortran ( gcc 4.9.3 ) on a mac and it compiled OK with some warnings. I can use it in the interactive mode but I can't use it in the batch mode. I compiled with defaults suggested on the website along with LDFLAGS.

When I run it with ctffind --omp-num-threads 1 --old-school-input it still asks for

Input image file name [input.mrc] :

Anything obvious that I am missing during compiling ??

Thanks in advance for your help and time.

Rajan

I couldn't find the --old-school-input in the core/program_instances.f90 file from ctffind-1.0.15 onwards. It is present for example in ctffind-1.0.8

My compiled binary can take --omp-num-threads in the command line but not --old-school-input

Thanks

Rajan

In reply to by Rajan

Hi Rajan,

It's possible this a mac-specific bug, or a general bug no one has reported previously. Have you tried just giving --old-school-input (without the --omp-num-threads option) to see if that works?

In recent versions of ctffind, the ProgramInstance object looks for --omp-num-threads and other command-line flags are parsed by ctffind itself (see ctffind.f90, lines ~190 onwards).

Alexis

In reply to by Alexis

Hi Alexis,

Thanks for your reply. I did try without --omp-num-threads and it still goes to the interactive mode. I had a look on the warning messages during compilation but nothing related to --old-school-input ( well my knowledge in fortran is limited). I am quite puzzled. If you want I cant send you the warning messages that it produces during compilations.

Thanks

Rajan

In reply to by Rajan

Hi Rajan,

Thanks for your persistence. I was able to reproduce this bug on linux using gfortran 5.2.1. This must be a gfortran-specific bug, which I'll try to look into when I can find some time.

In the meantime, the only real workarounds I can think of are: use a pre-built binary on linux or use the Intel compiler if you have access to it.

Thanks again
Alexis

In reply to by Alexis

Hi Alexis,

I could make it work by making old school input true by default ( temporary fix )

Changing the line ( source code line number 187 ) to

old_school_input = .true.

and

I commented out the line 382

! call my_user_input%UpdateDefaults()

to prevent it Update defaults twice ( gives error )

It seems to work fine now.

Thanks a lot for your time and help.

Rajan