当前位置: 首页>>代码示例>>C++>>正文


C++ Experiment::__set_experimentOutputs方法代码示例

本文整理汇总了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();
}
开发者ID:Dhalwani,项目名称:airavata,代码行数:85,代码来源:createExperiment.cpp


注:本文中的Experiment::__set_experimentOutputs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。