Please find attached patch with thread-safe implementation of fourier-cosine transforms.
I've tested it with FFTW and ACML. It still requires testing with MKL (I do not have this library available, but made some investigations regarding the transforms implementation and tried to compile with the MKL headers).
PS I guess, following should be mentioned in ITPP documentation:
Both AMD and Intel recommend to use single-threaded math libraries with omp-enabled code. So, if user wants to control multi-threading he/she use single-threading versions of these libraries. Multi-threaded versions of the libraries should be used to improve the performance of single-threaded ITPP builds.