Installing CTFFIND
Procedure
- Use PuTTY to log in to the server as the root user.
- Obtain the CTFFIND installation package.
wget https://grigoriefflab.umassmed.edu/system/tdf?path=ctffind-4.1.14.tar.gz&file=1&type=node&id=26
- Decompress the CTFFIND installation package.
tar -zxvf ctffind-4.1.14.tar.gz
- Go to the directory generated after the decompression.
cd ctffind-4.1.14
- Modify the src/core/matrix.cpp file.
- Open src/core/matrix.cpp.
vi src/core/matrix.cpp
- Press i to enter the insert mode and modify the content in line 7:
Before the modification:
7 #define _AL_SINCOS(x, s, c) __asm__ ("fsincos" : "=t" (c), "=u" (s) : "0" (x))After the modification:
7 #define _AL_SINCOS(x, s, c) s = sinf(x); c = cosf(x);
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open src/core/matrix.cpp.
- Perform the compilation and installation.
yum install -y libjpeg* libtiff* fftw* autoreconf -f -i ./configure --prefix=/path/to/ctffind --disable-mkl --enable-openmp --enable-debugmode
- Modify the Makefile file.
- Open Makefile.
vi Makefile
- Press i to enter the insert mode and change -O2 in CFLAGS CPPFLAGS CXXFLAGS to -O0.
Before the modification:
296 CFLAGS = -g -O2 297 CPP = clang -E 298 CPPFLAGS = -O2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DDEBUG 299 CXX = clang++ 300 CXXCPP = clang++ -E 301 CXXDEPMODE = depmode=gcc3 302 CXXFLAGS = -O2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DDEBUG -fopenmp
After the modification:
296 CFLAGS = -g –O0 297 CPP = clang -E 298 CPPFLAGS = -O0 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DDEBUG 299 CXX = clang++ 300 CXXCPP = clang++ -E 301 CXXDEPMODE = depmode=gcc3 302 CXXFLAGS = -O0 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DDEBUG -fopenmp
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open Makefile.
- Perform the compilation and installation.
make & make install
- Set the environment variables.
export PATH=/path/to/install/ctffind/bin:$PATH
Parent topic: Configuring the Compilation Environment
