User Tools

Site Tools


howto:windows

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
howto:windows [2024/04/17 21:48]
ccrosby created
howto:windows [2024/04/17 22:39] (current)
ccrosby [Running Windows applications]
Line 3: Line 3:
   * The Linux-based analysis or simulation software has no GUI, but there is a Windows GUI.   * 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.   * The Windows application may be a pre- or post-processor for a native Linux application.
-  * If the user lacks a workstation with sufficient resource such as memory or processing power.+  * If the user lacks a workstation with sufficient resources such as memory or processing power
 + 
 +==== Consider Cloud ==== 
 +The CHPC has its own [[https://wiki.chpc.ac.za/guide:cloud:start|cloud]] offering called [[https://openstackusers.nicis.ac.za/login/?next=/|Sebowa]].  Windows instances are possible but the user is responsible for providing a Windows license.
  
 ==== Have some Wine ==== ==== Have some Wine ====
-[[https://www.winehq.org/|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.  +[[https://www.winehq.org/|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 [[https://docs.sylabs.io/guides/3.5/user-guide/index.html|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: 
 +<code> 
 +module load chpc/singularity/3.5.3 
 +singularity run /home/apps/chpc/compmech/Wine/winehq.sif  WindowsExecutable.exe 
 +</code> 
 + 
 +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: 
 +<code> 
 + 
 +$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/ 
 + 
 +</code> 
 + 
 +The above file listing in ''~/.wine'' illustrates that: 
 +  - Wine creates a Windows directory structure in your home directory. 
 +  - This could use up your home directory quota rather quickly.  Proceed with care. 
 +  - 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 [[https://www.irfanview.com/|IrfanView]] (a popular Windows image viewing and manipulation application) with the following command line: 
 +<code> 
 +$ singularity run /home/apps/chpc/compmech/Wine/winehq.sif ~/.wine/drive_c/Program\ Files/IrfanView/i_view64.exe 
 +</code> 
 + 
 +{{:howto:iview.png|}} 
 + 
 +It goes without saying that you need to use either X-forwarding or [[howto:remote_viz|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/attic/howto/windows.1713383331.txt.gz · Last modified: 2024/04/17 21:48 by ccrosby