I have read a bit further. I think this can be a misunderstanding of documentation. It does not say you cannot submit jobs but that you should use this API to create and populate new jobs information. There is a structure that defines a job but it shouldn't be manipulated directly but through the API. Once the job is defined, you can submit it using a different API:
http://slurm.schedmd.com/launch_plugins.html Have a look at the last sentence on the first section. It states to have a look at the src/plugins/launch/slurm/launch_slurm.c file. Also, for a broader picture, have a look at this page on the Developers section: http://slurm.schedmd.com/documentation.html Specially on the Design subsection where the process of creating and submitting a job is further described (it consists of multiple steps and APIs). Hope this helps Enviado desde mi iPad > El 7/11/2014, a las 16:08, Всеволод Никоноров <[email protected]> > escribió: > > > Hello Walter, > > Maybe you could just use "system" function? > > #include <cstdlib> > #include <cstdio> > int main (int argc, char** argv) > { > printf ("begin\n"); > system ("sleep 1"); > printf ("end\n"); > } > > Place you sbatch call instead my "sleep 1", shouldn't this do what you want? > > 06.11.2014, 09:49, "Walter Landry" <[email protected]>: >> Hello Everyone, >> >> What is the recommended way for a C++ program to submit a job? О©╫The >> API documentation says >> >> О©╫О©╫SLURM job steps involve numerous interactions with the slurmd >> О©╫О©╫daemon. The job step creation is only the first step in the >> О©╫О©╫process. We don't advise direct user creation of job steps, but >> О©╫О©╫include the information here for completeness. >> >> Should I use system("srun")? О©╫DRMAA? >> >> Thank you, >> Walter Landry >> [email protected] > > --О©╫ > Vsevolod Nikonorov, JSC NIKIET > О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫ О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫, О©╫О©╫О©╫ > О©╫О©╫О©╫О©╫О©╫О©╫
