I installed the C ++ and Fortran compiler and tested (C ++) programs (serial and parallel versions).
in Fortran, when compiling (parallel) code without enabling the option, -openmpyou must compile the code in (default) serial mode
but in C ++ I get errors like an undefined reference to omp_get_thread_num
but in Fortran, when compiling code without the -fopenmp flag, it ignores any code starting with $!omp, like
$!omp id = omp_get_thread_num()
Is there such a way in C ++?
source
share