Octave: Use long timeout (60 s) for all socket data transfer, as socket

data transfer is dependent on several layers of network optimizations.
This commit is contained in:
Magne Sjaastad 2013-09-30 20:54:31 +02:00
parent 567f16ad43
commit 2372cf86ca
21 changed files with 32 additions and 32 deletions

View File

@ -33,7 +33,7 @@ void getActiveCellCenters(NDArray& cellCenterValues, const QString &hostName, qu
while (socket.bytesAvailable() < (int)(2 * sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -33,7 +33,7 @@ void getActiveCellCorners(NDArray& cellCornerValues, const QString &hostName, qu
while (socket.bytesAvailable() < (int)(2 * sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -33,7 +33,7 @@ void getActiveCellInfo(int32NDArray& activeCellInfo, const QString &hostName, qu
while (socket.bytesAvailable() < (int)(2*sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -38,7 +38,7 @@ void getActiveCellProperty(Matrix& propertyFrames, const QString &serverName, qu
while (socket.bytesAvailable() < (int)(2*sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -31,7 +31,7 @@ void getCaseGroups(std::vector<QString>& groupNames, std::vector<int>& groupIds,
// Get response. First wait for the header
while (socket.bytesAvailable() < (int)(2*sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for data: ") + socket.errorString()).toLatin1().data());
return;
@ -49,7 +49,7 @@ void getCaseGroups(std::vector<QString>& groupNames, std::vector<int>& groupIds,
// Get response. Read all data for command
while (socket.bytesAvailable() < (int)byteCount)
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for data: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -33,7 +33,7 @@ void getCases(std::vector<qint64>& caseIds, std::vector<QString>& caseNames, std
while (socket.bytesAvailable() < (int)(sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;
@ -45,7 +45,7 @@ void getCases(std::vector<qint64>& caseIds, std::vector<QString>& caseNames, std
while (socket.bytesAvailable() < (int)(byteCount))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for data: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -33,7 +33,7 @@ void getCellCenters(NDArray& cellCenterValues, const QString &hostName, quint16
while (socket.bytesAvailable() < (int)(5 * sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -33,7 +33,7 @@ void getCellCorners(NDArray& cellCornerValues, const QString &hostName, quint16
while (socket.bytesAvailable() < (int)(5 * sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -33,7 +33,7 @@ void getCoarseningInfo(int32NDArray& coarseningInfo, const QString &hostName, qu
while (socket.bytesAvailable() < (int)(sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -33,7 +33,7 @@ void getCurrentCase(qint64& caseId, QString& caseName, QString& caseType, qint64
while (socket.bytesAvailable() < (int)(sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;
@ -45,7 +45,7 @@ void getCurrentCase(qint64& caseId, QString& caseName, QString& caseType, qint64
while (socket.bytesAvailable() < (int)(byteCount))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for data: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -33,7 +33,7 @@ void getGridDimensions(int32NDArray& gridDimensions, const QString &hostName, qu
while (socket.bytesAvailable() < (int)(sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -38,7 +38,7 @@ void getGridProperty(NDArray& propertyFrames, const QString &serverName, quint16
while (socket.bytesAvailable() < (int)(4*sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -33,7 +33,7 @@ void getMainGridDimensions(int32NDArray& gridDimensions, const QString &hostName
while (socket.bytesAvailable() < (int)(3*sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -35,7 +35,7 @@ void getPropertyNames(std::vector<QString>& propNames, std::vector<QString>& pro
while (socket.bytesAvailable() < (int)(sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;
@ -50,7 +50,7 @@ void getPropertyNames(std::vector<QString>& propNames, std::vector<QString>& pro
while (socket.bytesAvailable() < (int)(byteCount))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for data: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -33,7 +33,7 @@ void getSelectedCases(std::vector<qint64>& caseIds, std::vector<QString>& caseNa
while (socket.bytesAvailable() < (int)(sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;
@ -45,7 +45,7 @@ void getSelectedCases(std::vector<qint64>& caseIds, std::vector<QString>& caseNa
while (socket.bytesAvailable() < (int)(byteCount))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for data: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -41,7 +41,7 @@ void getTimeStepDates( std::vector<qint32>& yearValues,
while (socket.bytesAvailable() < (int)(sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;
@ -53,7 +53,7 @@ void getTimeStepDates( std::vector<qint32>& yearValues,
while (socket.bytesAvailable() < (int)(byteCount))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for data: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -14,7 +14,7 @@ void getTimeStepDates( std::vector<double>& decimalDays,
QTcpSocket socket;
socket.connectToHost(serverName, serverPort);
if (!socket.waitForConnected(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForConnected(riOctavePlugin::connectTimeOutMilliSecs))
{
error((("Connection: ") + socket.errorString()).toLatin1().data());
return;
@ -35,7 +35,7 @@ void getTimeStepDates( std::vector<double>& decimalDays,
while (socket.bytesAvailable() < (int)(sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;
@ -47,7 +47,7 @@ void getTimeStepDates( std::vector<double>& decimalDays,
while (socket.bytesAvailable() < (int)(byteCount))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for data: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -43,7 +43,7 @@ void getWellCells( std::vector<int>& cellIs,
while (socket.bytesAvailable() < (int)(sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;
@ -60,7 +60,7 @@ void getWellCells( std::vector<int>& cellIs,
while (socket.bytesAvailable() < (int)(byteCount))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for data: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -35,7 +35,7 @@ void getWellNames(std::vector<QString>& wellNames, const QString &hostName, quin
while (socket.bytesAvailable() < (int)(sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;
@ -50,7 +50,7 @@ void getWellNames(std::vector<QString>& wellNames, const QString &hostName, quin
while (socket.bytesAvailable() < (int)(byteCount))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for data: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -43,7 +43,7 @@ void getWellStatus(std::vector<QString>& wellTypes, std::vector<int>& wellStatus
while (socket.bytesAvailable() < (int)(sizeof(quint64)))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
return;
@ -55,7 +55,7 @@ void getWellStatus(std::vector<QString>& wellTypes, std::vector<int>& wellStatus
while (socket.bytesAvailable() < (int)(byteCount))
{
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForReadyRead(riOctavePlugin::longTimeOutMilliSecs))
{
error((("Waiting for data: ") + socket.errorString()).toLatin1().data());
return;

View File

@ -9,7 +9,7 @@ void setEclipseProperty(const NDArray& propertyFrames, const QString &hostName,
QTcpSocket socket;
socket.connectToHost(hostName, port);
if (!socket.waitForConnected(riOctavePlugin::shortTimeOutMilliSecs))
if (!socket.waitForConnected(riOctavePlugin::connectTimeOutMilliSecs))
{
error((("Connection: ") + socket.errorString()).toLatin1().data());
return;