public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [GOMP, Fortran] RFC: Issues with gomp-fortran tests
@ 2024-06-03 13:38 Andre Vehreschild
  2024-06-06 19:56 ` Steve Kargl
  0 siblings, 1 reply; 4+ messages in thread
From: Andre Vehreschild @ 2024-06-03 13:38 UTC (permalink / raw)
  To: GCC-Fortran-ML

Hi gfortraneers and gomp-specialists,

during regression testing I lately experience all OpenMP fortran tests to be
failing. I do:

make check-fortran

My configure is:

../gcc/configure --disable-multilib --enable-stage1-languages=c,fortran,c++
--enable-checking=yes --enable-offload-defaulted --prefix=`realpath ../gfortran`

It does not matter, if I just do a stage1 build or a full bootstrap,
fortran-gomp tests always fail. I haven't tried running the full testsuite,
because that takes a loooong time. Trying to run only the target

make check-target-libgomp-fortran

(which is included in check-fortran), also results in the fortran-gomp tests not
being run, or more specifically not being able to be compiled. In fact the
gfortran compiler is not found. The expect scripts resolve the gfortran
compiler for fortran-gomp-testing to be three levels up the directory tree,
where a "gfortran" filesystem node is present, but is a directory. I.e. testing
if something called gfortran is present there, will pass. Later on the tests
then complain about "gfortran: Permission denied", because a directory - of
course - can not be executed. I have spent two days now to figure how to resolve
this, but all I came up with is this patch:

diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp
b/libgomp/testsuite/libgomp.fortran/fortran.exp index 32e4bb2af4e..dd18aa98a91
100644 --- a/libgomp/testsuite/libgomp.fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.fortran/fortran.exp
@@ -20,9 +20,14 @@ if { $blddir != "" } {
     } else {
        set libquadmath_library_path ""
     }
-} elseif { ![info exists GFORTRAN_UNDER_TEST] } {
+}
+if { ![info exists GFORTRAN_UNDER_TEST]
+        || ![file exists "$GFORTRAN_UNDER_TEST"] } {
     verbose -log "GFORTRAN_UNDER_TEST not defined, will not execute fortran
tests"
-    return
+    set GFORTRAN_UNDER_TEST "${blddir}/../../gcc/gfortran -B$blddir/../../gcc"
+    if { ![file exists "$GFORTRAN_UNDER_TEST"] } {
+       return
+    }
 }
 if { $blddir != "" } {
     set lang_source_re {^.*\.[fF](|90|95|03|08)$}

This is just a first shot. With the patch the test compile and run ok. But now
my question: What am I doing wrong? I am working on gcc-master with only a few
commits behind. Is testing libgomp-fortran fine for everyone else?

Regards,
	Andre
--
Andre Vehreschild * Email: vehre ad gmx dot de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GOMP, Fortran] RFC: Issues with gomp-fortran tests
  2024-06-03 13:38 [GOMP, Fortran] RFC: Issues with gomp-fortran tests Andre Vehreschild
@ 2024-06-06 19:56 ` Steve Kargl
  2024-06-07  7:39   ` Andre Vehreschild
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Kargl @ 2024-06-06 19:56 UTC (permalink / raw)
  To: Andre Vehreschild; +Cc: GCC-Fortran-ML

Andre,

I have not seen an answer to your email.  I just built gcc/gfortran with
a build directory named objx/.  My 'make -j6 check-fortran' completed
without issues (other than the usual broken libsaniziter tests and
confusion of gmake versus make and $MAKE).  From your description, it
would certainly seem that the directory name gfortran/ is confusing the
dejagnu scripts.  If you haven't solved the problem, I'll suggest the
simple solution of choosing a different directory name.

PS: Welcome back to the gfortran effort.

-- 
steve


On Mon, Jun 03, 2024 at 03:38:20PM +0200, Andre Vehreschild wrote:
> Hi gfortraneers and gomp-specialists,
> 
> during regression testing I lately experience all OpenMP fortran tests to be
> failing. I do:
> 
> make check-fortran
> 
> My configure is:
> 
> ../gcc/configure --disable-multilib --enable-stage1-languages=c,fortran,c++
> --enable-checking=yes --enable-offload-defaulted --prefix=`realpath ../gfortran`
> 
> It does not matter, if I just do a stage1 build or a full bootstrap,
> fortran-gomp tests always fail. I haven't tried running the full testsuite,
> because that takes a loooong time. Trying to run only the target
> 
> make check-target-libgomp-fortran
> 
> (which is included in check-fortran), also results in the fortran-gomp tests not
> being run, or more specifically not being able to be compiled. In fact the
> gfortran compiler is not found. The expect scripts resolve the gfortran
> compiler for fortran-gomp-testing to be three levels up the directory tree,
> where a "gfortran" filesystem node is present, but is a directory. I.e. testing
> if something called gfortran is present there, will pass. Later on the tests
> then complain about "gfortran: Permission denied", because a directory - of
> course - can not be executed. I have spent two days now to figure how to resolve
> this, but all I came up with is this patch:
> 
> diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp
> b/libgomp/testsuite/libgomp.fortran/fortran.exp index 32e4bb2af4e..dd18aa98a91
> 100644 --- a/libgomp/testsuite/libgomp.fortran/fortran.exp
> +++ b/libgomp/testsuite/libgomp.fortran/fortran.exp
> @@ -20,9 +20,14 @@ if { $blddir != "" } {
>      } else {
>         set libquadmath_library_path ""
>      }
> -} elseif { ![info exists GFORTRAN_UNDER_TEST] } {
> +}
> +if { ![info exists GFORTRAN_UNDER_TEST]
> +        || ![file exists "$GFORTRAN_UNDER_TEST"] } {
>      verbose -log "GFORTRAN_UNDER_TEST not defined, will not execute fortran
> tests"
> -    return
> +    set GFORTRAN_UNDER_TEST "${blddir}/../../gcc/gfortran -B$blddir/../../gcc"
> +    if { ![file exists "$GFORTRAN_UNDER_TEST"] } {
> +       return
> +    }
>  }
>  if { $blddir != "" } {
>      set lang_source_re {^.*\.[fF](|90|95|03|08)$}
> 
> This is just a first shot. With the patch the test compile and run ok. But now
> my question: What am I doing wrong? I am working on gcc-master with only a few
> commits behind. Is testing libgomp-fortran fine for everyone else?
> 
> Regards,
> 	Andre
> --
> Andre Vehreschild * Email: vehre ad gmx dot de

-- 
Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GOMP, Fortran] RFC: Issues with gomp-fortran tests
  2024-06-06 19:56 ` Steve Kargl
