Compiling with Intel compilers on Windows is a distinctive task from MacOS or Linux.
The Intel C, C++ and Fortran compilers masquerade as Visual Studio compilers, especially in their command line options.
The correct version of Visual Studio must be installed on Windows for Intel compilers to work.
For the Intel Fortran compiler on Windows, the build options one normally uses for Intel Fortran on MacOS and Linux do not work, and even error out the compiler.
For C and C++, one must use the icl compiler (there is no icc or icpc on Windows) as if it were MSVC.
That can be perplexing at first for those not coming from the MSVC world.
The scientific computing world and most software engineering tasks not originating in the Microsoft domain use GCC-like compilers, which have completely different sets of compiler options.
You must have the Intel Parallel Studio with Cluster options installed for C/C++ and Fortran.
Additionally, you must have the Intel
installed to get the compiler wrappers necessary for most uses.
CMake and Meson may not recognize Intel MPI without the Intel MPI compiler wrapppers.
Then you will have the Intel
MPI compiler wrappers.
Loading Intel compiler environment
It’s important that you load the compilervars.bat script to enable the Intel compilers for each session and NOT the psxevars.bat.
For convenience, make a batch script like %userprofile%\intel.bat containing:
C:\"Program Files (x86)"\IntelSWTools\parallel_studio_xe_2019\compilers_and_libraries_2019\windows\bin\compilervars.bat intel64`set FC=ifort
Another distinctive feature of using MPI on Windows is that a username and password are required, even on a simple standalone laptop.
Good security practices may include creating a separate unprivileged user account that is only used for MPI jobs.
If this is suitable for your security environment, run MPI jobs in that other user account by from Command Prompt:
runas /user:mympiusername cmd
This opens a new Command Prompt window.
The environment variables are not passed to this new windows, so you may need to run Intel compilervars.bat again.
the user credential into the Windows registry, if appropriate for your environment.
If doing so, we would again urge to consider using a separate user account that’s only used for MPI runs.
If you don’t sign in, errors will be like:
Unable to manage jobs using credentials with a blank password. Please enter another account.
Spyder IDE is a complex but usually stable Python program.
When something goes wrong with Spyder, often the symptom is it simply won’t appear, maybe you’ll just get the splash logo.
To totally reset Spyder (erasing all user preferences for Spyder), type in Terminal / Command Prompt:
Normally, that fixes Spyder.
To diagnose further, start Spyder from Terminal instead of OS Start menu, it might give some hints.
In 2017, Anaconda
Accelerate was discontinued.
The GPU CUDA, cuDNN and NCCL functionality are accessed in a Numpy-like way from
CuPy also allows use of the GPU is a more
fashion as well.
Before starting GPU work in any programming language realize these general caveats:
I/O heavy workloads may make realizing GPU benefits more difficult
Consumer GPUs (GeForce) can be > 10x slower than workstation class (Tesla, Quadro)
You must have a discrete Nvidia GPU in your laptop or desktop.
Check for existence of an Nvidia GPU in your computer by:
lspci | grep -i nvidia
a blank response means an Nvidia GPU is not detected.
Look under the “render” tab to see if an Nvidia GPU exists.
cupy.cuda.runtime.CUDARuntimeError: cudaErrorInsufficientDriver: CUDA driver version is insufficient for CUDA runtime version
This means the CUDA Toolkit version is expecting a newer Nvidia driver.
The Nvidia driver can be updated via your standard Nvidia update program that was installed from the factory.
“Table 1” of the CUDA Toolkit release notes gives the
CUDA Toolkit required Driver Versions.
A code cell in popular Python IDEs including
is created by line starting with # %%.
This “code cell” is analogous to IPython code cells and
Matlab code sections.
You will see like
# %% user data
y =4# %% main loopfor i in range(5):
x += y
The code cells allow running sections of code in an IDE without the need to constantly set/unset breakpoints in the IDE.
They also catch the eye of developers to delineate logical blocks of code in the algorithm.
We encourage the use of code cell syntax, even if you don’t use them in the IDE directly, as the IDE will highlight sections of code to visibly delineate these separate parts of the algorithm.
Sadly, PGI 19.7
deprecated PGI debugger.
PGI Java-based pgdbg graphical debugger was for Fortran, C and C++ and was in the no-cost Community Edition as well.
The program to be debugged needs compile options -g -O0 to provide maximum debugging information.
Example with hello.f90:
pgfortran -g hello.f90
pgdbg a.out opened the graphical Fortran debugger.
If you don’t see code in the upper left of the graphical PGI debugger for your program, be sure you compiled the executable with -g -O0 options.