Customizing a JSim Installation
This document discusses various customizations you may wish to to a JSim installation. It assumes you have successfully installed JSim on your system and are familiar with JSIM Environment Variables .
The various customization options described here require either modifying user environment variables or installing scripts within JSIMPATH so that they can be found at run-time. Environmental variable customization is typically done at login time, and may affect single users or all users. See your system's documentation on how this is done.
When scripts must be placed in JSIMPATH, this is typically done in JSIMHOME/local for system-wide customization, or HOME/.jsim/local for user-specific customizations. Both these directories are in the default JSIMPATH.
Customization topics:
Security issues in customization
Setting up a C compiler for use with JSim
Setting up a C++ compiler for use with JSim
Setting up a Fortran compiler for use with JSim
Setting up Matlab for use with JSim
Note that a Java compiler is distributed with JSim, so no customization is required for MML models that contain functions or procedures in Java.
Security issues is customization
Before doing any local JSim customization, make sure you understand basic the JSim Sandbox . Never place untrusted files in either JSIMHOME/local or HOME/.jsim/local. Such files can be accessed via JSim models EVEN IN THE SANDBOX, possibly resulting in a compromised system.
Setting up a C compiler for use with JSim
These instructions have changed as of JSim release 1.6.66.
MML models may contain functions or procedures that require a C compiler. See Calling C Code From MML for details. JSim does not contain an internal C compiler, but calls a local script for that purpose. The script is named jscompile_c (formerly jscompile_c.sh) for Linux and MacIntosh, and jscompile_c.bat for Windows. A default version of jscompile_c is provided in $JSIMHOME/local for non-Windows distributions. This script uses the makefiles in $JSIMHOME/lib. Administrators will normally need to modify those makefiles to reflect compiler locations on their local systems. gcc version 4 is assumed. Installing compilers and modifying makefiles is beyond the scope of the JSim documentation set. Consult an expert system administrator if required. Users may override the $JSIMHOME/local compile script by placing one somewhere in JSIMPATH.
jscompile_c.bat for Windows systems remains problematic and so is not distributed with JSim. However, capable Windows developers may write one using the JSim common Makefiles and install it in JSIMPATH. If you succeed, please contact NSR so that we may include it in subsequent JSim distributions.
The calling arguments for jscompile_c and jscompile_c.bat are:
- JSIMHOME;
- directory in which compilation is to take place;
- name of C module minus the .c extension, e.g. "test" for test.c.
Setting up a C++ compiler for use with JSim
JSim support for C++ is planned for the future, but is not yet available.
Setting up a Fortran compiler for use with JSim
JSim support for Fortran is planned for the future, but is not yet available.
Setting up Matlab for use with JSim
JSim support for Matlab is planned for the future, but is not yet available.
[This page was last modified 03Mar08, 3:11 pm.]
Model development and archiving support at physiome.org provided by the following grants: NIH/NHLBI T15 HL88516-01 Modeling for Heart, Lung and Blood: From Cell to Organ, 4/1/07-3/31/11; NSF BES-0506477 Adaptive Multi-Scale Model Simulation, 8/15/05-7/31/08; NIH/NHLBI R01 HL073598 Core 3: 3D Imaging and Computer Modeling of the Respiratory Tract, 9/1/04-8/31/09; as well as prior support from NIH/NCRR P41 RR01243 Simulation Resource in Circulatory Mass Transport and Exchange, 12/1/1980-11/30/01 and NIH/NIBIB R01 EB001973 JSim: A Simulation Analysis Platform, 3/1/02-2/28/07.
