error using paropen_mapped and multiple threads
Writing: 1 SION file with 2 ranks $ ./test-writer -nt 2 test-trace-parallel-sion-2.0 0 Reading: 1 rank reads 2 ranks $ ./test-reader -nt 1 test-trace-parallel-sion-2.0.otf2 0 2 sion_generic_paropen_mapped( ..., grank=0, gsize=1, nlocaltasks=2, globalranks={0,1}, ... );
- error message for call to sion_seek( , rank=1, SION_CURRENT_BLK, SION_CURRENT_POS ): SION_ERROR_RETURN on rank -1, rc=0: sion_seek: parameter rank 1 (max. -1) out of range, aborting ...
- note: reading just the first rank works
- this happens always if one wants to read more than one rank in mapped mode
Writing: 2 SION files with 2 ranks $ ./test-writer -nt 2 test-trace-parallel-sion-2.2 2 Reading: 2 ranks reads 2 ranks with local-comm-create: $ ./test-reader -nt 2 test-trace-parallel-sion-2.2.otf2 1 2
- no error messages but getting wrong data, readig works when using mapped API
- note: values for filenumber, numfiles, lrank, lsize are unchanged after call to sion_generic_paropen()
- this happens always when using the sion_generic_paropen() call and having multiple SION files
Writing: 2 SION files with 3 ranks $ ./test-writer -nt 3 test-trace-parallel-sion-3.2 2 Reading: 3 ranks reads 3 ranks with local-comm-create $ ./test-reader -nt 3 test-trace-parallel-sion-3.2.otf2 1 3
- error message: SION_ERROR_RETURN on rank -1, rc=0: _sion_read_header_var_part_blockcount_to_field: cannot read header(blocksizes) field too small, aborting ... (1<2) SION_ERROR_RETURN on rank -1, rc=0: _sion_read_header_var_part_nextblocksizes_to_field: cannot read header(blocksizes) field too small, aborting ... (1<2)
- getting wrong data
- this seems releated to the last one, happens only when using sion_generic_paropen() and having multiple SION files
In general, it seems that sion_generic_paropen() works with 1 SION file, but always fails for multiple SION files.
And I also get sometimes still get errors like this:
SION_ERROR_RETURN on rank -1, rc=-1: sion_generic_register_scattervr_cb: invalid sion_apidesc 0 SION_ERROR_RETURN on rank -1, rc=-1: sion_generic_paropen_mapped: API OTF2_SION_API not correctly initalized, aborting
Which I can only explain with thread-unsafty, but I'm using the patch I send to you already.