This is the mail archive of the
mailing list for the GCC project.
Re: [patch, fortran] Asynchronous I/O, take 3
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Thomas König <tk at tkoenig dot net>
- Cc: "fortran\@gcc.gnu.org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, nk at koenigni dot com
- Date: Tue, 03 Jul 2018 16:24:17 +0200
- Subject: Re: [patch, fortran] Asynchronous I/O, take 3
- References: <email@example.com>
> the attached patch is the third take on Nicolas' and my patch
> for implementing asynchronous I/O. Some parts have been reworked, and
> several bugs which caused either incorrect I/O or hangs have been
> fixed in the process.
> I have to say that getting out these bugs has been much harder
> than Nicolas and I originally thought, and that this has cost more
> working hours than any other patch I have been involved in.
> This has been regression-tested on x86_64-pc-linux-gnu. The new test
> cases have also been tested in a tight loop with
> n=1; while ./a.out; do echo -n $n " " ; n=$((n+1)); done
> or (for async_io_3.f90, which is supposed to fail)
> while true ; do ./a.out > /dev/null 2>&1 ; echo -n $n " " ; n=$((n+1));
> and the test cases also come up clean with valgrind --tool=drd
> (which is a _very_ strict tool which, after this experience, I
> wholeheartedly recommend for doing pthreads debugging).
> The interface remains as before - link in pthread to get asynchronous
> I/O, which matches what ifort does.
another test run on i386-pc-solaris2.11 is underway. However, may
(all?) gfortran tests now SEGV. One example is
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Thread 2 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0xfe1b1f03 in pthread_mutex_unlock () from /lib/libc.so.1
#0 0xfe1b1f03 in pthread_mutex_unlock () from /lib/libc.so.1
#1 0xfe5d1b7c in __gthread_mutex_unlock (__mutex=0x18)
#2 _gfortran_st_rewind (fpp=0xfeffda9c)
#3 0x0805110f in MAIN__ ()
Obviously __mutex above hasn't been properly initialized.
> 2018-07-02 Nicolas Koenig <firstname.lastname@example.org>
> Thomas Koenig <email@example.com>
> PR fortran/25829
> * testsuite/libgfomp.fortran/async_io_1.f90: New test.
> * testsuite/libgfomp.fortran/async_io_2.f90: New test.
> * testsuite/libgfomp.fortran/async_io_3.f90: New test.
You seem to have a special fondness for libgfomp ;-)
Rainer Orth, Center for Biotechnology, Bielefeld University