Remove string copies in fckit_mpi_broadcast_string and fckit_mpi_broadcast_file (fixes #81)#89
Remove string copies in fckit_mpi_broadcast_string and fckit_mpi_broadcast_file (fixes #81)#89wdeconinck wants to merge 1 commit into
Conversation
…dcast_file (fixes #81)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #89 +/- ##
===========================================
+ Coverage 51.07% 51.15% +0.08%
===========================================
Files 58 58
Lines 4854 4846 -8
Branches 453 452 -1
===========================================
Hits 2479 2479
+ Misses 2375 2367 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Unfortunately I get this failure: Runtime Error: /home/users/david.davies/cylc-run/mo-bundle-415/share/mo-bundle/fckit/src/fckit/module/fckit_shared_ptr.F90, line 193: Attempt to DEALLOCATE an undefined pointer |
|
Hmmm I'm now thinking this has to be due to another issue then related to fckit_shared_ptr which is quite hard to debug. |
|
I think there are issues with fckit_shared_ptr, I am having issues with that with other compilers as well (see #86). When I print the association status of this % refcount_ just before the deallocate statement it returns true for both gnu and nag, but the actual deallocate then fails for nag. This implies that the pointer has got corrupted somewhere, but I don't know where. |
|
I don't really know what to do about this. I don't like saying how I think there is a problem with fckit_shared_ptr because currently the other fckit tests work with NAG (#86 is invalid for now, but I don't know why, I will close it). However running tests in other codes that use fckit sometimes run in to failures that die in fckit, often fckit_shared_ptr. |
|
If I put write(0, '(a,a)') "in broadcast_file 1, trim(path) = ", trim(path); flush(0) in the broadcast_file function the broadcast_file ctest passes. |
|
Sounds indeed like a memory corruption. I wonder what valgrind has to say about it. |
|
Regarding the FINAL stuff the cmake output is: -- Checking Fortran support for "finalization" Regarding valgrind, which options to you want me to use? |
Description
Alternative fix for #81 than attempted with #88.
This fix removes the copies of buffers within Fortran to which append a null terminator character.
@DJDavies2 could you review this with NAG compiler as well?
Contributor Declaration
By opening this pull request, I affirm the following: