Search code examples
filecreatefilesimgrid

How to create files in SimGrid?


Is it possible to create files in SimGrid?

For example, after some execution program creates file and writes output onto it with Msg_file_write().

For this purpose I tried to use Msg_file_open() with nonexistent name expecting that simgrid would create a new file. But compiler only gave me an

Segmentation fault.

Solution

  • The behavior of MSG_file_write and MSG_file_open is exemplified in https://github.com/simgrid/simgrid/blob/master/examples/msg/io-file/io-file.c and https://github.com/simgrid/simgrid/blob/master/examples/msg/io-storage/io-storage.c

    About your specific issue, more than "I got a Segmentation fault" is needed to help you. Do you have any minimal working example that reproduces your issue, or at least some backtrace?