Hi all,

After looking at the problem with Sergio in a separate mail, we found
that the problem was "slurm_init_job_desc_msg" call. It sets default
values to all the objects of job_desc_msg_t, so it was overwriting
previous values. It has been moved just after the variable
declaration, and now everything works as expected.

I am writing this mail so anybody with the same problem landing on
this thread can read our solution.

Best regards,


Manuel

2016-05-03 12:03 GMT+02:00 Sergio Iserte <sise...@uji.es>:
> Hello everyone,
>
> I am developing an application that calls the Slurm API functions. In my
> first attemps I have been working with this code:
>>
>>
>> job_desc_msg_t job;
>> job.name=(char *)"new job";
>> job.min_nodes = 1;
>> job.user_id = getuid();
>> job.group_id = getgid();
>> slurm_init_job_desc_msg(&job);
>> resource_allocation_response_msg_t* slurm_alloc_msg_ptr;
>> if (!(slurm_alloc_msg_ptr =slurm_allocate_resources_blocking(&job, 0,
>> NULL))) {
>>      slurm_perror ((char *)"slurm_allocate_resources_blocking error");
>>      exit (1);
>>  }
>
> Where I declare a new job, give some information and finally ask for
> resources.
>
> What the controller daemon writes in the log is:
>>
>>
>> slurmctld: debug2: sched: Processing RPC: REQUEST_RESOURCE_ALLOCATION from
>> uid=16777240
>> slurmctld: debug3: JobDesc: user_id=4294967294 job_id=N/A partition=(null)
>> name=(null)
>> slurmctld: debug3:    cpus=-1-4294967294 pn_min_cpus=-1 core_spec=-1
>
>
> ... and it finishes with ...
>
>> slurmctld: _validate_job_desc: job failed to specify User
>> slurmctld: _slurm_rpc_allocate_resources: Invalid user id
>
>
> I do not know why the user_id changes when the message is going to be
> processed.
>
> Thank you.
>
> --
> Sergio Iserte
> High Performance Computing & Architectures (HPCA)
> Department of Computer Science and Engineering (DICC)
> Universitat Jaume I (UJI), Spain.
>

Reply via email to