On Windows the most commonly used MPI libraries are MS-MPI and
Intel MPI.
MSYS2 is a popular choice to use GCC, Clang and many other developer tools from the Windows Command Prompt, PowerShell or the MSYS Terminal itself.
Continuous Integration for Windows MPI applications on GitHub Actions is accomplished as in fortran-mpi-examples
Set inter-step environment variables using GitHub Actions
environment files.
Upon a generic Homebrew brew upgrade command, GNU
readline
that is required by the GNU Octave package was upgraded from 8.2 to 8.3.
This made GNU Octave unusable by not being able to type in GUI or non-GUI modes.
A workaround for non-GUI mode only is to disable interactive console input like:
octave --no-line-editing
Readline 8.3 has a known bug with a patch expected to be included in a future release.
For now, package maintainers can either use Readline older than 8.3, or patch Readline 8.3 to fix the bug that affects several programs beyond GNU Octave.
Matlab CI is often a better choice than Octave below.
Cross-platform developers run into numerous compatibility issues.
Rather than wait for frustrated users to report such a bug, use continuous integration.
Here are CI templates using GNU Octave tests of .m code.
Octave oruntests()
is incompatible with the advanced functionality of
Matlab runtests(),
WinGet can be used on Windows GitHub Actions runners where a Windows program needs to be installed.
In this example, environment variable FFMPEG_ROOT tells Python where to find the ffmpeg.exe program.
One could more generally append to the GITHUB_PATH environment variable.
importfunctoolsimportshutilimportos@functools.cachedefget_exe(name: str) -> str:
for p in (os.environ.get("FFMPEG_ROOT"), None):
if exe := shutil.which(name, path=p):
return exe
raiseFileNotFoundError(name)
Matlab Addons have commercial and no-cost toolboxes that can be installed into Matlab.
When testing project code, it is often useful to
disable an addon
to ensure that the project code works as expected in diverse Matlab toolbox-enabled environments.
To disable an addon, you can use the matlab.addons.disable function. Here is an example of how to disable a specific addon by its ID.
For example for “Parallel Computing Toolbox”:
Windows users generally should not
disable IPv6.
Upon network upgrades or working in a new location with IPv6, network operations that previously worked may fail.
An example of this is “conda install” or “conda update” commands that hang or fail with a timeout error.
While curl has an option “-4” or “–ipv4” to force IPv4 connections only, the “conda” command does not have a “force IPv4” option currently.
Windows can be set to prioritize IPv4 over IPv6, which can help with conda operations and other network operations.
Reprioritizing IPv4 over IPv6 is vastly preferable to disabling IPv6, as it allows for compatibility with IPv6 networks.
Check existing IPv6 settings with the command:
netsh interface ipv6 show prefixpolicies
ℹ️
Note
If there are only one or zero prefix policy entries, then IPv6 is likely not configured correctly.
The rest of this procedure would not help as Windows will go to factory defaults and ignore the IPv4 preference.
Fix the IPv6 configuration first, then proceed with the steps below.
Set the prefix policy for IPv4 to have a higher priority than IPv6 by running the following command in an elevated PowerShell or Command Prompt:
netsh interface ipv6 set prefixpolicy ::ffff:0:0/96464
Check that the IPv6 prefix policy has been set correctly by running:
netsh interface ipv6 show prefixpolicies
Then execute the “conda install” or “conda update” command again.
To restore the default Windows settings of IPv6 having priority over IPv4:
netsh interface ipv6 set prefixpolicy ::ffff:0:0/96354
Matlab
function arguments validation
syntax is generally recommended over validateattributes() and inputParser().
Function arguments validation specification coerces the input and/or output variables to the class declaration given if possible, and errors otherwise.
Default values are easily specified, which required such verbose syntax before.
only a single class can be specified
recall the .empty method of most Matlab classes e.g. datetime.empty() that allows initializing an empty array.
Matlab argument validation syntax coerces class at runtime.
Currently GNU Octave does not enable function arguments validation syntax, but it is possible to use the function albeit with warnings like:
“function arguments validation blocks are not supported; INCORRECT RESULTS ARE POSSIBLE”
To elide the verbose warnings to allow for self-tests or quick use, do in Octave like:
warning('off', 'all')% whatever code you want to run that uses the Matlab arguments validation syntaxoruntests .% restore warningswarning('on', 'all')
There are
requests
for Octave to assign a warning ID so that only this warning can be silenced, but it is not implemented as of this writing.
Thus all warnings are silenced, which is not recommended in production code.
However, for self-tests or quick use, it could be acceptable.
Intel oneAPI is a useful, performant compiler for CI with the C, C++, and Fortran languages.
oneAPI compilers give useful debugging output at build and run time.
If having trouble determining the oneAPI APT package name, examine the APT repo Packages file on the developer computer like:
curl -O https://apt.repos.intel.com/oneapi/dists/all/main/binary-amd64/Packages.gz
gunzip Packages.gz
less Packages