Conversation
this function should help to check the max size of env value before append the new one
|
@artpol84, please review |
| static bool setup_done = false; | ||
| uint32_t nnodes, ntasks, **tids; | ||
| uint16_t *task_cnt; | ||
| char *process_mapping = NULL; |
There was a problem hiding this comment.
| char *process_mapping = NULL; |
| setenvf(env, PMIXP_SLURM_MAPPING_ENV, "%s", process_mapping); | ||
| xfree(process_mapping); |
There was a problem hiding this comment.
| 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) { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
| 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; |
| char *spool_dir; | ||
| uid_t uid; | ||
| gid_t gid; |
There was a problem hiding this comment.
| char *spool_dir; | |
| uid_t uid; | |
| gid_t gid; |
| 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 */ |
There was a problem hiding this comment.
| 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; | ||
|
|
There was a problem hiding this comment.
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, |
No description provided.