Skip to content

Commit ebd2a7d

Browse files
Merge pull request #626 from E3SM-Project/jayeshkrishna/point_bp_symlink_to_md_file
Instead of pointing to the ADIOS BP output directory (foo.nc.bp) point the ADIOS output file symlink (foo.nc) to the meta data file in the ADIOS BP directory (foo.nc.bp/md.0) Fixes #625
2 parents a49d588 + c5df83c commit ebd2a7d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/clib/pioc_support.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#ifdef _HDF5
2020
#include <sys/stat.h>
2121
#endif
22+
#include <string>
2223
#include "spio_io_summary.h"
2324
#include "spio_file_mvcache.h"
2425
#include "spio_hash.h"
@@ -3113,10 +3114,11 @@ int spio_createfile_int(int iosysid, int *ncidp, const int *iotype, const char *
31133114

31143115
if(file->adios_rank == 0)
31153116
{
3116-
ierr = symlink(file->filename, filename);
3117+
const std::string adios_bp_md_filename(std::string(file->filename) + "/md.0");
3118+
ierr = symlink(adios_bp_md_filename.c_str(), filename);
31173119
if(ierr != 0)
31183120
{
3119-
fprintf(stdout, "PIO: WARNING: Creating symlink for %s file failed, ierr = %d", file->filename, ierr);
3121+
fprintf(stdout, "PIO: WARNING: Creating symlink for ADIOS BP mdata file (%s) failed, ierr = %d", adios_bp_md_filename.c_str(), ierr);
31203122
}
31213123
}
31223124

0 commit comments

Comments
 (0)