add new task       

Task ID:  1377  Enable building and execution of all APSIM components (other than VenLink and the GUI) on Linux/Mono    
Created by zur003 on 2011-09-13 1:10 PM, 2351 days ago
Project:  Infrastructure
Category:  Minor
Priority:  [no priority]
Assigned to:  [not assigned]  
Status:  re-opened
Apsim Version:7.5
Your Name:Eric Zurcher
Contact Details:

show inline images      show change history

 comment 35928 posted by peter.devoil on 2015-05-18 11:55 AM, 1008 days ago 

When a apsim .net component is byte compiled (to be later loaded as a dll), it starts up an external compiler process (vbnc aka mcs) to do the compilation. When run as a normal unix user, everything is fine. When run as a unix daemon (eg the linux, bob-style auto-builder, or condor jobs) the system fails to fire up the external compiler - instead of searching for it on the PATH environment variable, it tries to simply run it from the current working directory. It may have something to do with their custom implementation of getenv(), and the real/effective user id of the running process not playing nice with the C system call access().

There is an ugly fix in place at the moment that creates a symlink to the compiler in the working directory, but this fix fails when Apsim.exe is running multiple instances of apsim.

 comment 35294 posted by zur003 on 2014-04-23 12:06 PM, 1398 days ago 

With Mono 3.2.8, the VB compiler cannot compile some of the modules, because it has trouble resolving overloaded methods. Specifically, it cannot resolve between .Get(string, ref double) and .Get(string, ref object). That is, if the only difference in signature is between "object" and an in-built type, the compiler is not resolving correctly. This problem seems to be only with the VB compiler, not the C# compiler.

 comment 34860 posted by zur003 on 2013-07-29 2:19 PM, 1666 days ago 

Need to get AusFarm components working too...

 comment 34570 posted by zur003 on 2013-03-20 10:29 AM, 1797 days ago 

Although there will continue to be work to maintain compability, the basic task has been completed, with APSIM running successfully on 32-bit and 64-bit Linux systems. Much of the GUI is also working, although not quite well enough to be considered usable, but that's beyond the scope of the original task. Closing this for now.

 comment 33577 posted by zur003 on 2012-03-15 1:10 PM, 2167 days ago 

Return this task to its original purpose - Linux/Mono compatiblity.

 comment 33571 posted by guest on 2012-03-13 4:05 PM, 2169 days ago 

building and execution of all APSIM components in Visula studio 2010

 comment 33483 posted by zur003 on 2012-02-07 3:06 PM, 2204 days ago 
merged bug 1335 into this bug:
Should avoid use of "\" as path separator in C# code
 comment 32840 posted by zur003 on 2011-09-13 1:10 PM, 2351 days ago 

As much as possible of the APSIM system should be compilable and runnable using Linux, using Mono to handle the .NET code. Ideally, the entire test suite (with the exception of VenLink tests) should run correctly and give outputs which are (nearly) indentical with those of the Windows version.

Among other things, this will require going through code and .XML files to assure that (1) case-sensitivity is considered, and (2) path separators are not assumed to be '\'.

 comment 32727 posted by zur003 on 2011-07-26 1:29 AM, 2401 days ago 

Some parts of the non-model logic (e.g., ApsimToSim and ConToSIm) include code which explicitly uses the backslash character (\) as the separator of portions of a path name. In .NET code, this should be avoided by using either Path.Combine or Path.DirectorySeparatorChar, so that builds can be expected to run properly under Linux/Mono.