Thanks for the quick answer! That's my problem. I will try to re-explain :

I have to initialize these variables (SLURM_JOB_ID, SLURM_NNODES, SLURM_NODEID 
& SLURM_LOCALID) but without using srun command. My client still wants to use 
his API to execute mulithreaded jobs on cluster environments. He just wants to 
replace some of his functionnalities with SLURM ones.
For example, to get the job id :

void get_job_id(int * job_id) {
        sprintf(getenv("SLURM_JOBID"), "%d", *job_id);
}

To do that, I need to initialize all the environment variables, but without 
using srun. I think I have to use the initialize_and_process_args function, but 
it is not in SLURM's includes (/usr/local/slurm-2.2.4/include).

More clear?

Best regards
_________________________________________________________________

Sébastien Pulvérail | Sogeti High Tech
Phone +33 (0) 5 34 36 92 98 | Mobile +33 (0) 6 84 44 73 26
[email protected]

3 Chemin de Laporte | Bât. AEROPARK | 31300 Toulouse | France
www.sogeti.com / www.sogeti-hightech.fr


_________________________________________________________________
 Please consider the environment before printing !

-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De 
la part de Jette, Moe
Envoyé : mercredi 8 juin 2011 18:14
À : [email protected]
Objet : RE: [slurm-dev] Link SLURM with an other API

I am not certain that I understand your question, but there are SLURM 
environment variables set with the information that you describe. See the 
section "OUTPUT ENVIRONMENT VARIABLES" in the srun man page.
________________________________________
From: [email protected] [[email protected]] On Behalf 
Of PULVERAIL Sébastien [[email protected]]
Sent: Wednesday, June 08, 2011 8:16 AM
To: [email protected]
Subject: [slurm-dev] Link SLURM with an other API

Hi all,

I am new to SLURM, and I hope my question is not stupid.

My client had developed his own API to manage processes and resources in a 
multithreading context on clusters environment. Now he wants to replace some 
modules by opensource ones as SLURM.

More precisely, he wants to use some SLURM functionnalities : query job id, 
rank node, etc. To do that, I need to init correctly all my structures, but 
functions I need are not in SLURM includes (slurm.h & cie). I precise the API 
must be linked with SLURM, and must not use SLURM sources.

So, how can I initialize job id, nodes & processes ranks, nodes & processes  
number, … ?

Thanks for your help.


Reply via email to