Hello all,
I am creating an experiment in php using
$input = new InputDataObjectType();
$input->name = "input";
$input->value = $inp;
$input->type = DataType::STRING;
$exInputs = array($input);
$output = new OutputDataObjectType();
$output->name = "output";
$output->value = "";
$output->type = DataType::STDOUT;
$err = new OutputDataObjectType();
$err->name = "output_err";
$err->value = "";
$err->type = DataType::STDERR;
$exOutputs = array($output,$err);

/* Create Experiment: needs to update using unique project ID. */
$user = $usrName;
$exp_name = $expName;
$proj = $projId;

$experiment = new Experiment();
$experiment->projectID = $proj;
$experiment->userName = $user;
$experiment->name = $exp_name;
$experiment->applicationId = $appId;
$experiment->experimentInputs = $exInputs;
$experiment->experimentOutputs = $exOutputs;
 $computeResources  =
$airavataclient>getAvailableAppInterfaceComputeResources($execId);
    if(isset($computeResources) && !empty($computeResources)){
     foreach ($computeResources as $cmR) {
     if($cmR == "localhost"){
$cmRST = new ComputationalResourceScheduling();
$cmRST->resourceHostId = "localhost";
$cmRST->computationalProjectAccount = "ixxi-2013";
$cmRST->nodeCount = 1;
$cmRST->numberOfThreads = 1;
$cmRST->queueName = "normal";
$cmRST->totalCPUCount = 1;
$cmRST->wallTimeLimit = 30;
$cmRST->jobStartTime = 0;
$cmRST->totalPhysicalMemory = 1;
$userConfigurationData = new UserConfigurationData();
$userConfigurationData->airavataAutoSchedule = 0;
$userConfigurationData>overrideManualScheduledParams = 0;
$userConfigurationData->computationalResourceScheduling = $cmRST;
$experiment->userConfigurationData = $userConfigurationData;
     }
     }
    }
$expId = $airavataclient->createExperiment($experiment);

but when I am launching the experiment I'm getting arrayindexoutofbound
error but then I created an experiment in java and used that experiment Id
to launch experiment in php and its working fine. So, then again I tried to
create experiment in php and launch it using java api and I am getting the
same error in java also.
So, it seems like I am missing something during creating experiment in php.
As the code samples given for php in airavata are out-of-date so they are
not working.
Any suggestions ??

-- 
Regards,
*Abhishek Kapoor*
*Under Graduate Student*
*Indian Institute of Technology Kharagpur.*

Reply via email to