本文整理汇总了C++中Experiment::__set_experimentOutputs方法的典型用法代码示例。如果您正苦于以下问题:C++ Experiment::__set_experimentOutputs方法的具体用法?C++ Experiment::__set_experimentOutputs怎么用?C++ Experiment::__set_experimentOutputs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Experiment
的用法示例。
在下文中一共展示了Experiment::__set_experimentOutputs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char **argv)
{
int airavata_port, airavata_timeout;
string airavata_server;
char* cfgfile;
cfgfile = "./airavata-client-properties.ini";
readConfigFile(cfgfile, airavata_server, airavata_port, airavata_timeout);
airavata_server.erase(0,1);
airavata_server.erase(airavata_server.length()-1,1);
boost::shared_ptr<TSocket> socket(new TSocket(airavata_server, airavata_port));
socket->setSendTimeout(airavata_timeout);
boost::shared_ptr<TTransport> transport(new TBufferedTransport(socket));
boost::shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport));
AiravataClient airavataclient(protocol);
transport->open();
if(argc !=4){
cout << "Usage: ./createExperiment <username> <experiment_name> <project_ID>";
return 0;
}
/* ComputationalResourceScheduling data for Trestles*/
ComputationalResourceScheduling cmRST;
cmRST.__set_resourceHostId("trestles.sdsc.edu");
cmRST.__set_computationalProjectAccount("sds128");
cmRST.__set_totalCPUCount(1);
cmRST.__set_nodeCount(1);
cmRST.__set_numberOfThreads(0);
cmRST.__set_queueName("normal");
cmRST.__set_wallTimeLimit(15);
cmRST.__set_jobStartTime(0);
cmRST.__set_totalPhysicalMemory(0);
UserConfigurationData userConfigurationData;
userConfigurationData.__set_airavataAutoSchedule(0);
userConfigurationData.__set_overrideManualScheduledParams(0);
userConfigurationData.__set_computationalResourceScheduling(cmRST);
/*Application ID for Trestles */
char* appId = "SimpleEcho2";
/* Experiment input and output data. */
DataObjectType input;
input.__set_key("echo_input");
input.__set_value("echo_output=Hello World");
input.__set_type(DataType::STRING);
std::vector<DataObjectType> exInputs;
exInputs.push_back(input);
DataObjectType output;
output.__set_key("echo_output");
output.__set_value("");
output.__set_type(DataType::STRING);
std::vector<DataObjectType> exOutputs;
exOutputs.push_back(output);
char* user = argv[1];
char* exp_name = argv[2];
char* proj = argv[3];
Experiment experiment;
experiment.__set_projectID(proj);
experiment.__set_userName(user);
experiment.__set_name(exp_name);
experiment.__set_applicationId(appId);
experiment.__set_userConfigurationData(userConfigurationData);
experiment.__set_experimentInputs(exInputs);
experiment.__set_experimentOutputs(exOutputs);
string _return = "";
airavataclient.createExperiment(_return, experiment);
if (_return!="")
{
cout << "Experiment " << _return <<" created! \n ";
}
else
{
cout << "Failed to create experiment. \n";
}
transport->close();
}