Running MRCC on Windows Subsystem for Linux (WSL)

To run the quantum-chemistry code MRCC in the Windows Subsystem for Linux requires two steps, since the MRCC binaries do not work. The underlying problem is that WSL has some trouble running statically compiled binaries, so no issue MRCC can fix. As a workaround, just compile MRCC from the source:

./build.mrcc GNU -pOMP

Afterwards, the second issue strikes: under WSL, the $PATH environment variable contains the contents of the Windows paths, which unfortunately contain spaces and parentheses which the shell invocation command in MRCC’s combin.f cannot process. The workaround is to alias dmrcc to use a path environment variable where all paths with spaces and parentheses are removed. The one-liner for your .bashrc:

alias dmrcc='PATH="$(echo $PATH | sed "s/:/\n/g" | egrep -v "(\(|\)| )" | tr "\n" :)" dmrcc'

Make sure to add the path to your local MRCC build to $PATH, as usual.

Leave a comment

Your email address will not be published.