mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixed Octave Hang after large dataset writes
https://github.com/OPM/ResInsight/issues/192
This commit is contained in:
@@ -78,10 +78,12 @@ void setEclipseProperty(const Matrix& propertyFrames, const QString &hostName, q
|
|||||||
while(socket.bytesToWrite() && socket.state() == QAbstractSocket::ConnectedState)
|
while(socket.bytesToWrite() && socket.state() == QAbstractSocket::ConnectedState)
|
||||||
{
|
{
|
||||||
// octave_stdout << "Bytes to write: " << socket.bytesToWrite() << std::endl;
|
// octave_stdout << "Bytes to write: " << socket.bytesToWrite() << std::endl;
|
||||||
socket.waitForBytesWritten(riOctavePlugin::longTimeOutMilliSecs);
|
socket.waitForBytesWritten(riOctavePlugin::shortTimeOutMilliSecs);
|
||||||
OCTAVE_QUIT;
|
OCTAVE_QUIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//octave_stdout << " Socket write completed" << std::endl;
|
||||||
|
|
||||||
if (socket.bytesToWrite() && socket.state() != QAbstractSocket::ConnectedState)
|
if (socket.bytesToWrite() && socket.state() != QAbstractSocket::ConnectedState)
|
||||||
{
|
{
|
||||||
error("riSetActiveCellProperty : ResInsight refused to accept the data. Maybe the dimensions or porosity model is wrong");
|
error("riSetActiveCellProperty : ResInsight refused to accept the data. Maybe the dimensions or porosity model is wrong");
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ void setEclipseProperty(const NDArray& propertyFrames, const QString &hostName,
|
|||||||
while(socket.bytesToWrite() && socket.state() == QAbstractSocket::ConnectedState)
|
while(socket.bytesToWrite() && socket.state() == QAbstractSocket::ConnectedState)
|
||||||
{
|
{
|
||||||
// octave_stdout << "Bytes to write: " << socket.bytesToWrite() << std::endl << std::flush;
|
// octave_stdout << "Bytes to write: " << socket.bytesToWrite() << std::endl << std::flush;
|
||||||
socket.waitForBytesWritten(riOctavePlugin::longTimeOutMilliSecs);
|
socket.waitForBytesWritten(riOctavePlugin::shortTimeOutMilliSecs);
|
||||||
OCTAVE_QUIT;
|
OCTAVE_QUIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
namespace riOctavePlugin
|
namespace riOctavePlugin
|
||||||
{
|
{
|
||||||
const int connectTimeOutMilliSecs = 5000;
|
const int connectTimeOutMilliSecs = 5000;
|
||||||
const int shortTimeOutMilliSecs = 5000;
|
const int shortTimeOutMilliSecs = 1000;
|
||||||
const int longTimeOutMilliSecs = 6000000;
|
const int longTimeOutMilliSecs = 6000000;
|
||||||
|
|
||||||
const int socketMaxByteCount = 100000;
|
const int socketMaxByteCount = 100000;
|
||||||
|
|||||||
Reference in New Issue
Block a user