Frequently Asked Questions under Linux

1. After the program is compiled successfully, the runtime error:

  error while loading shared libraries: libmpi.so.20: cannot open shared object file: No such file or directory

  Solution:

  cp /usr/local/openmpi/lib/libmpi.so.20 /usr/lib

2. When using the fftw library, the following error will occur when adding the cuda program

  /usr/include/fftw3.h(371): error: identifier "__float128" is undefined

  Solution:

vi /usr/include/fftw3.h Add && !defined(__CUDACC__)   after judging the environment 

 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) \

 && !(defined(__ICC) || defined(__INTEL_COMPILER)) \

 && (defined(__i386__) || defined(__x86_64__) || defined(__ia64__)) && !defined(__CUDACC__)

3. Valgrind , a program tool for debugging memory problems under Linux

A framework for building dynamic analysis tools for Valgrind. It has a range of tools for debugging analysis. Valgrind's architecture is componentized, so it is easy to add new tools without affecting the current architecture.

The following tools are standard on installation:

Memcheck: Used to detect memory errors. It helps C and C++ programs to be more correct.

Cachegrind: for analyzing cache and branch prediction. It helps programs execute faster.

Callgrind: for the analysis of function calls.

Helgrind: for analyzing multithreading.

DRD: Also used to analyze multithreading. Similar to Helgrind, but uses different analysis techniques, so different problems can be detected.

Massif: used to analyze the heap. It helps programs reduce memory usage.

SGcheck: An experimental tool for detecting stack and global array overflows, which complements Memcheck.

Reference: http://www.linuxidc.com/Linux/2012-08/67990.htm

4./usr/bin/ld: cannot find -lcublas

/usr/lib# ln -s /usr/local/cuda-7.5/lib64/libcublas.so /usr/lib/libcublas.so

 

/usr/lib# ldconfig

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326803481&siteId=291194637