Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
91a487d9
Commit
91a487d9
authored
Dec 16, 2020
by
Uwe Schulzweida
Browse files
Removed unused declaration of processNumsActive().
parent
5c24e63c
Pipeline
#5530
passed with stages
in 15 minutes and 50 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/fileStream.cc
View file @
91a487d9
...
...
@@ -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!"
);
...
...
src/pipe.cc
View file @
91a487d9
...
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment