Skip to content

Bug7263/pmix setup app api#11

Open
karasevb wants to merge 7 commits intoslurm/slurm-20.11from
bug7263/pmix_setup_app_api_v2
Open

Bug7263/pmix setup app api#11
karasevb wants to merge 7 commits intoslurm/slurm-20.11from
bug7263/pmix_setup_app_api_v2

Conversation

@karasevb
Copy link
Owner

@karasevb karasevb commented Dec 4, 2020

No description provided.

@karasevb
Copy link
Owner Author

karasevb commented Dec 4, 2020

@artpol84, please review

static bool setup_done = false;
uint32_t nnodes, ntasks, **tids;
uint16_t *task_cnt;
char *process_mapping = NULL;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
char *process_mapping = NULL;

Comment on lines 239 to +240
setenvf(env, PMIXP_SLURM_MAPPING_ENV, "%s", process_mapping);
xfree(process_mapping);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
setenvf(env, PMIXP_SLURM_MAPPING_ENV, "%s", process_mapping);
xfree(process_mapping);

return errno;
}

if (chown(path, (uid_t) pmixp_info_jobuid(), (gid_t) -1) < 0) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we use pmixp_info_jobuid() but inside it return the correct value?
This is what pmixp_info is for

{
xassert(_pmixp_job_info.magic == PMIXP_INFO_MAGIC);
return _pmixp_job_info.timeout;
xassert(_pmixp_stepd_info.proc_info.magic == PMIXP_INFO_MAGIC);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move all static functions to the pmixp_info.c as Danny asked long time ago.


#ifdef PMIX_SERVER_TMPDIR
PMIXP_KVP_ADD(kvp, PMIX_SERVER_TMPDIR,
pmixp_info_tmpdir_lib(), PMIX_STRING);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job of pmixp_info_tmpdir_lib() is to return the proper value.
I don't see why we need to change function prototypes instead of adjusting pmixp_info to accommodate srun.

#endif
char nspace[PMIXP_MAX_NSLEN];
slurm_step_id_t step_id; /* Current step id (or NO_VAL) */
char *lib_tmpdir;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
char *lib_tmpdir;
uint32_t nnodes; /* number of nodes in current step */
uint32_t nnodes_job; /* number of nodes in current job */
uint32_t ntasks; /* total number of tasks in current step */
char *lib_tmpdir;
char *spool_dir;
uid_t uid;
gid_t gid;

Comment on lines 76 to 78
char *spool_dir;
uid_t uid;
gid_t gid;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
char *spool_dir;
uid_t uid;
gid_t gid;

Comment on lines 59 to 61
uint32_t nnodes; /* number of nodes in current step */
uint32_t nnodes_job; /* number of nodes in current job */
uint32_t ntasks; /* total number of tasks in current step */
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uint32_t nnodes; /* number of nodes in current step */
uint32_t nnodes_job; /* number of nodes in current job */
uint32_t ntasks; /* total number of tasks in current step */

int pmixp_srun_init(const mpi_plugin_client_info_t *job, char ***env)
{
int rc;

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed, proc mapping generation should go here!

PMIXP_DEBUG("called");
proc.rank = pmixp_lib_get_wildcard();
strncpy(proc.nspace, _pmixp_job_info.nspace, PMIXP_MAX_NSLEN);
strncpy(proc.nspace, _pmixp_stepd_info.proc_info.nspace,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no direct access to pmixp_info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants