diff --git a/ompi/mca/bcol/basesmuma/bcol_basesmuma_allreduce.c b/ompi/mca/bcol/basesmuma/bcol_basesmuma_allreduce.c index 942cf901a3..0058ec770f 100644 --- a/ompi/mca/bcol/basesmuma/bcol_basesmuma_allreduce.c +++ b/ompi/mca/bcol/basesmuma/bcol_basesmuma_allreduce.c @@ -4,6 +4,7 @@ * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -196,7 +197,7 @@ static int allreduce_fanout (mca_bcol_basesmuma_module_t *bcol_module, volatile static int bcol_basesmuma_allreduce_intra_fanin_fanout_progress (bcol_function_args_t *input_args, mca_bcol_base_function_t *c_input_args) { mca_bcol_basesmuma_module_t *bcol_module = (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - int buff_idx = buff_idx = input_args->src_desc->buffer_index; + int buff_idx = input_args->src_desc->buffer_index; int *iteration = &bcol_module->ml_mem.nb_coll_desc[buff_idx].iteration; void *data_addr = (void *) input_args->src_desc->data_addr; int my_node_index, my_rank, group_size, leading_dim, idx; @@ -268,7 +269,7 @@ int bcol_basesmuma_allreduce_intra_fanin_fanout(bcol_function_args_t *input_args { /* local variables */ mca_bcol_basesmuma_module_t *bcol_module = (mca_bcol_basesmuma_module_t *) c_input_args->bcol_module; - int buff_idx = buff_idx = input_args->src_desc->buffer_index; + int buff_idx = input_args->src_desc->buffer_index; int *iteration = &bcol_module->ml_mem.nb_coll_desc[buff_idx].iteration; void *data_addr = (void *) input_args->src_desc->data_addr; volatile mca_bcol_basesmuma_header_t *my_ctl_pointer; diff --git a/ompi/mca/coll/basic/coll_basic_barrier.c b/ompi/mca/coll/basic/coll_basic_barrier.c index 64899c9ef2..8bce69e345 100644 --- a/ompi/mca/coll/basic/coll_basic_barrier.c +++ b/ompi/mca/coll/basic/coll_basic_barrier.c @@ -10,6 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2012 Oak Ridge National Labs. All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -120,6 +121,9 @@ mca_coll_basic_barrier_intra_log(struct ompi_communicator_t *comm, dim = comm->c_cube_dim; hibit = opal_hibit(rank, dim); + if (hibit < 0) { + return MPI_ERR_OTHER; + } --dim; /* Receive from children. */ diff --git a/ompi/mca/coll/basic/coll_basic_bcast.c b/ompi/mca/coll/basic/coll_basic_bcast.c index 2ea5c307c5..43e3ed4e6f 100644 --- a/ompi/mca/coll/basic/coll_basic_bcast.c +++ b/ompi/mca/coll/basic/coll_basic_bcast.c @@ -9,6 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -134,6 +135,9 @@ mca_coll_basic_bcast_log_intra(void *buff, int count, dim = comm->c_cube_dim; hibit = opal_hibit(vrank, dim); + if (hibit < 0) { + return MPI_ERR_OTHER; + } --dim; /* Receive data from parent in the tree. */ diff --git a/ompi/mca/coll/libnbc/coll_libnbc_ireduce_scatter_block.c b/ompi/mca/coll/libnbc/coll_libnbc_ireduce_scatter_block.c index e677f2abe9..b35b557a70 100644 --- a/ompi/mca/coll/libnbc/coll_libnbc_ireduce_scatter_block.c +++ b/ompi/mca/coll/libnbc/coll_libnbc_ireduce_scatter_block.c @@ -52,7 +52,7 @@ int ompi_coll_libnbc_ireduce_scatter_block(void* sendbuf, void* recvbuf, int rec if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_rank() (%i)\n", res); return res; } res = MPI_Comm_size(comm, &p); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_size() (%i)\n", res); return res; } - MPI_Type_extent(datatype, &ext); + res = MPI_Type_extent(datatype, &ext); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Type_extent() (%i)\n", res); return res; } schedule = (NBC_Schedule*)malloc(sizeof(NBC_Schedule)); @@ -168,7 +168,7 @@ int ompi_coll_libnbc_ireduce_scatter_block_inter(void *sbuf, void *rbuf, int rco if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_rank() (%i)\n", res); return res; } res = MPI_Comm_remote_size(comm, &rsize); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_remote_size() (%i)\n", res); return res; } - MPI_Type_extent(dtype, &ext); + res = MPI_Type_extent(dtype, &ext); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Type_extent() (%i)\n", res); return res; } schedule = (NBC_Schedule*)malloc(sizeof(NBC_Schedule)); diff --git a/ompi/mca/coll/libnbc/nbc_ireduce_scatter.c b/ompi/mca/coll/libnbc/nbc_ireduce_scatter.c index 034b5011d6..fe7f280d82 100644 --- a/ompi/mca/coll/libnbc/nbc_ireduce_scatter.c +++ b/ompi/mca/coll/libnbc/nbc_ireduce_scatter.c @@ -70,7 +70,7 @@ int ompi_coll_libnbc_ireduce_scatter(void* sendbuf, void* recvbuf, int *recvcoun res = MPI_Comm_rank(comm, &rank); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_rank() (%i)\n", res); return res; } - MPI_Type_extent(datatype, &ext); + res = MPI_Type_extent(datatype, &ext); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Type_extent() (%i)\n", res); return res; } schedule = (NBC_Schedule*)malloc(sizeof(NBC_Schedule)); @@ -180,7 +180,7 @@ int ompi_coll_libnbc_ireduce_scatter_inter(void* sendbuf, void* recvbuf, int *re if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_rank() (%i)\n", res); return res; } res = MPI_Comm_remote_size(comm, &rsize); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Comm_remote_size() (%i)\n", res); return res; } - MPI_Type_extent(datatype, &ext); + res = MPI_Type_extent(datatype, &ext); if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Type_extent() (%i)\n", res); return res; } schedule = (NBC_Schedule*)malloc(sizeof(NBC_Schedule)); diff --git a/ompi/mca/io/ompio/io_ompio.c b/ompi/mca/io/ompio/io_ompio.c index 6258820f29..76158dfa08 100644 --- a/ompi/mca/io/ompio/io_ompio.c +++ b/ompi/mca/io/ompio/io_ompio.c @@ -11,7 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2014 University of Houston. All rights reserved. - * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2011-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. * $COPYRIGHT$ * @@ -338,7 +338,7 @@ int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, sorted = (int *) malloc (tot_entries * sizeof(int)); - if (NULL == all_process){ + if (NULL == sorted){ opal_output(1,"Error while allocating per process!\n"); return OMPI_ERR_OUT_OF_RESOURCE; } diff --git a/ompi/mca/topo/base/topo_base_dist_graph_create_adjacent.c b/ompi/mca/topo/base/topo_base_dist_graph_create_adjacent.c index 944b9dc800..67026af1cf 100644 --- a/ompi/mca/topo/base/topo_base_dist_graph_create_adjacent.c +++ b/ompi/mca/topo/base/topo_base_dist_graph_create_adjacent.c @@ -92,15 +92,15 @@ int mca_topo_base_dist_graph_create_adjacent(mca_topo_base_module_t* module, return OMPI_SUCCESS; bail_out: - if( NULL != topo->in ) free(topo->in); - if( MPI_UNWEIGHTED != sourceweights ) { - if( NULL != topo->inw ) free(topo->inw); - } - if( NULL != topo->out ) free(topo->out); - if( MPI_UNWEIGHTED != destweights ) { - if( NULL != topo->outw ) free(topo->outw); - } - if( NULL != topo ) { + if (NULL != topo) { + if( NULL != topo->in ) free(topo->in); + if( MPI_UNWEIGHTED != sourceweights ) { + if( NULL != topo->inw ) free(topo->inw); + } + if( NULL != topo->out ) free(topo->out); + if( MPI_UNWEIGHTED != destweights ) { + if( NULL != topo->outw ) free(topo->outw); + } free(topo); } ompi_comm_free(newcomm); diff --git a/ompi/mpi/c/cart_rank.c b/ompi/mpi/c/cart_rank.c index a21b76daea..51bfb49c5f 100644 --- a/ompi/mpi/c/cart_rank.c +++ b/ompi/mpi/c/cart_rank.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2007-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2012-2013 Inria. All rights reserved. @@ -62,11 +62,19 @@ int MPI_Cart_rank(MPI_Comm comm, const int coords[], int *rank) return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_COMM, FUNC_NAME); } + + /* Need this check here to protect the access to "cart", + below. I.e., if OMPI_COMM_IS_CART is true, then cart is + guaranteed to be != NULL. */ + if (!OMPI_COMM_IS_CART(comm)) { + return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_TOPOLOGY, + FUNC_NAME); + } + cart = comm->c_topo->mtc.cart; /* Per MPI-2.1, coords is only relevant if the dimension of the cartesian comm is >0 */ if (((NULL == coords) && - (NULL != cart) && (cart->ndims >= 1)) || (NULL == rank)){ return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_ARG, @@ -82,11 +90,13 @@ int MPI_Cart_rank(MPI_Comm comm, const int coords[], int *rank) return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME); } } - } - - if (!OMPI_COMM_IS_CART(comm)) { - return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_TOPOLOGY, - FUNC_NAME); + } else { + /* Need to always test for cartesian communicators, even in + the !MPI_PARAM_CHECK case. */ + if (!OMPI_COMM_IS_CART(comm)) { + return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_TOPOLOGY, + FUNC_NAME); + } } OPAL_CR_ENTER_LIBRARY(); diff --git a/opal/mca/btl/openib/btl_openib_component.c b/opal/mca/btl/openib/btl_openib_component.c index 50f737ba8f..73a40342d0 100644 --- a/opal/mca/btl/openib/btl_openib_component.c +++ b/opal/mca/btl/openib/btl_openib_component.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved. * Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights * reserved. @@ -2354,7 +2354,6 @@ static float get_ib_dev_distance(struct ibv_device *dev) goto out; } if (0 != hwloc_get_cpubind(opal_hwloc_topology, my_cpuset, 0)) { - hwloc_bitmap_free(my_cpuset); goto out; } my_obj = hwloc_get_obj_covering_cpuset(opal_hwloc_topology, my_cpuset); diff --git a/opal/mca/crs/base/crs_base_fns.c b/opal/mca/crs/base/crs_base_fns.c index edb3f2a707..6580cad105 100644 --- a/opal/mca/crs/base/crs_base_fns.c +++ b/opal/mca/crs/base/crs_base_fns.c @@ -9,6 +9,7 @@ * All rights reserved. * Copyright (c) 2007 Evergrid, Inc. All rights reserved. * + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -142,7 +143,9 @@ int opal_crs_base_metadata_read_token(FILE *metadata, char * token, char ***valu } while(0 == feof(metadata) ); cleanup: - rewind(metadata); + if (NULL != metadata) { + rewind(metadata); + } return exit_status; } diff --git a/opal/mca/crs/none/crs_none_module.c b/opal/mca/crs/none/crs_none_module.c index c0da6f7c2b..42573a30ec 100644 --- a/opal/mca/crs/none/crs_none_module.c +++ b/opal/mca/crs/none/crs_none_module.c @@ -2,6 +2,7 @@ * Copyright (c) 2004-2010 The Trustees of Indiana University. * All rights reserved. * + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -151,7 +152,9 @@ int opal_crs_none_restart(opal_crs_base_snapshot_t *base_snapshot, bool spawn_ch } cleanup: - fclose(base_snapshot->metadata); + if (NULL != base_snapshot->metadata) { + fclose(base_snapshot->metadata); + } base_snapshot->metadata = NULL; return exit_status; diff --git a/opal/runtime/opal_info_support.c b/opal/runtime/opal_info_support.c index d2085bfec9..312ae77a37 100644 --- a/opal/runtime/opal_info_support.c +++ b/opal/runtime/opal_info_support.c @@ -624,7 +624,7 @@ static void opal_info_show_mca_group_params(const mca_base_var_group_t *group, m mca_base_component_parse_requested (value->stringval, &include_mode, &requested_components); for (i = 0, requested = !include_mode ; requested_components[i] ; ++i) { - if (0 == strcmp (requested_components[i], group->group_component)) { + if (0 == strcmp (requested_components[i], group_component)) { requested = include_mode; break; } diff --git a/orte/mca/oob/tcp/oob_tcp_component.c b/orte/mca/oob/tcp/oob_tcp_component.c index 7057c387d0..89db27ad84 100644 --- a/orte/mca/oob/tcp/oob_tcp_component.c +++ b/orte/mca/oob/tcp/oob_tcp_component.c @@ -12,7 +12,7 @@ * All rights reserved. * Copyright (c) 2006-2014 Los Alamos National Security, LLC. * All rights reserved. - * Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * Copyright (c) 2014 NVIDIA Corporation. All rights reserved. @@ -752,6 +752,7 @@ static int component_set_addr(orte_process_name_t *peer, * end - we need to remove those extra characters */ hptr = host; +#if OPAL_ENABLE_IPV6 if (AF_INET6 == af_family) { if ('[' == host[0]) { hptr = &host[1]; @@ -760,6 +761,7 @@ static int component_set_addr(orte_process_name_t *peer, host[strlen(host)-1] = '\0'; } } +#endif addrs = opal_argv_split(hptr, ','); diff --git a/orte/mca/oob/usock/oob_usock.c b/orte/mca/oob/usock/oob_usock.c index 3d11322860..7814ae0d7c 100644 --- a/orte/mca/oob/usock/oob_usock.c +++ b/orte/mca/oob/usock/oob_usock.c @@ -11,7 +11,7 @@ * All rights reserved. * Copyright (c) 2006-2013 Los Alamos National Security, LLC. * All rights reserved. - * Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ @@ -367,7 +367,6 @@ static void recv_handler(int sd, short flags, void *cbdata) if (MCA_OOB_USOCK_IDENT == hdr.type) { if (NULL == (peer = mca_oob_usock_peer_lookup(&hdr.origin))) { /* should never happen */ - mca_oob_usock_peer_close(peer); goto cleanup; } /* set socket up to be non-blocking */ diff --git a/orte/mca/plm/base/plm_base_launch_support.c b/orte/mca/plm/base/plm_base_launch_support.c index 6b2f3591c1..4e255f9371 100644 --- a/orte/mca/plm/base/plm_base_launch_support.c +++ b/orte/mca/plm/base/plm_base_launch_support.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2007-2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2007-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Institut National de Recherche en Informatique * et Automatique. All rights reserved. * Copyright (c) 2011-2012 Los Alamos National Security, LLC. @@ -1260,7 +1260,16 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv, /* Add the 'prefix' param */ tmp_value = NULL; loc_id = mca_base_var_find("opal", "mca", "base", "param_file_prefix"); - mca_base_var_get_value(loc_id, &tmp_value, NULL, NULL); + if (loc_id < 0) { + rc = OPAL_ERR_NOT_FOUND; + ORTE_ERROR_LOG(rc); + return rc; + } + rc = mca_base_var_get_value(loc_id, &tmp_value, NULL, NULL); + if (ORTE_SUCCESS != rc) { + ORTE_ERROR_LOG(rc); + return rc; + } if( NULL != tmp_value && NULL != tmp_value[0] ) { /* Could also use the short version '-am' * but being verbose has some value @@ -1272,7 +1281,15 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv, /* Add the 'path' param */ tmp_value = NULL; loc_id = mca_base_var_find("opal", "mca", "base", "param_file_path"); - mca_base_var_get_value(loc_id, &tmp_value, NULL, NULL); + if (loc_id < 0) { + ORTE_ERROR_LOG(rc); + return rc; + } + rc = mca_base_var_get_value(loc_id, &tmp_value, NULL, NULL); + if (ORTE_SUCCESS != rc) { + ORTE_ERROR_LOG(rc); + return rc; + } if( NULL != tmp_value && NULL != tmp_value[0] ) { opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID); opal_argv_append(argc, argv, "mca_base_param_file_path"); @@ -1285,7 +1302,16 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv, tmp_value = NULL; loc_id = mca_base_var_find("opal", "mca", "base", "param_file_path_force"); - mca_base_var_get_value(loc_id, &tmp_value, NULL, NULL); + if (loc_id < 0) { + rc = OPAL_ERR_NOT_FOUND; + ORTE_ERROR_LOG(rc); + return rc; + } + rc = mca_base_var_get_value(loc_id, &tmp_value, NULL, NULL); + if (OPAL_SUCCESS != rc) { + ORTE_ERROR_LOG(rc); + return rc; + } if( NULL == tmp_value || NULL == tmp_value[0] ) { /* Get the current working directory */ tmp_force = (char *) malloc(sizeof(char) * OPAL_PATH_MAX); diff --git a/orte/mca/plm/rsh/plm_rsh_component.c b/orte/mca/plm/rsh/plm_rsh_component.c index f5680f75bc..83d2006d11 100644 --- a/orte/mca/plm/rsh/plm_rsh_component.c +++ b/orte/mca/plm/rsh/plm_rsh_component.c @@ -14,7 +14,7 @@ * Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights * reserved. - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 IBM Corporation. All rights reserved. * $COPYRIGHT$ * @@ -319,7 +319,8 @@ char **orte_plm_rsh_search(const char* agent_list, const char *path) if (NULL == path) { getcwd(cwd, OPAL_PATH_MAX); } else { - strncpy(cwd, path, OPAL_PATH_MAX); + strncpy(cwd, path, OPAL_PATH_MAX - 1); + cwd[OPAL_PATH_MAX - 1] = '\0'; } if (NULL == agent_list) { lines = opal_argv_split(mca_plm_rsh_component.agent, ':'); diff --git a/orte/mca/rmaps/base/rmaps_base_frame.c b/orte/mca/rmaps/base/rmaps_base_frame.c index 0d707824e2..89a5c6d894 100644 --- a/orte/mca/rmaps/base/rmaps_base_frame.c +++ b/orte/mca/rmaps/base/rmaps_base_frame.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. @@ -577,10 +577,6 @@ static int check_modifiers(char *ck, orte_mapping_policy_t *tmp) return ORTE_ERR_SILENT; } ptr++; - if (NULL == ptr) { - /* still missing the value */ - return ORTE_ERR_SILENT; - } orte_rmaps_base.cpus_per_rank = strtol(ptr, NULL, 10); opal_output_verbose(5, orte_rmaps_base_framework.framework_output, "%s rmaps:base setting pe/rank to %d", diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index 26bdff0be2..2311e1c8e5 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2007-2013 Los Alamos National Security, LLC. All rights * reserved. @@ -2224,6 +2224,7 @@ static int process(char *orig_line, char *basename, opal_cmd_line_t *cmd_line, opal_argv_append_nosize(new_argv, orterun_argv[j]); } } else if (0 == strcmp(line_argv[i], "@np@")) { + used_num_procs = true; asprintf(&tmp, "%d", num_procs); opal_argv_append_nosize(new_argv, tmp); free(tmp);