User Tools

Site Tools


howto:windows

Running Windows applications

Fortunately, open-source scientific software applications, even those with Graphical User Interfaces, are most often developed on Linux. Those that have been developed on other operating systems generally also have build configurations for Linux. However, there are some applications that are only available on Windows. For the most part, these should be used on personal workstations or laptop computers. However, there are some exceptional circumstances where it might be useful to run these applications on the cluster:

  • The Linux-based analysis or simulation software has no GUI, but there is a Windows GUI.
  • The Windows application may be a pre- or post-processor for a native Linux application.
  • If the user lacks a workstation with sufficient resources such as memory or processing power.

Consider Cloud

The CHPC has its own cloud offering called Sebowa. Windows instances are possible but the user is responsible for providing a Windows license.

Have some Wine

Wine (originally an acronym for “Wine Is Not an Emulator”) is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, macOS, & BSD. Installing Wine on a Linux system is a non-trivial task, which may require root access. This would introduce serious and unacceptable security issues. However, Wine can be accessed by way of a Singularity container. Singularity-3.5.3 is available on Linux and the container for WineHQ has been installed in /home/apps/chpc/compmech/Wine/winehq.sif

Therefore, if you need to run a Windows application on the cluster, you can do so as follows:

module load chpc/singularity/3.5.3
singularity run /home/apps/chpc/compmech/Wine/winehq.sif  WindowsExecutable.exe

You will need to provide the path to the .exe file. If Wine needs to install anything, it will do so in a hidden directory .wine in your home directory. For example:

$ls -l ~/.wine
total 2536
drwxr-xr-x 2 jblogs jblogs        112 Apr 17 21:56 dosdevices
drwxr-xr-x 7 jblogs jblogs         96 Apr 12 12:18 drive_c
-rw-r--r-- 1 jblogs jblogs    2558225 Apr 17 21:56 system.reg
-rw-r--r-- 1 jblogs jblogs       3306 Apr 12 12:09 userdef.reg
-rw-r--r-- 1 jblogs jblogs      29256 Apr 17 21:56 user.reg


$ ls -l ~/.wine/drive_c
total 4
drwxr-xr-x  3 jblogs jblogs   22 Apr 12 12:09 ProgramData
drwxr-xr-x  7 jblogs jblogs  109 Apr 12 12:33 Program Files
drwxr-xr-x  6 jblogs jblogs   93 Apr 12 12:18 Program Files (x86)
drwxr-xr-x  4 jblogs jblogs   33 Apr 12 12:09 users
drwxr-xr-x 18 jblogs jblogs 4096 Apr 12 12:21 windows


$ ls -l ~/.wine/drive_c/users/jblogs/
total 0
drwxr-xr-x 3 jblogs jblogs 21 Apr 12 12:09 AppData
drwxr-xr-x 4 jblogs jblogs 38 Apr 12 12:33 Application Data
drwxr-xr-x 2 jblogs jblogs  6 Apr 12 12:09 Contacts
drwxr-xr-x 2 jblogs jblogs 22 Apr 12 12:13 Cookies
lrwxrwxrwx 1 jblogs jblogs 21 Apr 12 12:20 Desktop -> /home/jblogs/Desktop
lrwxrwxrwx 1 jblogs jblogs 23 Apr 12 12:20 Downloads -> /home/jblogs/Downloads
drwxr-xr-x 2 jblogs jblogs  6 Apr 12 12:09 Favorites
drwxr-xr-x 2 jblogs jblogs  6 Apr 12 12:09 Links
drwxr-xr-x 5 jblogs jblogs 74 Apr 12 12:09 Local Settings
lrwxrwxrwx 1 jblogs jblogs 23 Apr 12 12:20 My Documents -> /home/jblogs/Documents
lrwxrwxrwx 1 jblogs jblogs 14 Apr 12 12:20 My Music -> /home/jblogs/
lrwxrwxrwx 1 jblogs jblogs 14 Apr 12 12:20 My Pictures -> /home/jblogs/
lrwxrwxrwx 1 jblogs jblogs 14 Apr 12 12:20 My Videos -> /home/jblogs/
drwxr-xr-x 2 jblogs jblogs  6 Apr 12 12:09 NetHood
drwxr-xr-x 2 jblogs jblogs  6 Apr 12 12:09 PrintHood
drwxr-xr-x 2 jblogs jblogs  6 Apr 12 12:09 Recent
drwxr-xr-x 2 jblogs jblogs  6 Apr 12 12:09 Saved Games
drwxr-xr-x 2 jblogs jblogs  6 Apr 12 12:09 Searches
drwxr-xr-x 2 jblogs jblogs  6 Apr 12 12:09 SendTo
drwxr-xr-x 3 jblogs jblogs 21 Apr 12 12:09 Start Menu
drwxr-xr-x 2 jblogs jblogs  6 Apr 12 12:33 Temp
lrwxrwxrwx 1 jblogs jblogs 14 Apr 12 12:20 Templates -> /home/jblogs/

The above file listing in ~/.wine illustrates that:

  1. Wine creates a Windows directory structure in your home directory.
  2. This could use up your home directory quota rather quickly. Proceed with care.
  3. The “Windows” directory Templates is symbolically linked to your home directory. This means that you can access your Linux files in the Windows application through C:\users\jblogs\Templates

Wine example

A Windows application may be installed in exactly the same way. The application will be installed in ~/.wine/drive_c/Program Files by default. In this example we can run the installed software IrfanView (a popular Windows image viewing and manipulation application) with the following command line:

$ singularity run /home/apps/chpc/compmech/Wine/winehq.sif ~/.wine/drive_c/Program\ Files/IrfanView/i_view64.exe

It goes without saying that you need to use either X-forwarding or VNC in order to get a graphical capability.

Final thoughts on using Singularity and Wine

  • Don't.
  • Unless you cannot avoid it.
  • The mere fact that something is possible does not automatically make it a good idea.
  • We are not aware of a practical way of doing multi-node (MPI) runs. OpenMP shared-memory multi-thread parallelism does, however work, and makes good use of the available resources.
  • Raw computational performance is very good, and is only marginally slower than the native Linux application.
  • Compatibility is surprisingly good. Many things work, but, of course, there are no guarantees.
/app/dokuwiki/data/pages/howto/windows.txt · Last modified: 2024/04/17 22:39 by ccrosby