Current Page:
NeXtMidas User's Guide
![]() ![]() |
|||
X-Midas Backwards Compatibility (XBC) The NeXtMidas
RequirementsXBC requires both a Fortran (in addition to the Java and C/C++ compiler used to install NeXtMidas). The following Fortran compilers work with the current version of XBC:
XM_FORTRAN environment variable. This can be
overridden by setting the NM_FORTRAN environment variable
to the name of the compiler to use. The fflags.compiler
property in $NMROOT/nxm/sys/cfg/build.props enables this
behavior (fflags.compiler = auto ) or can disable it by
specifying the Fortran compiler to be used at all times.
Note: There is a known bug in Java 1.4 related to garbage collection that can result in a core dump when making extremely frequent M$... calls from a host primitive (typically seen if polling a results parameter with little or no pause between calls). Upgrade to Java 5.0 to avoid this. 64 Bit SupportThe following compilers work with the current version of XBC on 64 Bit systems:
FYI: X-Midas 4.4.4 currently does not build with the Intel C/C++ 10.x Compiler. Note: Be sure to source the correct version of the compiler for your platform. i.e. for Intel EM64T (64bit) processors (use "fce" and "cce" NOT "fc" and "cc"). Replace /opt/intel/fce/9.1.051 and /opt/intel/cce/9.1.051 with your Intel FORTRAN and C++ installed directories.
Minor modifications to your build.props file are required to build XBC with
support for 64 Bit systems. You need to make the following changes to
"
What WorksThis table compares the features available to host primitives in X-Midas 3.8.3 and the current version of XBC. Note that support for low-level I/O, OpenVMS, X11 graphics and system calls are outside of the scope of XBC. See XBC Support for a complete list.
XBC does not support any of the X-Midas functions that were marked as
deprecated in X-Midas 3.8.3 or earlier. It does not support any of the
non-standard preprocessing of
Building
XBC is build by adding XBC to the path and the using nM> PATH ADD XBCDo not use " BLD ALL ALL XBC " as it will skip some of the
required steps.
If you have an option tree that uses XBC you will need to have XBC on the
path before it can be compiled (NeXtMidas will not compile or link any
Fortran code if XBC is not on the path). It is highly recommended that
you have a custom ! Calls the BUILDOPT;XBC to build the option tree. startmacro u:option["MYOPT"] BUILDOPT;XBC ^option endmacro Sending Messages to a Host PrimitiveNeXtMidas does not deal with "configured" and "unconfigured" messages the same way X-Midas does. In NeXtMidas the data can be any object (frequently a Table) without any specific configuration. When sending a message to a host primitive that expects a data field packed into a byte buffer XBC needs to translate a NeXtMidas message to an X-Midas message. The way it does this depends on if the message is configured or not: Configured Messages: XBC expects the message to be a table with tags that match the names in the structure of the message. For example, if the message was configured as: name msglog L:severity ! 1=Error, 2=Warning, 3=Informational S[24]:date_time ! Timestamp S[40]:source ! Primitive name which initiated message S[80]:text ! message text to be displayedXBC would expect the table to have the fields SEVERITY ,
DATE_TIME , SOURCE and TEXT , such
as:
MESSAGE SEND MSGLOG MSGLOG ^id ^info {SEVERITY=^severity,& DATE_TIME="^time",SOURCE="^source",TEXT="^text"}
Note that if any of the required fields are missing XBC will fill in a
0 value ( When a configured message is send from a host primitive to the macro the reverse is done. XBC translates the data buffer into a Table.
Unconfigured Messages:
Unlike configured messages, which XBC knows how to format, unconfigured
need to have their formatting information encoded in the data section of
the message. An unconfigured message must have a data table that includes
the following fields that match those described in the explain file for
VALn= where
n is the argument number (order in the table is not important,
only the tag number is), for example:
message send echoid SPAM SPAM ^info {TYPE="LLA",ARGS="3",& VAL1=^lval1,VAL2=^lval2,VAL3="^mystr"}
When an unconfigured message is send from a host primitive to the macro
XBC translates the data buffer into a Table but does not include the
Limitations of XBC ApplicationsAlthough XBC allows Fortran code in NeXtMidas, there are limitations placed on applications using XBC which are not placed on pure-Java applications:
Linking to an Existing X-Midas InstallationAlthough XBC does not require X-Midas to build or run, you can use the host primitives from an existing X-Midas installation. The following steps explain this:
Compiling Host Primitives The syntax for building host primitives is the same as building
other primitives in the
|
|||