Commit Graph

10 Commits

Author SHA1 Message Date
Tobias Burnus
86187d0fe0 trans-decl.c (generate_coarray_sym_init): Use GFC_CAF_COARRAY_STATIC for static coarrays.
gcc/fortran/
2011-08-29  Tobias Burnus  <burnus@net-b.de>

        * trans-decl.c (generate_coarray_sym_init): Use
        GFC_CAF_COARRAY_STATIC for static coarrays.

libgfortan/
2011-08-29  Tobias Burnus  <burnus@net-b.de>

        * caf/libcaf.h (_gfortran_caf_deregister): Update prototype.
        * caf/mpi.c (_gfortran_caf_deregister): Modify prototype,
        actually free memory and add error diagnostic.
        (_gfortran_caf_finalize): Add additional free calls.
        * caf/single.c (_gfortran_caf_deregister): Modify prototype,
        actually free memory and add error diagnostic.
        (_gfortran_caf_finalize): Add additional free calls.

From-SVN: r178193
2011-08-29 12:33:09 +02:00
Daniel Carrera
c0f1579204 mpi.c (caf_runtime_error): Change fprintf to vfprintf.
2011-07-15  Daniel Carrera  <dcarrera@gmail.com>

	* caf/mpi.c (caf_runtime_error): Change fprintf to vfprintf.
	* caf/single.c (caf_runtime_error): Ditto.

From-SVN: r176340
2011-07-15 22:39:03 +00:00
Daniel Carrera
8019694098 Remove error parameter from caf_runtime_error. Add caf_runtime_error to single.c.
From-SVN: r176278
2011-07-14 15:49:00 +00:00
Tobias Burnus
41de45c6a0 mpi.c (runtime_error): New function.
2011-07-09  Tobias Burnus  <burnus@net-b.de>
            Daniel Carrera  <dcarrera@gmail.com>

        * caf/mpi.c (runtime_error): New function.
        (_gfortran_caf_register): Use it.
        (_gfortran_caf_sync_all): Use it, add STAT_STOPPED_IMAGE
        as possible status value.
        (_gfortran_caf_sync_images): Ditto.


Co-Authored-By: Daniel Carrera <dcarrera@gmail.com>

From-SVN: r176080
2011-07-09 16:29:50 +02:00
Tobias Burnus
4054bc52d6 trans.c (gfc_allocate_with_status): Call _gfortran_caf_register with NULL arguments for (new) stat=/errmsg= arguments.
2011-07-07  Tobias Burnus  <burnus@net-b.de>

        * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register
        with NULL arguments for (new) stat=/errmsg= arguments.

2011-07-07  Tobias Burnus  <burnus@net-b.de>

        * libcaf.h (__attribute__, unlikely, likely): New macros.
        (caf_register_t): Update comment.
        (_gfortran_caf_register): Add stat, errmsg, errmsg_len arguments.
        * single.c (_gfortran_caf_register): Ditto; add error diagnostics.
        * mpi.c (_gfortran_caf_register): Ditto.
        (caf_is_finalized): New global variable.
        (_gfortran_caf_finalize): Use it.

From-SVN: r175966
2011-07-07 14:46:18 +02:00
Daniel Carrera
0a1138af63 single.c (_gfortran_caf_register): Store the address of all static coarrays in a linked list.
2011-06-17  Daniel Carrera  <dcarrera@gmail.com>

        * caf/single.c (_gfortran_caf_register): Store the address
        of all static coarrays in a linked list.
        (_gfortran_caf_finalize): Free memory of staic coarrays.
        * caf/mpi.c (_gfortran_caf_register): Store the address
        of all static coarrays in a linked list. Initialize MPI
        if necessary.
        (_gfortran_caf_finalize): Free memory of staic coarrays.
        (_gfortran_caf_init): Check if MPI is already initialized
        before initializing again.
        * caf/libcaf.h: Add a type to caf_register_t to distinguish
        static coarrays and add the type caf_static_t to make the
        linked list of static coarrays.

From-SVN: r175124
2011-06-17 01:09:36 +02:00
Daniel Carrera
f5c01f5bde trans-decl.c (gfc_build_builtin_function_decls): Updated declaration of caf_sync_all and caf_sync_images.
gcc/fortran/
2011-06-10  Daniel Carrera  <dcarrera@gmail.com>

        * trans-decl.c (gfc_build_builtin_function_decls):
        Updated declaration of caf_sync_all and caf_sync_images.
        * trans-stmt.c (gfc_trans_sync): Function
        can now handle a "stat" variable that has an integer type
        different from integer_type_node.

libgfortran/
2011-06-10  Daniel Carrera  <dcarrera@gmail.com>

        * caf/mpi.c (_gfortran_caf_sync_all,
        _gfortran_caf_sync_images): Functions have void return type
        and move status into parameter list.
        * caf/single.c (_gfortran_caf_sync_all,
        _gfortran_caf_sync_images): Functions have void return type
        and move status into parameter list.
        * caf/libcaf.h (_gfortran_caf_sync_all,
        _gfortran_caf_sync_images): Functions have void return type
        and move status into parameter list.

gcc/testsuite/
2011-06-10  Daniel Carrera  <dcarrera@gmail.com>

        * gfortran.dg/coarray/sync_1.f90: New test for
        "SYNC ALL", "SYNC MEMORY" and "SYNC IMAGES".

From-SVN: r174896
2011-06-10 12:22:24 +02:00
Tobias Burnus
cc9ae24cbe re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])
2011-05-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * caf/libcaf.h: Cleanup headers.
        (_gfortran_caf_critical, _gfortran_caf_end_critical): Make stub.
        (caf_register_t): New enum.
        (_gfortran_caf_register, _gfortran_caf_deregister): New prototype.
        * caf/single.c (_gfortran_caf_critical,
        _gfortran_caf_end_critical): Remove.
        (_gfortran_caf_register, _gfortran_caf_deregister): New functions.
        * caf/mpi.c (_gfortran_caf_critical,
        _gfortran_caf_end_critical): Remove.
        (_gfortran_caf_register, _gfortran_caf_deregister): New functions.
        (caf_world_window): Remove global variable.
        (_gfortran_caf_init): Fix off-by-one error of this_image.

From-SVN: r173505
2011-05-06 20:35:00 +02:00
Tobias Burnus
6eb87b330f re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])
2011-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * caf/mpi.c (_gfortran_caf_init, _gfortran_caf_finalize):
        Add global variable caf_mpi_initialized and use it for when
        finalizing.

From-SVN: r172059
2011-04-06 20:29:55 +02:00
Tobias Burnus
5092eb960c re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])
2011-03-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * caf/libcaf.h: New - coarray communication library.
        * caf/mpi.c: New.
        * caf/single.c: New.

From-SVN: r171570
2011-03-27 11:01:34 +02:00