coarrays using extended precision (80 bits) ?

2023-04-21 Thread Jorge D'Elia
Dear GFortran developers, 

One question: is there any chance of encoding with coarrays using 
extended precision (80 bits) at least inside a multicore computer? 
(as if to simplify a bit). 

To date, the possibility of using double precision (64 bits) or 
extended precision (80 bits) is an alternative in our production 
code, but sometimes we would like to do computations in 
80 bits and, in certain parts, there are coarrays. 
We have validated even in quadruple precision (128 bits), using 
ifort although, as is well known, the CPU times are largely 
excessive. 

Thanks in any case. 

Regards. 
Jorge. 
​​CIMEC (UNL-CONICET), [ http://www.cimec.org.ar/ | www.cimec.org.ar ] 
-- 


(GCC) 13.0.1: internal compiler error

2023-04-21 Thread Patrick Begou via Fortran

Hi,

I have built this morning the latest gfortran from a git clone:

GNU Fortran (GCC) 13.0.1 20230421 (prerelease)

I'm trying this compiler on a large and complexe Fortran90 code with 
offloading using OpenACC.


At this time:

- code compiles with nvfortran and runs on A100 GPU.

- code compiles with Cray Fortran (with some difficulties) but do not 
run on MI250 GPU (we are tacking the problem, a segfault if openacc is 
set on)


- code compile with GNU GCC 13 without -fopenacc option and runs on cpu 
(Epyc2 7302)


- a basic test-code using OpenACC compiles and run on the GPU.

- compiling my large code with gcc 13.0.1 using -fopenacc for A100 GPU 
produce an internal error in the compiler :



transforms_defs_m.f90:354:53:

  354 | !$acc enter data attach(atransform2%next)
  | ^
internal compiler error: in omp_group_base, at gimplify.cc:9412
0xa830c6 omp_group_base
    ../../gcc/gcc/gimplify.cc:9412
0xa830c6 omp_index_mapping_groups_1
    ../../gcc/gcc/gimplify.cc:9441
0xa833c7 omp_index_mapping_groups
    ../../gcc/gcc/gimplify.cc:9502
0xa96a9a gimplify_scan_omp_clauses
    ../../gcc/gcc/gimplify.cc:10802
0xa8660d gimplify_omp_target_update
    ../../gcc/gcc/gimplify.cc:15563
0xa8660d gimplify_expr(tree_node**, gimple**, gimple**, bool 
(*)(tree_node*), int)

    ../../gcc/gcc/gimplify.cc:16928
0xa89826 gimplify_stmt(tree_node**, gimple**)
    ../../gcc/gcc/gimplify.cc:7219
0xa875a3 gimplify_statement_list
    ../../gcc/gcc/gimplify.cc:2019
0xa875a3 gimplify_expr(tree_node**, gimple**, gimple**, bool 
(*)(tree_node*), int)

    ../../gcc/gcc/gimplify.cc:16821
0xa89826 gimplify_stmt(tree_node**, gimple**)
    ../../gcc/gcc/gimplify.cc:7219
0xa86e8a gimplify_and_add(tree_node*, gimple**)
    ../../gcc/gcc/gimplify.cc:492
0xa86e8a gimplify_loop_expr
    ../../gcc/gcc/gimplify.cc:1993
0xa86e8a gimplify_expr(tree_node**, gimple**, gimple**, bool 
(*)(tree_node*), int)

    ../../gcc/gcc/gimplify.cc:16581
0xa89826 gimplify_stmt(tree_node**, gimple**)
    ../../gcc/gcc/gimplify.cc:7219
0xa875a3 gimplify_statement_list
    ../../gcc/gcc/gimplify.cc:2019
0xa875a3 gimplify_expr(tree_node**, gimple**, gimple**, bool 
(*)(tree_node*), int)

    ../../gcc/gcc/gimplify.cc:16821
0xa89826 gimplify_stmt(tree_node**, gimple**)
    ../../gcc/gcc/gimplify.cc:7219
0xa89d2b gimplify_bind_expr
    ../../gcc/gcc/gimplify.cc:1430
0xa86d8e gimplify_expr(tree_node**, gimple**, gimple**, bool 
(*)(tree_node*), int)

    ../../gcc/gcc/gimplify.cc:16577
0xa89826 gimplify_stmt(tree_node**, gimple**)
    ../../gcc/gcc/gimplify.cc:7219
Please submit a full bug report, with preprocessed source (by using 
-freport-bug).



Options used (I've just added  -fopenacc for moving from cpu version to 
OpenACC):


-fopenacc -freport-bug -g -fpic -x f95-cpp-input -std=gnu -ffree-form 
-fall-intrinsics -fallow-argument-mismatch -Wall -Wextra -W 
-Wno-unused-function -Wno-compare-reals -fno-omit-frame-pointer  -O3  
-ftree-vectorize -ffast-math -funroll-loops -pipe


No additionnal files a produced with -freport-bug.

In attachment the script used to build the compiler.

Let me know how I can help with informations to improve Gnu fortran 
compilers.


Patrick


build_all.sh
Description: application/shellscript


Re: coarrays using extended precision (80 bits) ?

2023-04-21 Thread Steve Kargl via Fortran
On Fri, Apr 21, 2023 at 08:33:31AM -0300, Jorge D'Elia wrote:
> Dear GFortran developers, 
> 
> One question: is there any chance of encoding with coarrays using 
> extended precision (80 bits) at least inside a multicore computer? 
> (as if to simplify a bit). 
> 
> To date, the possibility of using double precision (64 bits) or 
> extended precision (80 bits) is an alternative in our production 
> code, but sometimes we would like to do computations in 
> 80 bits and, in certain parts, there are coarrays. 
> We have validated even in quadruple precision (128 bits), using 
> ifort although, as is well known, the CPU times are largely 
> excessive. 
> 
> Thanks in any case. 
> 

Well, I just installed OpenCoarray and downloaded a pi/4
monte carlo code that Thomas wrote using REAL.  I changed
everything to use REAL(10).  Compiled and executed without
a problem.  I also tested REAL(16), which worked although
it's painfully slow due to software floating point.  So,
I guess I don't understand what you're asking?

-- 
Steve