Problem with MATLAB (MEX probelm)

220 views
Skip to first unread message

Ji Hoon Yoon

unread,
Dec 1, 2014, 6:19:46 PM12/1/14
to bc...@googlegroups.com
 Dear BCVTB Team

 I suffer difficulty that BCVTB cannot connect with MATLAB. It showed the error, "establishbsdsocket.mexw64".

 Here is my computer environment.

 1. OS: Windows 7 Home Premium / Windows 8.1 -- 64bit (I tried both OSs)
 2. EnergyPlus: ver. 7.2
 3. BCVTB: ver. 1.4.0 (old version of BCVTV did not work properly, too.)
 4. MATLAB: ver. 2014a
 5. MEX compiler: Windows 7.1 SDK (C/C++)
 6. Java: JRE 7 and JRE 8 (both versions were installed)

 BCVTB could run the example of "ePlus72-schedule" well. However, the example of "ePlus72Simulink-simple failed to run.. This is error messege.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<Error from BCVTB>  

ptolemy.kernel.util.IllegalActionException: SocketTimeoutException while reading from client in .system.Simulink:
Accept timed out.
Try to increase the value of the parameter 'socketTimeout'.
It could be that the client "C:/Program Files/MATLAB/R2014a/bin/matlab.exe" is not executing properly.  From the command line, try running:
  C:/Program Files/MATLAB/R2014a/bin/matlab.exe "-nosplash -nojvm -logfile matlab.log -r simulateAndExit"
You should see something like:
  Simulation model has time step       60
  Error: Failed to obtain socket file descriptor. sockfd=-1.
The error message is expected because Ptolemy is not present.
Also, make sure that the directory that contains
"bcvtb.dll" (on Windows), "libbcvtb.so" (on Linux) or
"libbcvtb.dylib" (on Mac OS X) is on yourPATH, LD_LIBRARY_PATH or DYLD_LIBRARY_PATH for Windows,
Linux and Mac OS X respectively.
That directory contains the shared library used by the simulator.
Client subprocess exit value (should be 0): 0
  in .system.Simulink
Because:
Accept timed out
 at lbnl.actor.lib.Simulator._readFromServer(Simulator.java:475)
 at lbnl.actor.lib.Simulator.initialize(Simulator.java:781)
 at ptolemy.actor.Director.initialize(Director.java:943)
 at ptolemy.actor.Director.initialize(Director.java:912)
 at ptolemy.actor.sched.StaticSchedulingDirector.initialize(StaticSchedulingDirector.java:155)
 at ptolemy.domains.sdf.kernel.SDFDirector.initialize(SDFDirector.java:534)
 at ptolemy.actor.CompositeActor.initialize(CompositeActor.java:902)
 at ptolemy.actor.Manager.initialize(Manager.java:669)
 at ptolemy.actor.Manager.execute(Manager.java:340)
 at ptolemy.actor.Manager.run(Manager.java:1202)
 at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1760)
Caused by: java.net.SocketTimeoutException: Accept timed out
 at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
 at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
 at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
 at java.net.PlainSocketImpl.accept(Unknown Source)
 at java.net.ServerSocket.implAccept(Unknown Source)
 at java.net.ServerSocket.accept(Unknown Source)
 at lbnl.actor.lib.net.Server.read(Server.java:225)
 at lbnl.actor.lib.Simulator._readFromServer(Simulator.java:382)
 ... 10 more
Caused by: java.net.SocketTimeoutException: Accept timed out
 at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
 at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
 at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
 at java.net.PlainSocketImpl.accept(Unknown Source)
 at java.net.ServerSocket.implAccept(Unknown Source)
 at java.net.ServerSocket.accept(Unknown Source)
 at lbnl.actor.lib.net.Server.read(Server.java:225)
 at lbnl.actor.lib.Simulator._readFromServer(Simulator.java:382)
 at lbnl.actor.lib.Simulator.initialize(Simulator.java:781)
 at ptolemy.actor.Director.initialize(Director.java:943)
 at ptolemy.actor.Director.initialize(Director.java:912)
 at ptolemy.actor.sched.StaticSchedulingDirector.initialize(StaticSchedulingDirector.java:155)
 at ptolemy.domains.sdf.kernel.SDFDirector.initialize(SDFDirector.java:534)
 at ptolemy.actor.CompositeActor.initialize(CompositeActor.java:902)
 at ptolemy.actor.Manager.initialize(Manager.java:669)
 at ptolemy.actor.Manager.execute(Manager.java:340)
 at ptolemy.actor.Manager.run(Manager.java:1202)
 at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1760)

<Error from MATLAT>

Error occurred: simulateAndExit (line 2)
Error while obtaining sizes from MEX S-function 'establishBSDSocket' in 'controller/socketIO/establishSocket/establishBSDSocket'.
Cause:
    Error occurred: simulateAndExit (line 2)
    Invalid MEX-file 'C:\BCVTB\lib\matlab\establishBSDSocket.mexw64': can't find this module.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Could you check why this error was occurred? Another thing is that BCVTB runs well with MATLAB 2014a on Windows 7 Professional version (64bit and JRE 7). I don't know why this error is occurred on Windows 7 Home Premium and 8.1.

I am looking forward to hearing from you soon.

Best Regards
Yoon




Thierry Nouidui

unread,
Dec 1, 2014, 6:53:21 PM12/1/14
to bc...@googlegroups.com
You wrote that the BCVTB works fine on your Windows 7 Professional machine.
Could you please make sure on your Windows 7 Home Premium machine that you have the 64 bit version of JDK 7 installed.
 Please also check whether the MEX- compiler you were using on your Windows 7 professional machine is the same as the one installed on the Premium machine.
Thanks!
Thierry

--
You received this message because you are subscribed to the Google Groups "bcvtb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bcvtb+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
--------------------------------------
Thierry Stephane Nouidui, PhD

Simulation Research Group
Lawrence Berkeley National Laboratory
1 Cyclotron Road, MS 90R3147
Berkeley, CA 94720
(510) 495-2337 voice
email: TSNo...@lbl.gov
http://simulationresearch.lbl.gov
----------------------------------------

Ji Hoon Yoon

unread,
Dec 1, 2014, 7:09:19 PM12/1/14
to bc...@googlegroups.com
Dear Thierry Nouidui

I appreciate your fast response. As you pointed out, the problem is that JDK 7.1 was not installed in machines. Now, BCVTB works properly with MATLAB..

To make BCVTB works properly with MATLAB, these programs must be installed with BCVTB...

 1. Java Runtime Environment (JRE) 7.1
 2. Java Development Kit (JDK) 7.1
 3. Windows 7.1 SDK (Visual C/C++ 2010 compiler)
 

 Thanks a lot!!!

 Best Regards
  


2014년 12월 1일 월요일 오후 5시 53분 21초 UTC-6, Thierry Nouidui 님의 말:
Reply all
Reply to author
Forward
0 new messages