Differences between revisions 8 and 22 (spanning 14 versions)
Revision 8 as of 2008-05-07 05:21:43
Size: 2790
Comment:
Revision 22 as of 2009-10-13 15:21:27
Size: 3044
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Line 4: Line 3:

[[
TableOfContents]]
<<TableOfContents>>
Line 9: Line 7:
When running {{{make configPt}}} or when running {{{./configure && make fast install}}} gives the
following error
If running
{{{
make configPt
}}}
or running
{{{
./configure && make fast install
}}}
gives the following error
Line 15: Line 20:
then the source code is most likely with Unix line endings. Download the Windows source
code from the Ptolemy web page.
then the source code is most likely with Unix line endings. Download the Windows source code from the Ptolemy web page.
Line 20: Line 23:
Under Windows, if the BCVTB is compiled using the Microsoft compiler, then
the MATLAB libraries also need to be compiled with the Microsoft compiler.
If, however, the gcc compiler has been used when compiling the BCVTB,
then the following compilation error may be obtained when compiling the MATLAB libraries:
Under Windows, if the BCVTB is compiled using the Microsoft compiler, then the MATLAB libraries also need to be compiled with the Microsoft compiler. If, however, the gcc compiler has been used when compiling the BCVTB,  then the following compilation error may be obtained when compiling the MATLAB libraries:
Line 25: Line 25:
Writing library for establishBSDSocket.mexw32 
c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_establishclientsocket' 
c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_exchangewithsocket' 
Writing library for establishBSDSocket.mexw32
c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_establishclientsocket'
c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_exchangewithsocket'
Line 30: Line 30:
To fix this problem, open Matlab, run  To fix this problem, open Matlab, run
Line 36: Line 36:
Line 37: Line 38:
Line 40: Line 40:
=== Investigate program output ===
Depending on how simulation programs are called by the {{{Simulation}}} actor in Ptolemy, the console output written by the simulation program may not be visible. To see the console output, change the command line of the Ptolemy actor from{{{
 bash ./runClient.sh
}}}
to{{{
 xterm -e bash ./runClient.sh
}}}
This will start a terminal that shows the output of the running simulation program which help analyzing what goes wrong, for example, when the simulation program terminates due to an error before connecting to the BCVTB.
=== Check program output ===
By default, the {{{Simulation}}} actor in Ptolemy writes a copy of the console output of the simulation program to a file called {{{simulation.log}}}. This file can typically be found in the directory from which the simulation program has been started.
Line 49: Line 43:
=== Check log files ===
If something goes wrong during the simulation, check the files {{{simulation.log}}}, {{{utilSocket.log}}} and {{{utilClient.log}}}. They contain log messages that may indicate the cause of the problem. If these files do not exist, go to the directory {{{bcvtb/lib}}}, open the file {{{defines.h}}} and add the line
Line 50: Line 46:
=== Investigate log files ===
If something goes wrong during the simulation,
check the files {{{simulation.log}}}, {{{utilSocket.log}}} and {{{utilClient.log}}}.
They contain log messages that may indicate the cause of the problem.
If these files do not exist, go to the directory {{{bcvtb/lib}}},
open the file {{{defines.h}}} and add the line
Line 59: Line 49:
Then, from the directory {{{bcvtb/lib}}} compile the libraries using  {{{
make clean
m
ake
Then, from the directory {{{bcvtb/lib/util}}} compile the libraries using{{{
ant clean all
Line 64: Line 52:
and rerun the simulation. Now the log files should be written to the
directory from which you started the BCVTB.
and rerun the simulation. Now the log files should be written to the directory from which you started the BCVTB.

=== Memory problem ===

If the following error occurs:{{{
java.lang.OutOfMemoryError: Java heap space}}}
then increase the Java heap space by running vergil with the command{{{
java -Xmx1024m ptolemy.vergil.VergilApplication system.xml}}}
The argument {{{-Xmx1024m}}} declares how much memory is allocated. The default for Java is -Xmx128m

=== Wrong Java version ===
The following error occurs if a too old Java version is used:{{{
java.lang.UnsupportedClassVersionError: Bad version number in .class file}}}
To fix this problem, update your Java.

Help

1. Compilation problems

1.1. Error when compiling Ptolemy II (Windows only)

If running

make configPt
  • or running

./configure && make fast install
  • gives the following error

/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 4: syntax error: unexpected end of file

then the source code is most likely with Unix line endings. Download the Windows source code from the Ptolemy web page.

1.2. Error when compiling MATLAB (Windows only)

Under Windows, if the BCVTB is compiled using the Microsoft compiler, then the MATLAB libraries also need to be compiled with the Microsoft compiler. If, however, the gcc compiler has been used when compiling the BCVTB, then the following compilation error may be obtained when compiling the MATLAB libraries:

Writing library for establishBSDSocket.mexw32
c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_establishclientsocket'
c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_exchangewithsocket'
c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_closeipc'

To fix this problem, open Matlab, run

mex -setup

and select the Microsoft Visual C++ compiler from the menu. This need to be done only once as it updates your Matlab settings.

2. Runtime problems

The following steps typically help analyzing problems if a simulation program does not work as expected.

2.1. Check program output

By default, the Simulation actor in Ptolemy writes a copy of the console output of the simulation program to a file called simulation.log. This file can typically be found in the directory from which the simulation program has been started.

2.2. Check log files

If something goes wrong during the simulation, check the files simulation.log, utilSocket.log and utilClient.log. They contain log messages that may indicate the cause of the problem. If these files do not exist, go to the directory bcvtb/lib, open the file defines.h and add the line

#define NDEBUG

Then, from the directory bcvtb/lib/util compile the libraries using

ant clean all

and rerun the simulation. Now the log files should be written to the directory from which you started the BCVTB.

2.3. Memory problem

If the following error occurs:

java.lang.OutOfMemoryError: Java heap space

then increase the Java heap space by running vergil with the command

java -Xmx1024m ptolemy.vergil.VergilApplication system.xml

The argument -Xmx1024m declares how much memory is allocated. The default for Java is -Xmx128m

2.4. Wrong Java version

The following error occurs if a too old Java version is used:

java.lang.UnsupportedClassVersionError: Bad version number in .class file

To fix this problem, update your Java.

bcvtb: Help (last edited 2016-04-21 17:07:12 by ThierryNouidui)