My code runs slower on a computing server than on my laptop: What's the problem ?
You might experience drops in performance when scaling to a larger computer, for example from a laptop. The most common way to solve this is to export the following variable:
This is due to an underlying library using the maximum number of available threads to execute a code. This causes drops in performance. When declaring the previous variable, you will only allow one thread per process, thus restoring expected performance.
Note that trying low values such as
OMP_NUM_THREADS=4may give you better performance.
Other factors that might harm performance:
- Slower hard drives (be sure to use
/ssddisk space for you IOs)
- Slower CPUs / Hyperthreading
- You end up with errors similar to this one at the end of the cmake step:
CMake Warning at feel/CMakeLists.txt:59 (add_library): Cannot generate a safe runtime search path for target feelpp because files in some directories may conflict with libraries in implicit directories: runtime library [libmpi_cxx.so.1] in /usr/lib may be hidden by files in: /data/software/install/openmpi-1.8.5/gcc-4.9.0/lib runtime library [libmpi.so.1] in /usr/lib may be hidden by files in: /data/software/install/openmpi-1.8.5/gcc-4.9.0/lib Some of these libraries may not be found correctly.
This error is very likely to be linked to loaded modules built with different version of libraries, e.g. one module has been built with version 1.8.5 of OpenMPI and an other one built with version 1.6.4 of OpenMPI, thus CMake is having trouble finding the correct library to use. To solve this issue and IF you used a profile for loading modules, refer to this section to an administrator and ask him to update the modules. If you didn't use a profile for modules, then you probably have a conflict between modules.