@ 2024-06-07  7:39   ` Andre Vehreschild
  2024-06-07 16:57     ` Steve Kargl
  0 siblings, 1 reply; 4+ messages in thread
From: Andre Vehreschild @ 2024-06-07  7:39 UTC (permalink / raw)
  To: Steve Kargl; +Cc: GCC-Fortran-ML

Hi Steve,

there have not been any answers yet, so thank you for looking into that. I
tried your proposal and changed the installation directory to:

/mnt/work_store/gcc/installs/dev

Unfortunately this did not change anything. The gomp-tests are still unable to
compile. But I don't see any issues with libsanitizer tests (at least nothing
is reported) nor any issues with gmake, make and $MAKE. Looks like that is some
Fedora 39 oddity perhaps? Do you have any pointers who might have insight in
this expect stuff and could shed a light why this GFORTRAN_UNDER_TEST is
checked in the gomp tests only when the libs are not found?

> PS: Welcome back to the gfortran effort.

Thanks, I hope to produce a constant stream of patches in the next year or even
longer.

Thank you for your time. If you have any other idea that I could test, please
let me know.

Regards,
	Andre
--
Andre Vehreschild * Email: vehre ad gmx dot de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GOMP, Fortran] RFC: Issues with gomp-fortran tests
  2024-06-07  7:39   ` Andre Vehreschild
@ 2024-06-07 16:57     ` Steve Kargl
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Kargl @ 2024-06-07 16:57 UTC (permalink / raw)
  To: Andre Vehreschild; +Cc: GCC-Fortran-ML

I don't know too much about the testsuite infrastructure.
You'll likely need to ping jakub or tobias, who seem to 
be the most active gomp contributors.

On my FreeBSD system, I have my sources in gcc/gccx, build in
gcc/objx, and install into $HOME/work/x.

For building and testing, I have a script that ends with

# MAKE is required to get the right make(1) propagated through
# the 'make' process including the check-fortran phase.
#
MAKE=gmake
export MAKE

../gccx/configure --prefix=$HOME/work/x --enable-languages=c,c++,fortran,lto \
  --enable-bootstrap --disable-nls --disable-multilib --disable-libssp \
  --enable-initfini-array

sleep 1

nice gmake -j6 bootstrap
sleep 1

cd gcc
nice gmake -j6 check-fortran
sleep 1

tail testsuite/gfortran/gfortran.sum

Most of the tests that fail have the following log file entry

==3733==ASan runtime does not come first in initial library list; you
should either link runtime to your application or manually preload it
with LD_PRELOAD.
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O0  execution test

I've never been able to track down how to fix this.  It would seem
to me that if some ASan lib needs to come first, then it should proactively
preload the requisite libraries during testing.

-- 
steve

On Fri, Jun 07, 2024 at 09:39:14AM +0200, Andre Vehreschild wrote:
> Hi Steve,
> 
> there have not been any answers yet, so thank you for looking into that. I
> tried your proposal and changed the installation directory to:
> 
> /mnt/work_store/gcc/installs/dev
> 
> Unfortunately this did not change anything. The gomp-tests are still unable to
> compile. But I don't see any issues with libsanitizer tests (at least nothing
> is reported) nor any issues with gmake, make and $MAKE. Looks like that is some
> Fedora 39 oddity perhaps? Do you have any pointers who might have insight in
> this expect stuff and could shed a light why this GFORTRAN_UNDER_TEST is
> checked in the gomp tests only when the libs are not found?
> 
> > PS: Welcome back to the gfortran effort.
> 
> Thanks, I hope to produce a constant stream of patches in the next year or even
> longer.
> 
> Thank you for your time. If you have any other idea that I could test, please
> let me know.
> 
> Regards,
> 	Andre
> --
> Andre Vehreschild * Email: vehre ad gmx dot de

-- 
Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-07 16:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-03 13:38 [GOMP, Fortran] RFC: Issues with gomp-fortran tests Andre Vehreschild
2024-06-06 19:56 ` Steve Kargl
2024-06-07  7:39   ` Andre Vehreschild
2024-06-07 16:57     ` Steve Kargl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).