I know that this is done using the /Qparallel , but does not want to "parallelize". I even tried to attribute #pragma parallel before the loop ((. Here is the code:
#include "pch.h" #include <iostream> #include <cmath> #include <ctime> long long n = 110000000; int main() { setlocale(LC_ALL, "Russian") long double Z = 0; clock_t start = clock(); //#pragma parallel for (long long i = 2; i < N; ++i) Z += pow(-1, i) / (pow(i, 4.0 / 3) - sqrt(i)); clock_t end = clock(); std::cout << "Время = " << (end - start) << std::endl; std::cout << "Результат = " << Z << std::endl; return 0; } A regular sequential program runs somewhere between 25 and 32 seconds. With the /Qparallel , the computation time remains the same. There are no loads on logical processors. When how, using OpenMP, everything is in order. Tried to include also report output (/Qpar-report3) . Everything is also nothing.
Вывод отчета разрешается с помощью опции -par-report3 (Linux) или -Qpar-report3 (Windows)- Pavel Gridin