Skip to content
Snippets Groups Projects
Commit 8237166e authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Fix merge conflict

parents 2d8b6c1f 85d907d4
No related branches found
No related tags found
1 merge request!288M214003/develop
Pipeline #89250 passed
...@@ -184,6 +184,8 @@ libcdo_la_SOURCES = after_dvtrans.cc \ ...@@ -184,6 +184,8 @@ libcdo_la_SOURCES = after_dvtrans.cc \
mpim_grid/gridreference.h \ mpim_grid/gridreference.h \
mpim_grid/mpim_grid.cc \ mpim_grid/mpim_grid.cc \
mpim_grid/mpim_grid.h \ mpim_grid/mpim_grid.h \
mpim_grid/grid_options.cc \
mpim_grid/grid_options.h \
mpmo.cc \ mpmo.cc \
mpmo.h \ mpmo.h \
mpmo_color.cc \ mpmo_color.cc \
......
...@@ -174,12 +174,12 @@ get_env_vars() ...@@ -174,12 +174,12 @@ get_env_vars()
->add_help("The largest size (in bytes) core file that may be created."); ->add_help("The largest size (in bytes) core file that may be created.");
CLIOptions::envvar("CDO_DOWNLOAD_PATH") CLIOptions::envvar("CDO_DOWNLOAD_PATH")
->add_effect([&](const std::string &downloadPath) { cdo::DownloadPath = downloadPath; }) ->add_effect([&](const std::string &downloadPath) { DownloadPath = downloadPath; })
->describe_argument("path") ->describe_argument("path")
->add_help("Path where CDO can store downloads."); ->add_help("Path where CDO can store downloads.");
CLIOptions::envvar("CDO_ICON_GRIDS") CLIOptions::envvar("CDO_ICON_GRIDS")
->add_effect([&](const std::string &iconGrid) { cdo::IconGrids = iconGrid; }) ->add_effect([&](const std::string &iconGrid) { IconGrids = iconGrid; })
->describe_argument("path") ->describe_argument("path")
->add_help("Root directory of the installed ICON grids (e.g. /pool/data/ICON)."); ->add_help("Root directory of the installed ICON grids (e.g. /pool/data/ICON).");
......
...@@ -27,8 +27,6 @@ namespace cdo ...@@ -27,8 +27,6 @@ namespace cdo
const char *progname; const char *progname;
const char *Version = "Climate Data Operators version " VERSION " (https://mpimet.mpg.de/cdo)"; const char *Version = "Climate Data Operators version " VERSION " (https://mpimet.mpg.de/cdo)";
std::string FileSuffix; std::string FileSuffix;
std::string DownloadPath;
std::string IconGrids;
bool stdinIsTerminal = false; bool stdinIsTerminal = false;
bool stdoutIsTerminal = false; bool stdoutIsTerminal = false;
bool stderrIsTerminal = false; bool stderrIsTerminal = false;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include "mpim_grid/grid_options.h"
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" /* _FILE_OFFSET_BITS influence off_t */ #include "config.h" /* _FILE_OFFSET_BITS influence off_t */
...@@ -16,8 +17,6 @@ namespace cdo ...@@ -16,8 +17,6 @@ namespace cdo
extern const char *progname; extern const char *progname;
extern const char *Version; extern const char *Version;
extern std::string FileSuffix; extern std::string FileSuffix;
extern std::string DownloadPath;
extern std::string IconGrids;
extern bool stdinIsTerminal; extern bool stdinIsTerminal;
extern bool stdoutIsTerminal; extern bool stdoutIsTerminal;
extern bool stderrIsTerminal; extern bool stderrIsTerminal;
......
#include <string>
std::string DownloadPath;
std::string IconGrids;
#ifndef GRID_OPTIONS
#define GRID_OPTIONS
#include <string>
extern std::string IconGrids;
extern std::string DownloadPath;
#endif
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
#include <cdi.h> #include <cdi.h>
#include "cdi_uuid.h" #include "cdi_uuid.h"
#include "cdi_lockedIO.h"
#include "grid_options.h"
#include "gridreference.h" #include "gridreference.h"
#include "cdo_output.h" #include "cdo_output.h"
#include <mpim_grid.h> #include <mpim_grid.h>
#include "cdi_lockedIO.h"
#include "cdo_options.h"
// callback function for curl for writing the network retrieved grid file // callback function for curl for writing the network retrieved grid file
#ifdef HAVE_LIBCURL #ifdef HAVE_LIBCURL
...@@ -266,9 +266,9 @@ referenceToGrid(int gridID1) ...@@ -266,9 +266,9 @@ referenceToGrid(int gridID1)
char griddir[8192] = { 0 }; char griddir[8192] = { 0 };
char gridfilepath[8192] = { 0 }; char gridfilepath[8192] = { 0 };
if (!cdo::IconGrids.empty() && griduri[0]) if (!IconGrids.empty() && griduri[0])
{ {
if (search_directory(cdo::IconGrids.c_str())) cdo_abort("CDO_ICON_GRIDS not found: %s!", cdo::IconGrids); if (search_directory(IconGrids.c_str())) cdo_abort("CDO_ICON_GRIDS not found: %s!", IconGrids);
auto wpath = griduri; auto wpath = griduri;
if (strncmp(griduri, "http://", 7) == 0) if (strncmp(griduri, "http://", 7) == 0)
wpath += 7; wpath += 7;
...@@ -279,7 +279,7 @@ referenceToGrid(int gridID1) ...@@ -279,7 +279,7 @@ referenceToGrid(int gridID1)
auto gridpath = strchr(wpath, '/'); auto gridpath = strchr(wpath, '/');
if (gridpath) if (gridpath)
{ {
strcpy(griddir, cdo::IconGrids.c_str()); strcpy(griddir, IconGrids.c_str());
strcpy(gridfilepath, griddir); strcpy(gridfilepath, griddir);
strcat(gridfilepath, gridpath); strcat(gridfilepath, gridpath);
status = search_file(griddir, gridfilepath); status = search_file(griddir, gridfilepath);
...@@ -290,9 +290,9 @@ referenceToGrid(int gridID1) ...@@ -290,9 +290,9 @@ referenceToGrid(int gridID1)
if (gridfilepath[0] == 0) if (gridfilepath[0] == 0)
{ {
if (!cdo::DownloadPath.empty()) if (!DownloadPath.empty())
{ {
strcpy(griddir, cdo::DownloadPath.c_str()); strcpy(griddir, DownloadPath.c_str());
strcat(griddir, "/"); strcat(griddir, "/");
status = search_directory(griddir); status = search_directory(griddir);
......
...@@ -148,18 +148,12 @@ Process::add_pipe_in_stream() ...@@ -148,18 +148,12 @@ Process::add_pipe_in_stream()
void void
Process::add_parent(const std::shared_ptr<Process> &parentProcess) Process::add_parent(const std::shared_ptr<Process> &parentProcess)
{ {
parentProcesses.push_back(parentProcess);
m_posInParent = parentProcess->inputStreams.size() - 1; m_posInParent = parentProcess->inputStreams.size() - 1;
add_pipe_out_stream(); outputStreams.push_back(parentProcess->inputStreams[m_posInParent]);
}
void
Process::add_pipe_out_stream()
{
outputStreams.push_back(parentProcesses[0]->inputStreams[m_posInParent]);
m_streamCnt++; m_streamCnt++;
} }
void * void *
execute(void *process) execute(void *process)
{ {
......
...@@ -42,7 +42,6 @@ public: ...@@ -42,7 +42,6 @@ public:
const CdoModule &m_module; const CdoModule &m_module;
int m_posInParent; int m_posInParent;
std::vector<std::shared_ptr<Process>> childProcesses; std::vector<std::shared_ptr<Process>> childProcesses;
std::vector<std::shared_ptr<Process>> parentProcesses;
std::vector<CdoStreamID> inputStreams; std::vector<CdoStreamID> inputStreams;
std::vector<CdoStreamID> outputStreams; std::vector<CdoStreamID> outputStreams;
...@@ -63,7 +62,7 @@ public: ...@@ -63,7 +62,7 @@ public:
/* Member Functions */ /* Member Functions */
Process(int p_ID, const std::string &p_operatorName, const std::vector<std::string> &p_arguments, const CdoModule &p_module); Process(int p_ID, const std::string &p_operatorName, const std::vector<std::string> &p_arguments, const CdoModule &p_module);
virtual ~Process() {} virtual ~Process() {Debug(PROCESS,"destruction of %s",operatorName);}
pthread_t start_thread(); pthread_t start_thread();
virtual void init() = 0; virtual void init() = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment