Hi Andy, It is almost correct. I don't really use SLURM to manage the jobs ; I use SLURM to get information, but it is my client's API which will manage the jobs. So you're right, the client's code will be a layer above SLURM.
I'm sorry but I don't really see how these outputs will help me? 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 Riebs, Andy Envoyé : jeudi 9 juin 2011 14:05 À : [email protected] Objet : RE: [slurm-dev] Link SLURM with an other API Sébastien, Is it correct that you are using Slurm to initiate and manage the jobs, and that the client's code will be in a layer above Slurm? If that is the case, perhaps the output of `salloc` (when the Slurm job is initiated) or `squeue` (after the job has been queued) would provide the necessary information? Best regards, Andy -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of PULVERAIL Sébastien Sent: Thursday, June 09, 2011 4:33 AM To: [email protected] Subject: RE: [slurm-dev] Link SLURM with an other API 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.
