Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/NHERI-SimCenter/EE-UQ
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckenna committed Jun 28, 2019
2 parents ee13eaa + c258fd2 commit 6056632
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
18 changes: 18 additions & 0 deletions RemoteApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ RemoteApplication::uploadDirReturn(bool result)
parameters["errorFile"]="dakota.err";
parameters["driverFile"]="workflow_driver";
parameters["modules"]="petsc";
for (auto parameterName : extraParameters.keys())
{
parameters[parameterName] = extraParameters[parameterName];
}
job["parameters"]=parameters;

QDir theDirectory(tempDirectory);
Expand All @@ -351,6 +355,10 @@ RemoteApplication::uploadDirReturn(bool result)
QJsonObject inputs;

inputs["inputDirectory"]=remoteDirectory;
for (auto inputName : extraInputs.keys())
{
inputs[inputName] = extraInputs[inputName];
}
job["inputs"]=inputs;

// disable the button while the job is being uploaded and started
Expand Down Expand Up @@ -394,3 +402,13 @@ RemoteApplication::setNumTasks(int numTasks) {
numProcessorsLineEdit->setText(QString::number(numTasks));
}

void RemoteApplication::setExtraInputs(QMap<QString, QString> extraInputs)
{
this->extraInputs = extraInputs;
}

void RemoteApplication::setExtraParameters(QMap<QString, QString> extraParameters)
{
this->extraParameters = extraParameters;
}

7 changes: 7 additions & 0 deletions RemoteApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include <Application.h>
#include <QPushButton>
#include <QJsonObject>
#include <QMap>

class RemoteService;

class QLineEdit;
Expand All @@ -60,6 +62,8 @@ class RemoteApplication : public Application
bool inputFromJSON(QJsonObject &rvObject);
bool setupDoneRunApplication(QString &tmpDirectory, QString &inputFile);
void setNumTasks(int numTasks);
void setExtraInputs(QMap<QString, QString> extraInputs);
void setExtraParameters(QMap<QString, QString> extraParameters);

signals:
void processResults(QString &, QString &);
Expand Down Expand Up @@ -98,6 +102,9 @@ public slots:
RemoteService *theRemoteService;
QString workflowScriptName;
QString shortDirName;
QMap<QString, QString> extraInputs;
QMap<QString, QString> extraParameters;

};

#endif // REMOTE_APPLICATION_H

0 comments on commit 6056632

Please sign in to comment.