Differences between revisions 27 and 51 (spanning 24 versions)
Revision 27 as of 2011-02-18 05:08:06
Size: 4609
Comment:
Revision 51 as of 2016-04-20 15:12:03
Size: 8226
Comment:
Deletions are marked like this. Additions are marked like this.
Line 85: Line 85:
=== Running the BCVTB on Mac OS X version 10.11 ===

Apple has enabled a new default security oriented featured called System Integrity Protection, often called rootless, in OS X 10.11 onwards.
This new feature prevents the BCVTB version 1.5.0 and older to set environment variables which are required by the BCVTB to run. As a work-around, proceed as follows:

create a symbolic link to {{{libbcvtb.dylib}}} with:

{{{
ln -s $BCVTB_PATH/lib/util/libbcvtb.dylib /usr/local/lib/libbcvtb.dylib
}}}

where {{{$BCVTB_PATH}}} is the path to the BCVTB version to use.


Furthermore, Mac OS X 10.11 does not set the computer's !HostName correctly.
This is needed by all versions of the BCVTB. As a work-around, proceed as follows:

Check if a !HostName is set on your machine from a terminal with:

{{{
scutil --get HostName
}}}

If there's no !HostName set, then set your !HostName.

Your !HostName must be the same as your computer's local network name.

To find out your computer's local network name,

{{{Open Sharing preferences (choose Apple menu > System Preferences, then click Sharing).}}}

The local network name is displayed beneath the computer’s name at the top of the pane.

The local network name is your computer’s name with “.local” added, and any spaces are replaced with hyphens .
For example, if your computer’s name is My Computer, your local network name is “My-Computer.local.”

Set your !HostName with:

{{{
sudo scutil --set HostName 'YourLocalNetworkName'
}}}

Check your !HostName with:

{{{
echo $HOSTNAME
}}}

See [[https://github.com/lbl-srg/bcvtb/issues/32|issue#32]] on [[https://github.com/lbl-srg/bcvtb/issues/32|github]] for more information and updates.
Line 111: Line 161:

=== EnergyPlus on Windows cannot find Java ===

If !EnergyPlus writes the error{{{
Instantiating Building Controls Virtual Test Bed
 ExternalInterface initializes.
'java' is not recognized as an internal or external command,
operable program or batch file.
 **FATAL:Error in ExternalInterface: Check EnergyPlus *.err file.
}}}
then Java is installed, but not on the {{{Path}}} variable of the operating system.
This situation occurred on a Windows 7, 64-bit, installation. The Windows Explorer associated the file
extension {{{.jar}}} with Java (which allowed the user to start the BCVTB from the Windows Explorer),
but Java could not be found by !EnergyPlus as the Java binary directory was not on the Windows {{{Path}}} variable.

To fix this problem, add the directory that contains {{{java.exe}}} to your system path. Java may
be installed in {{{C:\Program Files (x86)\Java\jre6\bin}}}.

=== Java cannot find VergilApplication ===
If running{{{
bin/bcvtb examples/c-room/system.xml
}}}
causes the following error{{{
Exception in thread "main" java.lang.NoClassDefFoundError: ptolemy/vergil/VergilApplication
Caused by: java.lang.ClassNotFoundException: ptolemy.vergil.VergilApplication
}}}
then the system environment variable {{{PTII}}} is set to a directory that does not contain a Ptolemy II installation.
This may happen if a user installed !OpenModelica, as !OpenModelica sets the PTII variable.

To fix this error, proceed as follows:
 * on Windows, add the line{{{
<entry key="PTII">$BCVTB_HOME\lib\ptII</entry>}}} to the file {{{bin\systemVariables-windows.properties}}} in the BCVTB home directory.
 * on Linux or Mac, add the line{{{
<entry key="PTII">$BCVTB_HOME/lib/ptII</entry>}}} to the file {{{bin/systemVariables-linux.properties}}} or {{{bin/systemVariables-mac.properties}}} in the BCVTB home directory.

Help

For questions that are not addressed here or in the manual, send email to https://groups.google.com/group/bcvtb

1. Compilation problems

1.1. Error when compiling MATLAB

1.1.1. Windows

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.

1.1.2. Linux Ubuntu 10.10 64-bit

In MATLAB R2010b, the command

cd lib/matlab
ant all

may fail with the error message

Warning: You are using gcc version "4.4.4-14ubuntu5)".  The version
     [exec]          currently supported with MEX is "4.3.4".
     [exec]          For a list of currently supported compilers see: 
     [exec]          http://www.mathworks.com/support/compilers/current_release/
     [exec] 
     [exec] /usr/bin/ld: cannot find -lstdc++
     [exec] collect2: ld returned 1 exit status
     [exec] 
     [exec]     mex: link of ' "establishBSDSocket.mexa64"' failed.
     [exec] 
     [exec] ??? Error using ==> mex at 208
     [exec] Unable to complete successfully.
     [exec] 
     [exec] Error in ==>
     [exec] /usr/local/matlab/R2010b/toolbox/simulink/simuli>> nk/+legacycode/@LCT/compile.p>compile
     [exec] at 264
     [exec] 
     [exec] 
     [exec] Error in ==>
     [exec] /usr/local/matlab/R2010b/toolbox/simulink/simulink/+legacycode/@LCT/legacyCodeImpl.p>legacyCodeImpl
     [exec] at 84
     [exec] 
     [exec] 
     [exec] Error in ==> legacy_code at 87