Commit 91a487d9 authored by Uwe Schulzweida's avatar Uwe Schulzweida

Removed unused declaration of processNumsActive().

parent 5c24e63c
Pipeline #5530 passed with stages
in 15 minutes and 50 seconds
......@@ -14,6 +14,10 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#ifdef HAVE_CONFIG_H
#include "config.h" /* HAVE_NC4HDF5_THREADSAFE */
#endif
#include <sys/stat.h> /* stat */
#include <cdi.h>
......@@ -29,6 +33,7 @@
#include "commandline.h"
bool FileStream::TimerEnabled = false;
static bool inputFileTypeIsNetCDF4 = false;
FileStream::FileStream(const std::string &p_fileName) : m_filename(p_fileName)
{
......@@ -49,6 +54,8 @@ FileStream::openRead()
if (CdoDefault::FileType == CDI_UNDEFID) CdoDefault::FileType = m_filetype;
m_fileID = fileID;
if (m_filetype == CDI_FILETYPE_NC4 || m_filetype == CDI_FILETYPE_NC4C) inputFileTypeIsNetCDF4 = true;
Debug(FILE_STREAM, "Set number of worker to %d", Options::numStreamWorker);
if (Options::numStreamWorker > 0) streamDefNumWorker(fileID, Options::numStreamWorker);
......@@ -64,12 +71,21 @@ FileStream::openWrite(int p_filetype)
{
struct stat stbuf;
const auto rstatus = stat(m_name.c_str(), &stbuf);
/* If permanent file already exists, query user whether to overwrite or exit */
// If permanent file already exists, query user whether to overwrite or exit
if (rstatus != -1) query_user_exit(m_name.c_str());
}
if (p_filetype == CDI_UNDEFID) p_filetype = CDI_FILETYPE_GRB;
// TODO FIX THIS: if(FileStream::timersEnabled()) timer_start(timer_write);
/*
#ifndef HAVE_NC4HDF5_THREADSAFE
bool outputFileTypeIsNetCDF4 = (p_filetype == CDI_FILETYPE_NC4 || p_filetype == CDI_FILETYPE_NC4C);
if (inputFileTypeIsNetCDF4 && outputFileTypeIsNetCDF4 && processNums() > 1)
{
cdoWarning("Using a non-thread-safe NetCDF4/HDF5 library in a multi-threaded environment may lead to erroneous results!");
cdoWarning("Use a thread-safe NetCDF4/HDF5 library or the CDO option -L to avoid such errors.");
}
#endif
*/
// TODO FIX THIS: if (FileStream::timersEnabled()) timer_start(timer_write);
openLock();
const auto fileID = streamOpenWrite(m_filename.c_str(), p_filetype);
......@@ -163,10 +179,7 @@ FileStream::inqVlist()
if (FileStream::timersEnabled()) timer_start(timer_read);
const auto vlistID = streamInqVlistLocked(m_fileID);
if (FileStream::timersEnabled()) timer_stop(timer_read);
if (vlistID == -1)
{
cdoAbort("Couldn't read data from input fileID %d!", m_fileID);
}
if (vlistID == -1) cdoAbort("Couldn't read data from input fileID %d!", m_fileID);
const auto nsubtypes = vlistNsubtypes(vlistID);
if (nsubtypes > 1) cdoWarning("Subtypes are unsupported, the processing results are possibly wrong!");
......
......@@ -126,8 +126,6 @@ pipe_t::pipeDefVlist(int &target_vlistID, const int new_vlistID)
constexpr std::chrono::milliseconds TIMEOUT = std::chrono::milliseconds(1000);
#define MAX_WAIT_CYCLES 3600
int processNumsActive(void);
int
pipe_t::pipeInqVlist(int &p_vlistID)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment