This code used to work in earlier version of MS VS 2019:
vector<size_t> v1(two_hundred_million);
for (int i = 0; i < two_hundred_million; ++i) {
v1[i] = randomInt(engine);// random number 1 to 4 billion
}
sort(execution::par, v1.begin(), v1.end());
Now exits with following message:
C:\Users\bobl0\Documents\Visual Studio 2019\Projects\BobDebug4\Release\BobDebug4.exe (process 22908) exited with code -1073740791.
Press any key to close this window . . .
Code executed in Release mode, not Debug mode.
NOTE: When executed in Debug mode, it completes successfully, though it takes 133 seconds to complete where it took 4 seconds in Release mode when that mode still worked.
Some additional code defined previous to code shown above:
const size_t two_hundred_million = 200000000;
default_random_engine engine( static_cast<unsigned int>( time(0) ) );
uniform_int_distribution<size_t> randomInt( 1, four_billion);
Default settings in IDE other than I have selected “ISO C++ 17 Standard (for the field “C++ Language Standard”). This is required in order to use this updated version of the sort algorithm.
========================================================================
Some additional info pulled from VS IDE:
Microsoft Visual Studio Community 2019
Version 16.5.3
VisualStudio.16.Release/16.5.3+30002.166
Microsoft .NET Framework
Version 4.8.03752
Installed Version: Community
Visual C++ 2019 00435-60000-00000-AA945
Microsoft Visual C++ 2019
ASP.NET and Web Tools 2019 16.5.236.49856
ASP.NET and Web Tools 2019
Azure App Service Tools v3.0.0 16.5.236.49856
Azure App Service Tools v3.0.0
C# Tools 3.5.0-beta4-20153-05+20b9af913f1b8ce0a62f72bea9e75e4aa3cf6b0e
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Cookiecutter 16.5.20041.1
Provides tools for finding, instantiating and customizing templates in cookiecutter format.
IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info
Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.30207.1
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards
Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package
NuGet Package Manager 5.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit
https://docs.nuget.org/
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
Python 16.5.20041.1
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.
Python - Conda support 16.5.20041.1
Conda support for Python projects.
Python - Django support 16.5.20041.1
Provides templates and integration for the Django web framework.
Python - IronPython support 16.5.20041.1
Provides templates and integration for IronPython-based projects.
Python - Profiling support 16.5.20041.1
Profiling support for Python projects.
Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.
Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.
TypeScript Tools 16.0.20225.2001
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 3.5.0-beta4-20153-05+20b9af913f1b8ce0a62f72bea9e75e4aa3cf6b0e
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 10.8.0.0 for F# 4.7 16.5.0-beta.20181.6+85af456066acd4e76d2bc7821b44a325e46f2fca
Microsoft Visual F# Tools 10.8.0.0 for F# 4.7
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Tools for CMake 1.0
Visual Studio Tools for CMake
Visual Studio Tools for Unity 4.5.1.0
Visual Studio Tools for Unity
========================================================================
And some more info:
OS Name Microsoft Windows 10 Home
Version 10.0.18363 Build 18363
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Name DESKTOP-ATH7RCS
System Manufacturer System manufacturer
System Model System Product Name
System Type x64-based PC
System SKU SKU
Processor AMD Ryzen 7 3700X 8-Core Processor, 3593 Mhz, 8 Core(s), 16 Logical Processor(s)
BIOS Version/Date American Megatrends Inc. 0807, 2019-07-08
SMBIOS Version 3.2
Embedded Controller Version 255.255
BIOS Mode UEFI
BaseBoard Manufacturer ASUSTeK COMPUTER INC.
BaseBoard Product TUF GAMING X570-PLUS (WI-FI)
BaseBoard Version Rev X.0x
Platform Role Desktop
Secure Boot State Off
PCR7 Configuration Binding Not Possible
Windows Directory C:\Windows
System Directory C:\Windows\system32
Boot Device \Device\HarddiskVolume2
Locale United States
Hardware Abstraction Layer Version = "10.0.18362.628"
User Name DESKTOP-ATH7RCS\bobl0
Time Zone Pacific Daylight Time
Installed Physical Memory (RAM) 15.9 GB
Total Physical Memory 15.9 GB
Available Physical Memory 4.88 GB
Total Virtual Memory 25.7 GB
Available Virtual Memory 4.35 GB
Page File Space 9.80 GB
Page File C:\pagefile.sys
Kernel DMA Protection Not Available
Virtualization-based security Not enabled
Device Encryption Support Reasons for failed automatic device encryption: TPM is not usable, PCR7 binding is not supported, Hardware Security Test Interface failed and device is not Modern Standby, Un-allowed DMA capable bus/device(s) detected, WinRE is not configured, TPM is not usable
Hyper-V - VM Monitor Mode Extensions Yes
Hyper-V - Second Level Address Translation Extensions Yes
Hyper-V - Virtualization Enabled in Firmware No
Hyper-V - Data Execution Protection Yes