|
10 | 10 | * University of Stuttgart. All rights reserved.
|
11 | 11 | * Copyright (c) 2004-2005 The Regents of the University of California.
|
12 | 12 | * All rights reserved.
|
13 |
| - * Copyright (c) 2008-2015 University of Houston. All rights reserved. |
| 13 | + * Copyright (c) 2008-2017 University of Houston. All rights reserved. |
14 | 14 | * Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
15 | 15 | * reserved.
|
16 | 16 | * Copyright (c) 2015 Research Organization for Information Science
|
|
29 | 29 | #include "opal/threads/mutex.h"
|
30 | 30 | #include "opal/mca/base/base.h"
|
31 | 31 | #include "ompi/mca/io/io.h"
|
| 32 | +#include "ompi/mca/fs/base/base.h" |
32 | 33 | #include "io_ompio.h"
|
33 | 34 |
|
34 | 35 | int mca_io_ompio_cycle_buffer_size = OMPIO_DEFAULT_CYCLE_BUF_SIZE;
|
@@ -257,8 +258,38 @@ file_query(struct ompi_file_t *file,
|
257 | 258 | int *priority)
|
258 | 259 | {
|
259 | 260 | mca_io_ompio_data_t *data;
|
| 261 | + char *tmp; |
| 262 | + int rank; |
| 263 | + int is_lustre=0; //false |
| 264 | + |
| 265 | + tmp = strchr (file->f_filename, ':'); |
| 266 | + rank = ompi_comm_rank ( file->f_comm); |
| 267 | + if (!tmp) { |
| 268 | + if ( 0 == rank) { |
| 269 | + if (LUSTRE == mca_fs_base_get_fstype(file->f_filename)) { |
| 270 | + is_lustre = 1; //true |
| 271 | + } |
| 272 | + } |
| 273 | + |
| 274 | + file->f_comm->c_coll->coll_bcast (&is_lustre, |
| 275 | + 1, |
| 276 | + MPI_INT, |
| 277 | + 0, |
| 278 | + file->f_comm, |
| 279 | + file->f_comm->c_coll->coll_bcast_module); |
| 280 | + } |
| 281 | + else { |
| 282 | + if (!strncasecmp(file->f_filename, "lustre:", 7) ) { |
| 283 | + is_lustre = 1; |
| 284 | + } |
| 285 | + } |
260 | 286 |
|
261 |
| - *priority = priority_param; |
| 287 | + if (is_lustre) { |
| 288 | + *priority = 1; |
| 289 | + } |
| 290 | + else { |
| 291 | + *priority = priority_param; |
| 292 | + } |
262 | 293 |
|
263 | 294 | /* Allocate a space for this module to hang private data (e.g.,
|
264 | 295 | the OMPIO file handle) */
|
|
0 commit comments