Changeset 17 for trunk/slurm_drmaa/job.c
- Timestamp:
- 07/19/11 19:43:25 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/slurm_drmaa/job.c
r15 r17 426 426 } 427 427 428 /* propagate all environment variables from submission host */ 429 { 430 extern char **environ; 431 char **i; 432 unsigned j = 0; 433 434 for ( i = environ; *i; i++) { 435 job_desc->env_size++; 436 } 437 438 fsd_log_debug(("environ env_size = %d",job_desc->env_size)); 439 fsd_calloc(job_desc->environment, job_desc->env_size+1, char *); 440 441 for( i = environ; *i; i++,j++ ) 442 { 443 job_desc->environment[j] = fsd_strdup(*i); 444 } 445 446 } 447 428 448 /* environment */ 449 429 450 vector = jt->get_v_attr( jt, DRMAA_V_ENV ); 430 451 if( vector ) … … 432 453 const char *const *i; 433 454 unsigned j = 0; 455 unsigned env_offset = job_desc->env_size; 434 456 435 457 for( i = vector; *i; i++ ) … … 437 459 job_desc->env_size++; 438 460 } 439 fsd_log_debug((" env_size = %d",job_desc->env_size));461 fsd_log_debug(("jt env_size = %d",job_desc->env_size)); 440 462 441 463 fsd_log_debug(("# environment =")); 442 fsd_ calloc(job_desc->environment, job_desc->env_size+1, char *);464 fsd_realloc(job_desc->environment, job_desc->env_size+1, char *); 443 465 444 466 for( i = vector; *i; i++,j++ ) 445 467 { 446 job_desc->environment[j ] = fsd_strdup(*i);447 fsd_log_debug((" %s", job_desc->environment[j ]));468 job_desc->environment[j + env_offset] = fsd_strdup(*i); 469 fsd_log_debug((" %s", job_desc->environment[j+ env_offset])); 448 470 } 449 471 } … … 454 476 { 455 477 job_desc->time_limit = slurmdrmaa_datetime_parse( value ); 456 fsd_log_debug(("# wct_hlimit = %s -> %ld",value, slurmdrmaa_datetime_parse( value )));478 fsd_log_debug(("# wct_hlimit = %s -> %ld",value, (long int)slurmdrmaa_datetime_parse( value ))); 457 479 } 458 480
Note: See TracChangeset
for help on using the changeset viewer.