#include <mpi.h>
#include <stdio.h>
#include <string>
int main (int argc, char** argv)
{
MPI_Init(&argc, &argv);
MPI_File shortfile;
MPI_File longfile;
std::string long_filename = "longfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilenamelongfilename";
std::string short_filename = "testfile.txt";
printf("OPENING SHORT FILE\n");
int fopen_short_error = MPI_File_open(MPI_COMM_WORLD, short_filename.c_str(), MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &shortfile);
printf("SHORT FILE OPENED\n");
MPI_File_close(&shortfile);
printf("OPENING LONG FILE\n");
int fopen_long_error = MPI_File_open(MPI_COMM_WORLD, long_filename.c_str(), MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &longfile);
printf("LONG FILE OPENED\n");
MPI_File_close(&longfile);
MPI_Finalize();
}
OPENING SHORT FILE
SHORT FILE OPENED
OPENING LONG FILE
[localhost:155795] *** Process received signal ***
[localhost:155795] Signal: Segmentation fault (11)
[localhost:155795] Signal code: (128)
[localhost:155795] Failing at address: (nil)
Segmentation fault (core dumped)
Thank you for the bug report. Could you please create an issue on here: https://github.com/open-mpi/ompi/issues ?
I will take a look, but its easier to keep track if there is an issue associated with the request.
Best regards
Edgar
To unsubscribe from this group and stop receiving emails from it, send an email to users+un...@lists.open-mpi.org.