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:

MacOS finder behavior

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.

Mac OS Finder Behavior

On the Macintosh, data files can be opened in the Finder by double-clicking. By default, .jsml, .tac, .csv, .cdata and .bul files will open in JSim. This behavior can be changed on an individual file basis or for a particular user on a particular Mac. For example, if you want all .tac files to open with TextEdit, do the following:

  1. Select any .tac file in the Finder.
  2. Select "Get Info" from the File menu.
  3. In the pulldown menu labeled "Open with:", select "TextEdit". Then skip to step 7 below.
  4. If "TextEdit" does not appear, select "Other..."
  5. Navigate to "TextEdit" (it will be found in the Applications folder).
  6. Click on "Add".
  7. Click on "Change All...".
  8. Click on "Continue".

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

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(.bat) is provided in $JSIMHOME/local for all distribution. This is a shell 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, the Cygwin version in the Windows distribution. You will need to edit jscompile_c(.bat) and/or the relevant Makefiles for it to work properly on your system. Instructions for 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.

The calling arguments for jscompile_c and jscompile_c.bat are:

  1. JSIMHOME;
  2. directory in which compilation is to take place;
  3. 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.

Comments or Questions?

Give feedback

 

Model development and archiving support at https://www.imagwiki.nibib.nih.gov/physiome provided by the following grants: NIH U01HL122199 Analyzing the Cardiac Power Grid, 09/15/2015 - 05/31/2020, NIH/NIBIB BE08407 Software Integration, JSim and SBW 6/1/09-5/31/13; 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.