2007-12-21 09:02:00 +03:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; -*- */
|
2004-03-20 04:54:18 +03:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2011-06-24 00:38:02 +04:00
|
|
|
* Copyright (c) 2004-2011 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
== Highlights ==
1. New mpifort wrapper compiler: you can utilize mpif.h, use mpi, and use mpi_f08 through this one wrapper compiler
1. mpif77 and mpif90 still exist, but are sym links to mpifort and may be removed in a future release
1. The mpi module has been re-implemented and is significantly "mo' bettah"
1. The mpi_f08 module offers many, many improvements over mpif.h and the mpi module
This stuff is coming from a VERY long-lived mercurial branch (3 years!); it'll almost certainly take a few SVN commits and a bunch of testing before I get it correctly committed to the SVN trunk.
== More details ==
Craig Rasmussen and I have been working with the MPI-3 Fortran WG and Fortran J3 committees for a long, long time to make a prototype MPI-3 Fortran bindings implementation. We think we're at a stable enough state to bring this stuff back to the trunk, with the goal of including it in OMPI v1.7.
Special thanks go out to everyone who has been incredibly patient and helpful to us in this journey:
* Rolf Rabenseifner/HLRS (mastermind/genius behind the entire MPI-3 Fortran effort)
* The Fortran J3 committee
* Tobias Burnus/gfortran
* Tony !Goetz/Absoft
* Terry !Donte/Oracle
* ...and probably others whom I'm forgetting :-(
There's still opportunities for optimization in the mpi_f08 implementation, but by and large, it is as far along as it can be until Fortran compilers start implementing the new F08 dimension(..) syntax.
Note that gfortran is currently unsupported for the mpi_f08 module and the new mpi module. gfortran users will a) fall back to the same mpi module implementation that is in OMPI v1.5.x, and b) not get the new mpi_f08 module. The gfortran maintainers are actively working hard to add the necessary features to support both the new mpi_f08 module and the new mpi module implementations. This will take some time.
As mentioned above, ompi/mpi/f77 and ompi/mpi/f90 no longer exist. All the fortran bindings implementations have been collated under ompi/mpi/fortran; each implementation has its own subdirectory:
{{{
ompi/mpi/fortran/
base/ - glue code
mpif-h/ - what used to be ompi/mpi/f77
use-mpi-tkr/ - what used to be ompi/mpi/f90
use-mpi-ignore-tkr/ - new mpi module implementation
use-mpi-f08/ - new mpi_f08 module implementation
}}}
There's also a prototype 6-function-MPI implementation under use-mpi-f08-desc that emulates the new F08 dimension(..) syntax that isn't fully available in Fortran compilers yet. We did that to prove it to ourselves that it could be done once the compilers fully support it. This directory/implementation will likely eventually replace the use-mpi-f08 version.
Other things that were done:
* ompi_info grew a few new output fields to describe what level of Fortran support is included
* Existing Fortran examples in examples/ were renamed; new mpi_f08 examples were added
* The old Fortran MPI libraries were renamed:
* libmpi_f77 -> libmpi_mpifh
* libmpi_f90 -> libmpi_usempi
* The configury for Fortran was consolidated and significantly slimmed down. Note that the F77 env variable is now IGNORED for configure; you should only use FC. Example:
{{{
shell$ ./configure CC=icc CXX=icpc FC=ifort ...
}}}
All of this work was done in a Mercurial branch off the SVN trunk, and hosted at Bitbucket. This branch has got to be one of OMPI's longest-running branches. Its first commit was Tue Apr 07 23:01:46 2009 -0400 -- it's over 3 years old! :-) We think we've pulled in all relevant changes from the OMPI trunk (e.g., Fortran implementations of the new MPI-3 MPROBE stuff for mpif.h, use mpi, and use mpi_f08, and the recent Fujitsu Fortran patches).
I anticipate some instability when we bring this stuff into the trunk, simply because it touches a LOT of code in the MPI layer in the OMPI code base. We'll try our best to make it as pain-free as possible, but please bear with us when it is committed.
This commit was SVN r26283.
2012-04-18 19:57:29 +04:00
|
|
|
* Copyright (c) 2008-2012 Cisco Systems, Inc. All rights reserved.
|
2009-02-24 20:17:33 +03:00
|
|
|
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-03-19 09:12:43 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "ompi_config.h"
|
2004-03-19 09:12:43 +03:00
|
|
|
|
2009-03-13 05:10:32 +03:00
|
|
|
#ifdef HAVE_STRING_H
|
|
|
|
#include <string.h>
|
|
|
|
#endif
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/communicator/communicator.h"
|
|
|
|
#include "ompi/win/win.h"
|
|
|
|
#include "ompi/errhandler/errhandler.h"
|
|
|
|
#include "ompi/errhandler/errhandler_predefined.h"
|
2007-12-21 09:02:00 +03:00
|
|
|
#include "opal/class/opal_pointer_array.h"
|
2004-03-19 09:12:43 +03:00
|
|
|
|
|
|
|
|
2004-03-19 22:01:09 +03:00
|
|
|
/*
|
|
|
|
* Table for Fortran <-> C errhandler handle conversion
|
|
|
|
*/
|
2007-12-21 09:02:00 +03:00
|
|
|
opal_pointer_array_t ompi_errhandler_f_to_c_table;
|
2004-03-19 09:12:43 +03:00
|
|
|
|
2004-03-19 22:01:09 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Class information
|
|
|
|
*/
|
2004-06-07 19:33:53 +04:00
|
|
|
static void ompi_errhandler_construct(ompi_errhandler_t *eh);
|
|
|
|
static void ompi_errhandler_destruct(ompi_errhandler_t *eh);
|
2004-03-19 09:12:43 +03:00
|
|
|
|
|
|
|
|
2004-04-21 02:17:20 +04:00
|
|
|
/*
|
|
|
|
* Class instance
|
|
|
|
*/
|
2005-07-03 20:06:07 +04:00
|
|
|
OBJ_CLASS_INSTANCE(ompi_errhandler_t, opal_object_t, ompi_errhandler_construct,
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_errhandler_destruct);
|
2004-03-19 09:12:43 +03:00
|
|
|
|
|
|
|
|
== Highlights ==
1. New mpifort wrapper compiler: you can utilize mpif.h, use mpi, and use mpi_f08 through this one wrapper compiler
1. mpif77 and mpif90 still exist, but are sym links to mpifort and may be removed in a future release
1. The mpi module has been re-implemented and is significantly "mo' bettah"
1. The mpi_f08 module offers many, many improvements over mpif.h and the mpi module
This stuff is coming from a VERY long-lived mercurial branch (3 years!); it'll almost certainly take a few SVN commits and a bunch of testing before I get it correctly committed to the SVN trunk.
== More details ==
Craig Rasmussen and I have been working with the MPI-3 Fortran WG and Fortran J3 committees for a long, long time to make a prototype MPI-3 Fortran bindings implementation. We think we're at a stable enough state to bring this stuff back to the trunk, with the goal of including it in OMPI v1.7.
Special thanks go out to everyone who has been incredibly patient and helpful to us in this journey:
* Rolf Rabenseifner/HLRS (mastermind/genius behind the entire MPI-3 Fortran effort)
* The Fortran J3 committee
* Tobias Burnus/gfortran
* Tony !Goetz/Absoft
* Terry !Donte/Oracle
* ...and probably others whom I'm forgetting :-(
There's still opportunities for optimization in the mpi_f08 implementation, but by and large, it is as far along as it can be until Fortran compilers start implementing the new F08 dimension(..) syntax.
Note that gfortran is currently unsupported for the mpi_f08 module and the new mpi module. gfortran users will a) fall back to the same mpi module implementation that is in OMPI v1.5.x, and b) not get the new mpi_f08 module. The gfortran maintainers are actively working hard to add the necessary features to support both the new mpi_f08 module and the new mpi module implementations. This will take some time.
As mentioned above, ompi/mpi/f77 and ompi/mpi/f90 no longer exist. All the fortran bindings implementations have been collated under ompi/mpi/fortran; each implementation has its own subdirectory:
{{{
ompi/mpi/fortran/
base/ - glue code
mpif-h/ - what used to be ompi/mpi/f77
use-mpi-tkr/ - what used to be ompi/mpi/f90
use-mpi-ignore-tkr/ - new mpi module implementation
use-mpi-f08/ - new mpi_f08 module implementation
}}}
There's also a prototype 6-function-MPI implementation under use-mpi-f08-desc that emulates the new F08 dimension(..) syntax that isn't fully available in Fortran compilers yet. We did that to prove it to ourselves that it could be done once the compilers fully support it. This directory/implementation will likely eventually replace the use-mpi-f08 version.
Other things that were done:
* ompi_info grew a few new output fields to describe what level of Fortran support is included
* Existing Fortran examples in examples/ were renamed; new mpi_f08 examples were added
* The old Fortran MPI libraries were renamed:
* libmpi_f77 -> libmpi_mpifh
* libmpi_f90 -> libmpi_usempi
* The configury for Fortran was consolidated and significantly slimmed down. Note that the F77 env variable is now IGNORED for configure; you should only use FC. Example:
{{{
shell$ ./configure CC=icc CXX=icpc FC=ifort ...
}}}
All of this work was done in a Mercurial branch off the SVN trunk, and hosted at Bitbucket. This branch has got to be one of OMPI's longest-running branches. Its first commit was Tue Apr 07 23:01:46 2009 -0400 -- it's over 3 years old! :-) We think we've pulled in all relevant changes from the OMPI trunk (e.g., Fortran implementations of the new MPI-3 MPROBE stuff for mpif.h, use mpi, and use mpi_f08, and the recent Fujitsu Fortran patches).
I anticipate some instability when we bring this stuff into the trunk, simply because it touches a LOT of code in the MPI layer in the OMPI code base. We'll try our best to make it as pain-free as possible, but please bear with us when it is committed.
This commit was SVN r26283.
2012-04-18 19:57:29 +04:00
|
|
|
/*
|
|
|
|
* _addr flavors are for F03 bindings
|
|
|
|
*/
|
2009-02-24 20:17:33 +03:00
|
|
|
ompi_predefined_errhandler_t ompi_mpi_errhandler_null;
|
== Highlights ==
1. New mpifort wrapper compiler: you can utilize mpif.h, use mpi, and use mpi_f08 through this one wrapper compiler
1. mpif77 and mpif90 still exist, but are sym links to mpifort and may be removed in a future release
1. The mpi module has been re-implemented and is significantly "mo' bettah"
1. The mpi_f08 module offers many, many improvements over mpif.h and the mpi module
This stuff is coming from a VERY long-lived mercurial branch (3 years!); it'll almost certainly take a few SVN commits and a bunch of testing before I get it correctly committed to the SVN trunk.
== More details ==
Craig Rasmussen and I have been working with the MPI-3 Fortran WG and Fortran J3 committees for a long, long time to make a prototype MPI-3 Fortran bindings implementation. We think we're at a stable enough state to bring this stuff back to the trunk, with the goal of including it in OMPI v1.7.
Special thanks go out to everyone who has been incredibly patient and helpful to us in this journey:
* Rolf Rabenseifner/HLRS (mastermind/genius behind the entire MPI-3 Fortran effort)
* The Fortran J3 committee
* Tobias Burnus/gfortran
* Tony !Goetz/Absoft
* Terry !Donte/Oracle
* ...and probably others whom I'm forgetting :-(
There's still opportunities for optimization in the mpi_f08 implementation, but by and large, it is as far along as it can be until Fortran compilers start implementing the new F08 dimension(..) syntax.
Note that gfortran is currently unsupported for the mpi_f08 module and the new mpi module. gfortran users will a) fall back to the same mpi module implementation that is in OMPI v1.5.x, and b) not get the new mpi_f08 module. The gfortran maintainers are actively working hard to add the necessary features to support both the new mpi_f08 module and the new mpi module implementations. This will take some time.
As mentioned above, ompi/mpi/f77 and ompi/mpi/f90 no longer exist. All the fortran bindings implementations have been collated under ompi/mpi/fortran; each implementation has its own subdirectory:
{{{
ompi/mpi/fortran/
base/ - glue code
mpif-h/ - what used to be ompi/mpi/f77
use-mpi-tkr/ - what used to be ompi/mpi/f90
use-mpi-ignore-tkr/ - new mpi module implementation
use-mpi-f08/ - new mpi_f08 module implementation
}}}
There's also a prototype 6-function-MPI implementation under use-mpi-f08-desc that emulates the new F08 dimension(..) syntax that isn't fully available in Fortran compilers yet. We did that to prove it to ourselves that it could be done once the compilers fully support it. This directory/implementation will likely eventually replace the use-mpi-f08 version.
Other things that were done:
* ompi_info grew a few new output fields to describe what level of Fortran support is included
* Existing Fortran examples in examples/ were renamed; new mpi_f08 examples were added
* The old Fortran MPI libraries were renamed:
* libmpi_f77 -> libmpi_mpifh
* libmpi_f90 -> libmpi_usempi
* The configury for Fortran was consolidated and significantly slimmed down. Note that the F77 env variable is now IGNORED for configure; you should only use FC. Example:
{{{
shell$ ./configure CC=icc CXX=icpc FC=ifort ...
}}}
All of this work was done in a Mercurial branch off the SVN trunk, and hosted at Bitbucket. This branch has got to be one of OMPI's longest-running branches. Its first commit was Tue Apr 07 23:01:46 2009 -0400 -- it's over 3 years old! :-) We think we've pulled in all relevant changes from the OMPI trunk (e.g., Fortran implementations of the new MPI-3 MPROBE stuff for mpif.h, use mpi, and use mpi_f08, and the recent Fujitsu Fortran patches).
I anticipate some instability when we bring this stuff into the trunk, simply because it touches a LOT of code in the MPI layer in the OMPI code base. We'll try our best to make it as pain-free as possible, but please bear with us when it is committed.
This commit was SVN r26283.
2012-04-18 19:57:29 +04:00
|
|
|
ompi_predefined_errhandler_t *ompi_mpi_errhandler_null_addr =
|
|
|
|
&ompi_mpi_errhandler_null;
|
2009-02-24 20:17:33 +03:00
|
|
|
ompi_predefined_errhandler_t ompi_mpi_errors_are_fatal;
|
== Highlights ==
1. New mpifort wrapper compiler: you can utilize mpif.h, use mpi, and use mpi_f08 through this one wrapper compiler
1. mpif77 and mpif90 still exist, but are sym links to mpifort and may be removed in a future release
1. The mpi module has been re-implemented and is significantly "mo' bettah"
1. The mpi_f08 module offers many, many improvements over mpif.h and the mpi module
This stuff is coming from a VERY long-lived mercurial branch (3 years!); it'll almost certainly take a few SVN commits and a bunch of testing before I get it correctly committed to the SVN trunk.
== More details ==
Craig Rasmussen and I have been working with the MPI-3 Fortran WG and Fortran J3 committees for a long, long time to make a prototype MPI-3 Fortran bindings implementation. We think we're at a stable enough state to bring this stuff back to the trunk, with the goal of including it in OMPI v1.7.
Special thanks go out to everyone who has been incredibly patient and helpful to us in this journey:
* Rolf Rabenseifner/HLRS (mastermind/genius behind the entire MPI-3 Fortran effort)
* The Fortran J3 committee
* Tobias Burnus/gfortran
* Tony !Goetz/Absoft
* Terry !Donte/Oracle
* ...and probably others whom I'm forgetting :-(
There's still opportunities for optimization in the mpi_f08 implementation, but by and large, it is as far along as it can be until Fortran compilers start implementing the new F08 dimension(..) syntax.
Note that gfortran is currently unsupported for the mpi_f08 module and the new mpi module. gfortran users will a) fall back to the same mpi module implementation that is in OMPI v1.5.x, and b) not get the new mpi_f08 module. The gfortran maintainers are actively working hard to add the necessary features to support both the new mpi_f08 module and the new mpi module implementations. This will take some time.
As mentioned above, ompi/mpi/f77 and ompi/mpi/f90 no longer exist. All the fortran bindings implementations have been collated under ompi/mpi/fortran; each implementation has its own subdirectory:
{{{
ompi/mpi/fortran/
base/ - glue code
mpif-h/ - what used to be ompi/mpi/f77
use-mpi-tkr/ - what used to be ompi/mpi/f90
use-mpi-ignore-tkr/ - new mpi module implementation
use-mpi-f08/ - new mpi_f08 module implementation
}}}
There's also a prototype 6-function-MPI implementation under use-mpi-f08-desc that emulates the new F08 dimension(..) syntax that isn't fully available in Fortran compilers yet. We did that to prove it to ourselves that it could be done once the compilers fully support it. This directory/implementation will likely eventually replace the use-mpi-f08 version.
Other things that were done:
* ompi_info grew a few new output fields to describe what level of Fortran support is included
* Existing Fortran examples in examples/ were renamed; new mpi_f08 examples were added
* The old Fortran MPI libraries were renamed:
* libmpi_f77 -> libmpi_mpifh
* libmpi_f90 -> libmpi_usempi
* The configury for Fortran was consolidated and significantly slimmed down. Note that the F77 env variable is now IGNORED for configure; you should only use FC. Example:
{{{
shell$ ./configure CC=icc CXX=icpc FC=ifort ...
}}}
All of this work was done in a Mercurial branch off the SVN trunk, and hosted at Bitbucket. This branch has got to be one of OMPI's longest-running branches. Its first commit was Tue Apr 07 23:01:46 2009 -0400 -- it's over 3 years old! :-) We think we've pulled in all relevant changes from the OMPI trunk (e.g., Fortran implementations of the new MPI-3 MPROBE stuff for mpif.h, use mpi, and use mpi_f08, and the recent Fujitsu Fortran patches).
I anticipate some instability when we bring this stuff into the trunk, simply because it touches a LOT of code in the MPI layer in the OMPI code base. We'll try our best to make it as pain-free as possible, but please bear with us when it is committed.
This commit was SVN r26283.
2012-04-18 19:57:29 +04:00
|
|
|
ompi_predefined_errhandler_t *ompi_mpi_errors_are_fatal_addr =
|
|
|
|
&ompi_mpi_errors_are_fatal;
|
2009-02-24 20:17:33 +03:00
|
|
|
ompi_predefined_errhandler_t ompi_mpi_errors_return;
|
== Highlights ==
1. New mpifort wrapper compiler: you can utilize mpif.h, use mpi, and use mpi_f08 through this one wrapper compiler
1. mpif77 and mpif90 still exist, but are sym links to mpifort and may be removed in a future release
1. The mpi module has been re-implemented and is significantly "mo' bettah"
1. The mpi_f08 module offers many, many improvements over mpif.h and the mpi module
This stuff is coming from a VERY long-lived mercurial branch (3 years!); it'll almost certainly take a few SVN commits and a bunch of testing before I get it correctly committed to the SVN trunk.
== More details ==
Craig Rasmussen and I have been working with the MPI-3 Fortran WG and Fortran J3 committees for a long, long time to make a prototype MPI-3 Fortran bindings implementation. We think we're at a stable enough state to bring this stuff back to the trunk, with the goal of including it in OMPI v1.7.
Special thanks go out to everyone who has been incredibly patient and helpful to us in this journey:
* Rolf Rabenseifner/HLRS (mastermind/genius behind the entire MPI-3 Fortran effort)
* The Fortran J3 committee
* Tobias Burnus/gfortran
* Tony !Goetz/Absoft
* Terry !Donte/Oracle
* ...and probably others whom I'm forgetting :-(
There's still opportunities for optimization in the mpi_f08 implementation, but by and large, it is as far along as it can be until Fortran compilers start implementing the new F08 dimension(..) syntax.
Note that gfortran is currently unsupported for the mpi_f08 module and the new mpi module. gfortran users will a) fall back to the same mpi module implementation that is in OMPI v1.5.x, and b) not get the new mpi_f08 module. The gfortran maintainers are actively working hard to add the necessary features to support both the new mpi_f08 module and the new mpi module implementations. This will take some time.
As mentioned above, ompi/mpi/f77 and ompi/mpi/f90 no longer exist. All the fortran bindings implementations have been collated under ompi/mpi/fortran; each implementation has its own subdirectory:
{{{
ompi/mpi/fortran/
base/ - glue code
mpif-h/ - what used to be ompi/mpi/f77
use-mpi-tkr/ - what used to be ompi/mpi/f90
use-mpi-ignore-tkr/ - new mpi module implementation
use-mpi-f08/ - new mpi_f08 module implementation
}}}
There's also a prototype 6-function-MPI implementation under use-mpi-f08-desc that emulates the new F08 dimension(..) syntax that isn't fully available in Fortran compilers yet. We did that to prove it to ourselves that it could be done once the compilers fully support it. This directory/implementation will likely eventually replace the use-mpi-f08 version.
Other things that were done:
* ompi_info grew a few new output fields to describe what level of Fortran support is included
* Existing Fortran examples in examples/ were renamed; new mpi_f08 examples were added
* The old Fortran MPI libraries were renamed:
* libmpi_f77 -> libmpi_mpifh
* libmpi_f90 -> libmpi_usempi
* The configury for Fortran was consolidated and significantly slimmed down. Note that the F77 env variable is now IGNORED for configure; you should only use FC. Example:
{{{
shell$ ./configure CC=icc CXX=icpc FC=ifort ...
}}}
All of this work was done in a Mercurial branch off the SVN trunk, and hosted at Bitbucket. This branch has got to be one of OMPI's longest-running branches. Its first commit was Tue Apr 07 23:01:46 2009 -0400 -- it's over 3 years old! :-) We think we've pulled in all relevant changes from the OMPI trunk (e.g., Fortran implementations of the new MPI-3 MPROBE stuff for mpif.h, use mpi, and use mpi_f08, and the recent Fujitsu Fortran patches).
I anticipate some instability when we bring this stuff into the trunk, simply because it touches a LOT of code in the MPI layer in the OMPI code base. We'll try our best to make it as pain-free as possible, but please bear with us when it is committed.
This commit was SVN r26283.
2012-04-18 19:57:29 +04:00
|
|
|
ompi_predefined_errhandler_t *ompi_mpi_errors_return_addr =
|
|
|
|
&ompi_mpi_errors_return;
|
2009-02-24 20:17:33 +03:00
|
|
|
ompi_predefined_errhandler_t ompi_mpi_errors_throw_exceptions;
|
== Highlights ==
1. New mpifort wrapper compiler: you can utilize mpif.h, use mpi, and use mpi_f08 through this one wrapper compiler
1. mpif77 and mpif90 still exist, but are sym links to mpifort and may be removed in a future release
1. The mpi module has been re-implemented and is significantly "mo' bettah"
1. The mpi_f08 module offers many, many improvements over mpif.h and the mpi module
This stuff is coming from a VERY long-lived mercurial branch (3 years!); it'll almost certainly take a few SVN commits and a bunch of testing before I get it correctly committed to the SVN trunk.
== More details ==
Craig Rasmussen and I have been working with the MPI-3 Fortran WG and Fortran J3 committees for a long, long time to make a prototype MPI-3 Fortran bindings implementation. We think we're at a stable enough state to bring this stuff back to the trunk, with the goal of including it in OMPI v1.7.
Special thanks go out to everyone who has been incredibly patient and helpful to us in this journey:
* Rolf Rabenseifner/HLRS (mastermind/genius behind the entire MPI-3 Fortran effort)
* The Fortran J3 committee
* Tobias Burnus/gfortran
* Tony !Goetz/Absoft
* Terry !Donte/Oracle
* ...and probably others whom I'm forgetting :-(
There's still opportunities for optimization in the mpi_f08 implementation, but by and large, it is as far along as it can be until Fortran compilers start implementing the new F08 dimension(..) syntax.
Note that gfortran is currently unsupported for the mpi_f08 module and the new mpi module. gfortran users will a) fall back to the same mpi module implementation that is in OMPI v1.5.x, and b) not get the new mpi_f08 module. The gfortran maintainers are actively working hard to add the necessary features to support both the new mpi_f08 module and the new mpi module implementations. This will take some time.
As mentioned above, ompi/mpi/f77 and ompi/mpi/f90 no longer exist. All the fortran bindings implementations have been collated under ompi/mpi/fortran; each implementation has its own subdirectory:
{{{
ompi/mpi/fortran/
base/ - glue code
mpif-h/ - what used to be ompi/mpi/f77
use-mpi-tkr/ - what used to be ompi/mpi/f90
use-mpi-ignore-tkr/ - new mpi module implementation
use-mpi-f08/ - new mpi_f08 module implementation
}}}
There's also a prototype 6-function-MPI implementation under use-mpi-f08-desc that emulates the new F08 dimension(..) syntax that isn't fully available in Fortran compilers yet. We did that to prove it to ourselves that it could be done once the compilers fully support it. This directory/implementation will likely eventually replace the use-mpi-f08 version.
Other things that were done:
* ompi_info grew a few new output fields to describe what level of Fortran support is included
* Existing Fortran examples in examples/ were renamed; new mpi_f08 examples were added
* The old Fortran MPI libraries were renamed:
* libmpi_f77 -> libmpi_mpifh
* libmpi_f90 -> libmpi_usempi
* The configury for Fortran was consolidated and significantly slimmed down. Note that the F77 env variable is now IGNORED for configure; you should only use FC. Example:
{{{
shell$ ./configure CC=icc CXX=icpc FC=ifort ...
}}}
All of this work was done in a Mercurial branch off the SVN trunk, and hosted at Bitbucket. This branch has got to be one of OMPI's longest-running branches. Its first commit was Tue Apr 07 23:01:46 2009 -0400 -- it's over 3 years old! :-) We think we've pulled in all relevant changes from the OMPI trunk (e.g., Fortran implementations of the new MPI-3 MPROBE stuff for mpif.h, use mpi, and use mpi_f08, and the recent Fujitsu Fortran patches).
I anticipate some instability when we bring this stuff into the trunk, simply because it touches a LOT of code in the MPI layer in the OMPI code base. We'll try our best to make it as pain-free as possible, but please bear with us when it is committed.
This commit was SVN r26283.
2012-04-18 19:57:29 +04:00
|
|
|
ompi_predefined_errhandler_t *ompi_mpi_errors_throw_exceptions_addr =
|
|
|
|
&ompi_mpi_errors_throw_exceptions;
|
2004-11-27 01:11:22 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Local state to know when the three intrinsics have been freed; see
|
|
|
|
* the errhandler destructor for more info.
|
|
|
|
*/
|
|
|
|
static bool null_freed = false;
|
|
|
|
static bool fatal_freed = false;
|
|
|
|
static bool return_freed = false;
|
2006-12-31 02:41:42 +03:00
|
|
|
static bool throw_freed = false;
|
2004-11-27 01:11:22 +03:00
|
|
|
|
|
|
|
|
2004-03-19 09:12:43 +03:00
|
|
|
/*
|
2004-06-07 19:33:53 +04:00
|
|
|
* Initialize OMPI errhandler infrastructure
|
2004-03-19 09:12:43 +03:00
|
|
|
*/
|
2004-06-07 19:33:53 +04:00
|
|
|
int ompi_errhandler_init(void)
|
2004-03-19 09:12:43 +03:00
|
|
|
{
|
2004-06-07 19:33:53 +04:00
|
|
|
/* initialize ompi_errhandler_f_to_c_table */
|
2004-03-19 09:12:43 +03:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
OBJ_CONSTRUCT( &ompi_errhandler_f_to_c_table, opal_pointer_array_t);
|
|
|
|
if( OPAL_SUCCESS != opal_pointer_array_init(&ompi_errhandler_f_to_c_table, 0,
|
2009-06-01 23:02:34 +04:00
|
|
|
OMPI_FORTRAN_HANDLE_MAX, 64) ) {
|
2004-06-07 19:33:53 +04:00
|
|
|
return OMPI_ERROR;
|
2004-03-19 09:12:43 +03:00
|
|
|
}
|
|
|
|
|
2004-05-01 00:11:07 +04:00
|
|
|
/* Initialize the predefined error handlers */
|
2009-02-24 20:17:33 +03:00
|
|
|
OBJ_CONSTRUCT( &ompi_mpi_errhandler_null.eh, ompi_errhandler_t );
|
|
|
|
if( ompi_mpi_errhandler_null.eh.eh_f_to_c_index != OMPI_ERRHANDLER_NULL_FORTRAN )
|
2004-06-07 19:33:53 +04:00
|
|
|
return OMPI_ERROR;
|
2009-02-24 20:17:33 +03:00
|
|
|
ompi_mpi_errhandler_null.eh.eh_mpi_object_type = OMPI_ERRHANDLER_TYPE_PREDEFINED;
|
|
|
|
ompi_mpi_errhandler_null.eh.eh_lang = OMPI_ERRHANDLER_LANG_C;
|
|
|
|
ompi_mpi_errhandler_null.eh.eh_comm_fn = NULL;
|
|
|
|
ompi_mpi_errhandler_null.eh.eh_file_fn = NULL;
|
|
|
|
ompi_mpi_errhandler_null.eh.eh_win_fn = NULL ;
|
|
|
|
ompi_mpi_errhandler_null.eh.eh_fort_fn = NULL;
|
|
|
|
strncpy (ompi_mpi_errhandler_null.eh.eh_name, "MPI_ERRHANDLER_NULL",
|
2004-09-09 18:38:04 +04:00
|
|
|
strlen("MPI_ERRHANDLER_NULL")+1 );
|
|
|
|
|
2004-03-19 09:12:43 +03:00
|
|
|
|
2009-02-24 20:17:33 +03:00
|
|
|
OBJ_CONSTRUCT( &ompi_mpi_errors_are_fatal.eh, ompi_errhandler_t );
|
|
|
|
if( ompi_mpi_errors_are_fatal.eh.eh_f_to_c_index != OMPI_ERRORS_ARE_FATAL_FORTRAN )
|
2004-06-07 19:33:53 +04:00
|
|
|
return OMPI_ERROR;
|
2009-02-24 20:17:33 +03:00
|
|
|
ompi_mpi_errors_are_fatal.eh.eh_mpi_object_type = OMPI_ERRHANDLER_TYPE_PREDEFINED;
|
|
|
|
ompi_mpi_errors_are_fatal.eh.eh_lang = OMPI_ERRHANDLER_LANG_C;
|
|
|
|
ompi_mpi_errors_are_fatal.eh.eh_comm_fn = ompi_mpi_errors_are_fatal_comm_handler;
|
|
|
|
ompi_mpi_errors_are_fatal.eh.eh_file_fn = ompi_mpi_errors_are_fatal_file_handler;
|
|
|
|
ompi_mpi_errors_are_fatal.eh.eh_win_fn = ompi_mpi_errors_are_fatal_win_handler ;
|
|
|
|
ompi_mpi_errors_are_fatal.eh.eh_fort_fn = NULL;
|
|
|
|
strncpy (ompi_mpi_errors_are_fatal.eh.eh_name, "MPI_ERRORS_ARE_FATAL",
|
2004-09-09 18:38:04 +04:00
|
|
|
strlen("MPI_ERRORS_ARE_FATAL")+1 );
|
2004-03-19 09:12:43 +03:00
|
|
|
|
2009-02-24 20:17:33 +03:00
|
|
|
OBJ_CONSTRUCT( &ompi_mpi_errors_return.eh, ompi_errhandler_t );
|
|
|
|
if( ompi_mpi_errors_return.eh.eh_f_to_c_index != OMPI_ERRORS_RETURN_FORTRAN )
|
2004-06-07 19:33:53 +04:00
|
|
|
return OMPI_ERROR;
|
2009-02-24 20:17:33 +03:00
|
|
|
ompi_mpi_errors_return.eh.eh_mpi_object_type = OMPI_ERRHANDLER_TYPE_PREDEFINED;
|
|
|
|
ompi_mpi_errors_return.eh.eh_lang = OMPI_ERRHANDLER_LANG_C;
|
|
|
|
ompi_mpi_errors_return.eh.eh_comm_fn = ompi_mpi_errors_return_comm_handler;
|
|
|
|
ompi_mpi_errors_return.eh.eh_file_fn = ompi_mpi_errors_return_file_handler;
|
|
|
|
ompi_mpi_errors_return.eh.eh_win_fn = ompi_mpi_errors_return_win_handler;
|
|
|
|
ompi_mpi_errors_return.eh.eh_fort_fn = NULL;
|
|
|
|
strncpy (ompi_mpi_errors_return.eh.eh_name, "MPI_ERRORS_RETURN",
|
2004-09-09 18:38:04 +04:00
|
|
|
strlen("MPI_ERRORS_RETURN")+1 );
|
2004-03-19 09:12:43 +03:00
|
|
|
|
2009-02-06 00:36:10 +03:00
|
|
|
/* If we're going to use C++, functions will be fixed up during
|
|
|
|
MPI::Init. Note that it is proper to use ERRHANDLER_LANG_C here;
|
|
|
|
the dispatch function is in C (although in libmpi_cxx); the
|
|
|
|
conversion from C handles to C++ handles happens in that dispatch
|
|
|
|
function -- not the errhandler_invoke.c stuff here in libmpi. */
|
2009-02-24 20:17:33 +03:00
|
|
|
OBJ_CONSTRUCT( &ompi_mpi_errors_throw_exceptions.eh, ompi_errhandler_t );
|
|
|
|
ompi_mpi_errors_throw_exceptions.eh.eh_mpi_object_type =
|
2009-02-06 00:36:10 +03:00
|
|
|
OMPI_ERRHANDLER_TYPE_PREDEFINED;
|
2009-02-24 20:17:33 +03:00
|
|
|
ompi_mpi_errors_throw_exceptions.eh.eh_lang = OMPI_ERRHANDLER_LANG_C;
|
|
|
|
ompi_mpi_errors_throw_exceptions.eh.eh_comm_fn =
|
2009-02-06 00:36:10 +03:00
|
|
|
ompi_mpi_errors_are_fatal_comm_handler;
|
2009-02-24 20:17:33 +03:00
|
|
|
ompi_mpi_errors_throw_exceptions.eh.eh_file_fn =
|
2009-02-06 00:36:10 +03:00
|
|
|
ompi_mpi_errors_are_fatal_file_handler;
|
2009-02-24 20:17:33 +03:00
|
|
|
ompi_mpi_errors_throw_exceptions.eh.eh_win_fn =
|
2009-02-06 00:36:10 +03:00
|
|
|
ompi_mpi_errors_are_fatal_win_handler ;
|
2009-02-24 20:17:33 +03:00
|
|
|
ompi_mpi_errors_throw_exceptions.eh.eh_fort_fn = NULL;
|
|
|
|
strncpy (ompi_mpi_errors_throw_exceptions.eh.eh_name, "MPI_ERRORS_THROW_EXCEPTIONS",
|
2006-12-31 02:41:42 +03:00
|
|
|
strlen("MPI_ERRORS_THROW_EXCEPTIONS")+1 );
|
|
|
|
|
2004-03-19 09:12:43 +03:00
|
|
|
/* All done */
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
return OMPI_SUCCESS;
|
2004-03-19 09:12:43 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Clean up the errorhandler resources
|
|
|
|
*/
|
2004-06-07 19:33:53 +04:00
|
|
|
int ompi_errhandler_finalize(void)
|
2004-03-19 09:12:43 +03:00
|
|
|
{
|
2004-11-27 01:11:22 +03:00
|
|
|
/* Forcibly release the intrinsic error handlers because in order
|
|
|
|
to be safe, we increase the refcount on error handlers in
|
|
|
|
MPI_*_GET_ERRHANDLER and MPI_ERRHANDLER_GET. If these handles
|
|
|
|
are never ERRHANDLER_FREEd, then the refcount will not be
|
|
|
|
decremented and they will not naturally get to 0 during
|
|
|
|
FINALIZE. Hence, we RELEASE on the intrinsics until they are
|
|
|
|
freed. */
|
|
|
|
|
|
|
|
while (!null_freed) {
|
2009-02-24 20:17:33 +03:00
|
|
|
OBJ_DESTRUCT(&ompi_mpi_errhandler_null.eh);
|
2004-11-27 01:11:22 +03:00
|
|
|
}
|
|
|
|
while (!fatal_freed) {
|
2009-02-24 20:17:33 +03:00
|
|
|
OBJ_DESTRUCT(&ompi_mpi_errors_are_fatal.eh);
|
2004-11-27 01:11:22 +03:00
|
|
|
}
|
|
|
|
while (!return_freed) {
|
2009-02-24 20:17:33 +03:00
|
|
|
OBJ_DESTRUCT(&ompi_mpi_errors_return.eh);
|
2004-11-27 01:11:22 +03:00
|
|
|
}
|
2006-12-31 02:41:42 +03:00
|
|
|
while (!throw_freed) {
|
2009-02-24 20:17:33 +03:00
|
|
|
OBJ_DESTRUCT(&ompi_mpi_errors_throw_exceptions.eh);
|
2006-12-31 02:41:42 +03:00
|
|
|
}
|
2004-03-19 09:12:43 +03:00
|
|
|
|
2004-11-27 01:11:22 +03:00
|
|
|
/* JMS Add stuff here checking for unreleased errorhandlers,
|
|
|
|
similar to communicators, info handles, etc. */
|
|
|
|
|
|
|
|
/* Remove errhandler F2C table */
|
2005-01-28 21:47:52 +03:00
|
|
|
|
|
|
|
/* Forcibly release the intrinsic error handlers because in order to
|
|
|
|
be safe, we increase the refcount on error handlers in
|
|
|
|
MPI_*_GET_ERRHANDLER and MPI_ERRHANDLER_GET. If these handles
|
|
|
|
are never ERRHANDLER_FREEd, then the refcount will not be
|
|
|
|
decremented and they will not naturally get to 0 during FINALIZE.
|
|
|
|
Hence, we RELEASE on the intrinsics until they are freed. */
|
2004-03-19 09:12:43 +03:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
OBJ_DESTRUCT(&ompi_errhandler_f_to_c_table);
|
2004-03-19 09:12:43 +03:00
|
|
|
|
2004-11-27 01:11:22 +03:00
|
|
|
/* All done */
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
2004-03-26 08:00:29 +03:00
|
|
|
}
|
2004-03-19 20:29:39 +03:00
|
|
|
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_errhandler_t *ompi_errhandler_create(ompi_errhandler_type_t object_type,
|
2008-02-10 22:29:25 +03:00
|
|
|
ompi_errhandler_generic_handler_fn_t *func,
|
|
|
|
ompi_errhandler_lang_t lang)
|
2004-03-19 20:29:39 +03:00
|
|
|
{
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_errhandler_t *new_errhandler;
|
2004-03-19 20:29:39 +03:00
|
|
|
|
|
|
|
/* Create a new object and ensure that it's valid */
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
new_errhandler = OBJ_NEW(ompi_errhandler_t);
|
2004-08-28 20:49:40 +04:00
|
|
|
if (NULL != new_errhandler) {
|
2010-05-19 00:54:11 +04:00
|
|
|
if (0 > new_errhandler->eh_f_to_c_index) {
|
2004-03-19 20:29:39 +03:00
|
|
|
OBJ_RELEASE(new_errhandler);
|
|
|
|
new_errhandler = NULL;
|
|
|
|
} else {
|
|
|
|
|
2008-02-10 22:29:25 +03:00
|
|
|
/* We cast the user's callback function to any one of the
|
|
|
|
function pointer types in the union; it doesn't matter which.
|
|
|
|
It only matters that we dereference/use the right member when
|
|
|
|
invoking the callback. */
|
|
|
|
|
2004-03-19 20:29:39 +03:00
|
|
|
new_errhandler->eh_mpi_object_type = object_type;
|
2008-02-10 22:29:25 +03:00
|
|
|
new_errhandler->eh_lang = lang;
|
2004-09-06 16:06:27 +04:00
|
|
|
switch (object_type ) {
|
|
|
|
case (OMPI_ERRHANDLER_TYPE_COMM):
|
2009-10-22 20:50:45 +04:00
|
|
|
new_errhandler->eh_comm_fn = (MPI_Comm_errhandler_function *)func;
|
2004-09-06 16:06:27 +04:00
|
|
|
break;
|
|
|
|
case (OMPI_ERRHANDLER_TYPE_FILE):
|
2007-09-15 15:19:13 +04:00
|
|
|
new_errhandler->eh_file_fn = (ompi_file_errhandler_fn *)func;
|
2004-09-06 16:06:27 +04:00
|
|
|
break;
|
|
|
|
case (OMPI_ERRHANDLER_TYPE_WIN):
|
2009-10-22 20:50:45 +04:00
|
|
|
new_errhandler->eh_win_fn = (MPI_Win_errhandler_function *)func;
|
2004-09-06 16:06:27 +04:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
new_errhandler->eh_fort_fn = (ompi_errhandler_fortran_handler_fn_t *)func;
|
2004-03-19 20:29:39 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* All done */
|
2004-08-28 20:49:40 +04:00
|
|
|
|
|
|
|
return new_errhandler;
|
2004-03-19 20:29:39 +03:00
|
|
|
}
|
|
|
|
|
2011-06-24 00:38:02 +04:00
|
|
|
/**
|
|
|
|
* Runtime errhandler callback
|
|
|
|
*/
|
|
|
|
void ompi_errhandler_runtime_callback(opal_pointer_array_t *procs) {
|
|
|
|
ompi_mpi_abort(MPI_COMM_WORLD, 1, false);
|
|
|
|
}
|
2004-03-19 20:29:39 +03:00
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
*
|
|
|
|
* Static functions
|
|
|
|
*
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Errhandler constructor
|
|
|
|
*/
|
2004-06-07 19:33:53 +04:00
|
|
|
static void ompi_errhandler_construct(ompi_errhandler_t *new_errhandler)
|
2004-03-19 20:29:39 +03:00
|
|
|
{
|
2006-11-08 20:02:46 +03:00
|
|
|
int ret_val;
|
2004-03-19 20:29:39 +03:00
|
|
|
|
|
|
|
/* assign entry in fortran <-> c translation array */
|
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
ret_val = opal_pointer_array_add(&ompi_errhandler_f_to_c_table,
|
2004-10-20 03:58:12 +04:00
|
|
|
new_errhandler);
|
2004-03-19 20:29:39 +03:00
|
|
|
new_errhandler->eh_f_to_c_index = ret_val;
|
2004-09-06 16:06:27 +04:00
|
|
|
|
2008-02-10 22:29:25 +03:00
|
|
|
new_errhandler->eh_lang = OMPI_ERRHANDLER_LANG_C;
|
2004-09-06 16:06:27 +04:00
|
|
|
|
|
|
|
new_errhandler->eh_comm_fn = NULL;
|
|
|
|
new_errhandler->eh_win_fn = NULL;
|
|
|
|
new_errhandler->eh_file_fn = NULL;
|
|
|
|
new_errhandler->eh_fort_fn = NULL;
|
|
|
|
|
2008-02-10 22:29:25 +03:00
|
|
|
new_errhandler->eh_cxx_dispatch_fn = NULL;
|
|
|
|
|
2004-09-06 16:06:27 +04:00
|
|
|
memset (new_errhandler->eh_name, 0, MPI_MAX_OBJECT_NAME);
|
2004-03-19 20:29:39 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Errhandler destructor
|
|
|
|
*/
|
2004-06-07 19:33:53 +04:00
|
|
|
static void ompi_errhandler_destruct(ompi_errhandler_t *errhandler)
|
2004-03-19 20:29:39 +03:00
|
|
|
{
|
2004-06-07 19:33:53 +04:00
|
|
|
/* reset the ompi_errhandler_f_to_c_table entry - make sure that the
|
2004-03-19 20:29:39 +03:00
|
|
|
entry is in the table */
|
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
if (NULL!= opal_pointer_array_get_item(&ompi_errhandler_f_to_c_table,
|
2004-03-19 20:29:39 +03:00
|
|
|
errhandler->eh_f_to_c_index)) {
|
2007-12-21 09:02:00 +03:00
|
|
|
opal_pointer_array_set_item(&ompi_errhandler_f_to_c_table,
|
|
|
|
errhandler->eh_f_to_c_index, NULL);
|
2004-03-19 20:29:39 +03:00
|
|
|
}
|
|
|
|
|
2004-11-27 01:11:22 +03:00
|
|
|
/* Reset the static state if we're releasing one of the
|
|
|
|
intrinsics */
|
2004-03-19 20:29:39 +03:00
|
|
|
|
2009-02-24 20:17:33 +03:00
|
|
|
if (&ompi_mpi_errhandler_null.eh == errhandler) {
|
2004-11-27 01:11:22 +03:00
|
|
|
null_freed = true;
|
2009-02-24 20:17:33 +03:00
|
|
|
} else if (&ompi_mpi_errors_are_fatal.eh == errhandler) {
|
2004-11-27 01:11:22 +03:00
|
|
|
fatal_freed = true;
|
2009-02-24 20:17:33 +03:00
|
|
|
} else if (&ompi_mpi_errors_return.eh == errhandler) {
|
2004-11-27 01:11:22 +03:00
|
|
|
return_freed = true;
|
2009-02-24 20:17:33 +03:00
|
|
|
} else if (&ompi_mpi_errors_throw_exceptions.eh == errhandler) {
|
2006-12-31 02:41:42 +03:00
|
|
|
throw_freed = true;
|
2004-11-27 01:11:22 +03:00
|
|
|
}
|
|
|
|
}
|