59 typedef struct _cs_file_serializer_t cs_file_serializer_t;
106 #if defined(SIZEOF_LONG_LONG) 149 #if defined(HAVE_MPI) 488 #if defined(HAVE_MPI) 517 #if defined(HAVE_MPI) 532 #if defined(HAVE_MPI) 559 cs_file_get_default_comm(
int *block_rank_step,
561 MPI_Comm *block_comm,
591 cs_file_set_default_comm(
int block_rank_step,
609 cs_file_block_comm(
int block_rank_step,
653 #if defined(HAVE_MPI) 680 cs_file_serializer_t *
681 cs_file_serializer_create(
size_t size,
685 size_t buf_block_size,
697 cs_file_serializer_destroy(cs_file_serializer_t **s);
724 cs_file_serializer_advance(cs_file_serializer_t *s,
void cs_file_set_mpi_io_positionning(cs_file_mpi_positionning_t positionning)
Set the positionning method for MPI-IO.
Definition: cs_file.c:3256
size_t cs_file_write_block_buffer(cs_file_t *f, void *buf, size_t size, size_t stride, cs_gnum_t global_num_start, cs_gnum_t global_num_end)
Write data to a file, each associated process providing a contiguous part of this data...
Definition: cs_file.c:2552
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:281
void cs_file_set_swap_endian(cs_file_t *f, int swap)
Set a file's byte-swapping behavior.
Definition: cs_file.c:2084
char ** cs_file_listdir(const char *path)
List files inside a directory.
Definition: cs_file.c:3739
void cs_file_defaults_info(void)
Print information on default options for file access.
Definition: cs_file.c:3268
cs_file_seek_t
seek semantics (third argument of cs_file_seek)
Definition: cs_file.h:74
int cs_file_get_swap_endian(const cs_file_t *f)
Return a file's byte-swapping behavior.
Definition: cs_file.c:2067
void cs_file_free_defaults(void)
Free the default options for file access.
Definition: cs_file.c:2837
size_t cs_file_write_block(cs_file_t *f, const void *buf, size_t size, size_t stride, cs_gnum_t global_num_start, cs_gnum_t global_num_end)
Write data to a file, each associated process providing a contiguous part of this data...
Definition: cs_file.c:2452
size_t cs_file_read_block(cs_file_t *f, void *buf, size_t size, size_t stride, cs_gnum_t global_num_start, cs_gnum_t global_num_end)
Read data to a buffer, distributing a contiguous part of it to each process associated with a file...
Definition: cs_file.c:2336
#define BEGIN_C_DECLS
Definition: cs_defs.h:461
int cs_file_isdir(const char *path)
Check if a directory exists.
Definition: cs_file.c:3692
Definition: cs_file.h:100
cs_file_mpi_positionning_t
MPI-IO positionning methods.
Definition: cs_file.h:97
cs_file_t * cs_file_free(cs_file_t *f)
Destroy a file descriptor and close the associated file.
Definition: cs_file.c:1987
void cs_file_dump(const cs_file_t *f)
Dump the metadata of a file structure in human readable form.
Definition: cs_file.c:2785
cs_file_mode_t
File acces modes.
Definition: cs_file.h:64
const char * cs_file_get_name(const cs_file_t *f)
Return a file's name.
Definition: cs_file.c:2016
const char * cs_file_access_name[]
Definition: cs_file.c:280
long long cs_file_off_t
Definition: cs_file.h:107
int cs_file_mkdir_default(const char *path)
Create a new directory using default permissions.
Definition: cs_file.c:3571
int cs_file_remove(const char *path)
Remove a file if it exists and is a regular file.
Definition: cs_file.c:3850
void cs_file_set_default_access(cs_file_mode_t mode, cs_file_access_t method)
Set the default options for file access.
Definition: cs_file.c:3006
int cs_file_seek(cs_file_t *f, cs_file_off_t offset, cs_file_seek_t whence)
Update the file pointer according to whence.
Definition: cs_file.c:2655
cs_file_t * cs_file_open(const char *name, cs_file_mode_t mode, cs_file_access_t method)
Create a file descriptor and open the associated file.
Definition: cs_file.c:1795
size_t cs_file_write_global(cs_file_t *f, const void *buf, size_t size, size_t ni)
Write global data to a file.
Definition: cs_file.c:2206
cs_file_off_t cs_file_size(const char *path)
Return the size of a file.
Definition: cs_file.c:3798
void cs_file_get_default_access(cs_file_mode_t mode, cs_file_access_t *method)
Get the default options for file access.
Definition: cs_file.c:2915
int cs_file_isreg(const char *path)
Check if a file exists and is a regular file.
Definition: cs_file.c:3646
cs_file_t * cs_file_open_serial(const char *name, cs_file_mode_t mode)
Create a file descriptor and open the associated file, using the serial IO on the root rank...
Definition: cs_file.c:1957
cs_file_access_t
Shared file access methods.
Definition: cs_file.h:84
size_t cs_file_read_global(cs_file_t *f, void *buf, size_t size, size_t ni)
Read global data from a file, distributing it to all processes associated with that file...
Definition: cs_file.c:2108
cs_file_off_t cs_file_tell(cs_file_t *f)
Return the position of the file pointer.
Definition: cs_file.c:2744
#define END_C_DECLS
Definition: cs_defs.h:462
struct _cs_file_t cs_file_t
Definition: cs_file.h:54
cs_file_mpi_positionning_t cs_file_get_mpi_io_positionning(void)
Get the positionning method for MPI-IO.
Definition: cs_file.c:3232
const char * cs_file_mpi_positionning_name[]
cs_file_t * cs_file_open_default(const char *name, cs_file_mode_t mode)
Create a file descriptor and open the associated file, using the default file communicator and access...
Definition: cs_file.c:1903
void cs_file_set_big_endian(cs_file_t *f)
Ensure that data is read or written in big-endian (network standard) format.
Definition: cs_file.c:2033