There are a number of good, officially supported ways to use SIMION under Linux even though (until recently) SIMION has only been available as a native Windows program.
Wine: The primary method to use SIMION under Linux is to run the native Windows version of SIMION within Wine under Linux. Wine allows Windows programs to run at roughly native speeds on standard Intel/AMD compatible processors; Wine is not a CPU emulator but rather a native Linux implementation of the Windows API. SIMION 8.0 and 8.1 (and to lesser extent 7.0) are officially tested and fully supported by SIS under the latest Linux/Wine, and all major functions work well. You can run either the 32-bit version of SIMION or (if you have a 64-bit Linux with Wine64) the 64-bit version of SIMION. There is also a low-price, 32-bit only, commercial version of Wine called CrossOver Linux, which should also work well, though we’ve primarily been using that only on Mac OS.
Wine requires an Intel or AMD (x86/x64) compatible CPU, so it’s not usable in the rare case of having some more exotic processor like Oracle SPARC or ARM. If your CPU is not x86/x64 compatible, then you’ll have to either specially request that we recompile SIMION for that processor or (much less preferable for a heavy number crunching application like SIMION) use some type of CPU emulator.
Virtualization: Another good method is to run the native Windows version of SIMION within a Windows operating system in a virtual machine (like VirtualBox or VMWare) running on Linux. This runs about as well than Wine or perhaps a bit better since there is zero compromise to the Windows API, and it preserves full integration with other Windows programs (like Excel/LuaCOM). However, it is a more heavyweight solution that requires a copy of Windows to be installed, may use more memory, and can have less integration with other Linux programs.
Native Binary: Early Access Mode (8.2, June 2013) now has a non-GUI native Linux binary of SIMION. This is preliminary and currently has some limitations (non-GUI), so it’s currently mainly intended for people using high performance compute servers where it may be convenient to eliminate the Wine dependency. Other users are currently recommended to use Wine.
Comparison of Methods¶
Windows licensing: Using Wine does not require a Windows license. Using virtualization software like VirtualBox or VMWare does require you have and install a licensed copy of Windows into the virtual machine (Windows is purchased separately). The Wine method can be more cost effective.
Performance: Wine runs largely at native speeds in terms of Refine and Fly’ms. Fly’m speed under Wine has much improved as of SIMION 188.8.131.52 to run at about native speeds, so it’s recommended to update SIMION if you have an earlier version (in previous SIMION versions, Fly’ms under Wine could be slower by a factor of 2x or much higher, although Refines were fast).
Excel (conditionally supported): Controlling Excel from SIMION via LuaCOM is only supported via virtualization (i.e. VirtualBox/VMWare not Wine) and only if Excel is a Windows version installed on the virtual machine. As of 184.108.40.206, most examples can alternately use gnuplot rather than Excel, and gnuplot runs fine under Wine.
CHM file: SIMION 8.1 uses a Windows CHM file for supplementary help documentation. This can be read on Linux, but see caveats in the “Notes on Windows Help CHM” section below.
Summary: SIMION 8.1/8.0 runs well on all the above options. If you want integration with (Windows) Excel you should use virtualization (VMWare or Parallels), but if you want better integration with Linux applications you might want to instead use Wine since SIMION will then run more like an Linux application. SIMION 7.0 works ok on all the above but seemed to run most smoothly under Wine (SIMION 7.0 does some tricky things with the mouse that cause some non-critical mouse behavior issues under VMWare).
Running the 64-bit version of SIMION on Wine64 appears to basically work although some crashes in the test suite are seen (as of Wine-1.3.26). Wine64 itself is relatively new and might not yet be stable. It is hoped to resolve any problems and officially support Wine64 as soon as reasonably possible. The SIMION installation program is 32-bit, so you will need the “shared WoW64 setup” on the Wine64 page to run the 32-bit installer and 64-bit program.
Notes on Windows Help CHM¶
The supplementary documentation in Windows Help format (simion.chm) in SIMION 8.1 can be viewed in Linux. Some quirks have been noticed, though these seem to be improving in recent versions of Wine.
The pages may all display blank when viewed in the default Wine help viewer (wine hh simion.chm). This appears to be a bug in Wine (1.2.2 at least), if the simion.chm file is located in a path that contains spaces (which it usually does since the default install location is in Program Files\SIMION-8.1). In Wine 1.2.2, you may move simion.chm into a path that does not contain space and then open it using wine hh simion.chm. This does not appear to be a problem in Wine 1.3.26, provided wine gecko wine1.3-gecko is installed, and pages also appear to render better.
Some links may not work, such as links to external pages outside of the help file (e.g. the “List of SIMION Examples”). To work around that, you may just load the file examples\README.html separately in your web browser.
The help file can also be viewed in alternate CHM viewers:
- CHM viewer “hh” built into Wine (recommended, no additional installation required)
These all basically work, but each can have one or more issues:
- intra-page links don’t work (but inter-page links are ok)
- links to remote (http) pages don’t work
- links to external pages (e.g. README.html files in examples) don’t work
- search doesn’t work
- page styling quirks
In SIMION 8.0, the supplementary documentation was in plain HTML format, which is fine in Linux. That format option and others might be (re)added in 8.1.x to more seamlessly support non-Windows platforms (these other formats exist but are currently considered experimental and not presently posted).
Batch I/O Performance¶
When running SIMION in batch mode, SIMION normally flushes standard output after each line printed. It might be observed (e.g. under a virtual machine) that the constant updating of the terminal display slows Fly’m performance 10% or more. You can make flushing less frequent by adding the command io.stdout:setvbuf("full", 4096) to the top of your workbench user program (see io file:setvbuf()). Alternately, a similar improvement is obtained by piping the output to file or through cat:
simion.exe --nogui fly --retain-trajectories=0 test.iob > result.txt
Native Linux Binary¶
As June 2013, Early Access Mode (8.2) has a native Linux binary of SIMION. The binary is preliminary and currently undergoing testing and refinement.
Presently, the main Linux version is non-GUI, so you can only run batch mode commands (see the Command Line appendix in the 8.x SIMION User Manual). Future versions might enable some or all GUI features, and testing has already begun a version of SIMION with partial GUI support on GTK. The non-GUI binary is mainly useful for running SIMION computations on compute servers, which don’t require a GUI. The native Linux binary may be preferred over the Windows binary on Wine/Linux since the the native binary avoids the additional Wine dependency and has greater native support (e.g. Linux shared libraries). But for many applications, using the native Windows version on Wine/Linux should work just fine. Binaries of simion and sltools are included.
An example of its use is ./simion --nogui fly quad.iob.
Binary compatibility with various Linux distributions is more challenging than with Windows. The main native Linux build is currently built on the latest version of Ubuntu (Ubuntu 13.04 based on debian wheezy/sid) and may or may not work as is on other distributions. This links to libc.so.6 and some other system libraries and also has a dependency on the Linux kernel version 2.6.24 or above. A version has also been built on CentOS 5.5, which is more compatible with older distributions and kernels.
The libraries the SIMION binary depends on can be found by typing ldd simion in the command line:
$ ldd simion linux-vdso.so.1 => (0x00007fff008cf000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd2a30b8000) libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007fd2a2ea9000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd2a2ca4000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd2a29a0000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd2a269c000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd2a2485000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd2a20bd000) /lib64/ld-linux-x86-64.so.2 (0x00007fd2a32f4000)
If your system is missing dependencies, you may see problems like this:
$ ldd simion ./simion: /lib/libc.so.6: version `GLIBC_2.14' not found (required by ./simion) ./simion: /lib/libc.so.6: version `GLIBC_2.17' not found (required by ./simion) ./simion: /lib/libm.so.6: version `GLIBC_2.15' not found (required by ./simion) ./simion: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ./simion) ./simion: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.19' not found (required by ./simion) linux-vdso.so.1 => (0x00007fff4392c000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f0d6e265000) libgomp.so.1 => /usr/lib/libgomp.so.1 (0x00007f0d6e058000) libdl.so.2 => /lib/libdl.so.2 (0x00007f0d6de53000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f0d6db3f000) libm.so.6 => /lib/libm.so.6 (0x00007f0d6d8bd000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f0d6d6a6000) libc.so.6 => /lib/libc.so.6 (0x00007f0d6d344000) /lib64/ld-linux-x86-64.so.2 (0x00007f0d6e496000) librt.so.1 => /lib/librt.so.1 (0x00007f0d6d13c000)
If your linux kernal is too old, you may get an error like this:
FATAL: kernel too old
The file command provides other information on things like required CPU architecture and minimum Linux kernal version:
$ file simion simion: ELF 64-bit LSB executable, AMD x86-64, version 1 (GNU/Linux), for GNU/Linux 2.6.24, dynamically linked (uses shared libs), not stripped
If you lack the required library dependencies, one solution is to copy the library files from a supported Linux version (we can provide these files for you) to your own system. Copy them into your SIMION folder. Then start SIMION using like this:
LD_LIBARRY_PATH=. ./simion --nogui --help
or, even better, this may be required:
./ld-linux-x86-64.so.2 --library-path . ./simion --nogui --help
Here are some other notes specific to the Linux version:
- The SIMION settings directory is ~/.simion not c:\FILES.GUI.
- LuaCOM is of course not supported on Linux, so you will need to use other methods of interfacing with programs, as seen in SIMION Example: extension or SIMION Example: gnuplot.
- File paths returned by SIMION APIs like simion.pas pa.path always have slashes / rather than backslashes \ on both Windows and Linux. However, on Linux you should not pass backslashes to these since Linux won’t interpret these correctly. Avoid using backslashes whenever possibile for best portability. package.config:sub(1,1) will return \ on Windows and / on Linux.
If you have any questions running SIMION on Linux, just ask.
- EA-20140411: native Linux build now supported for older distributions too (CentOS 5.5 build).
- EA-20131125: support SIMION Example: extension on native-Linux binary
- EA-20130601: non-GUI native Linux binary (preliminary)
- 220.127.116.11: Fly’m speed (GUI and non-GUI) improved by a couple of times under Wine/Linux. Fly’m speed is close to native now under Wine. Tested on Wine 1.4.
- 18.104.22.168: Performance improvements to Fly’m (GUI mode) and Log window.
- 22.214.171.124: 64-bit SIMION now experimentally supported on Linux via Wine64.
- 8.0.6: Various fixes for Wine/Linux (keyboard and OpenGL).
- 8.0.5-TEST30: Fixed asyncronous I/O on Linux. Affects since 8.0.5-TEST1.
- 8.0.4-TEST24: Issue-I461 - Fixed particle flying gets very slow after switching tab in View under Wine/Linux.