1
1

fortran sizeof: ensure mpi_sizeof*f90 is not empty

Per http://www.open-mpi.org/community/lists/devel/2015/08/17775.php,
some compilers don't like it when there's a .f90 file that only
contains comments (and no actual Fortran code).  So if OMPI determines
that the Fortran compiler does not support enough Fortran mojo to
support MPI_SIZEOF, generate at least one dummy Fortran subroutine
that can be compiled in an otherwise barren Fortran landscape that is
devoid of life and hope.
Этот коммит содержится в:
--quiet 2015-08-20 13:01:14 -07:00
родитель 3050536157
Коммит d5763a8288

19
ompi/mpi/fortran/base/gen-mpi-sizeof.pl Исполняемый файл → Обычный файл
Просмотреть файл

@ -1,6 +1,6 @@
#!/usr/bin/env perl #!/usr/bin/env perl
# #
# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2015 Research Organization for Information Science # Copyright (c) 2015 Research Organization for Information Science
# and Technology (RIST). All rights reserved. # and Technology (RIST). All rights reserved.
# $COPYRIGHT$ # $COPYRIGHT$
@ -218,12 +218,23 @@ sub output_file {
! Specifically: we need support for the INTERFACE keyword, ! Specifically: we need support for the INTERFACE keyword,
! ISO_FORTRAN_ENV, and the STORAGE_SIZE() intrinsic on all types. ! ISO_FORTRAN_ENV, and the STORAGE_SIZE() intrinsic on all types.
! Apparently, this compiler does not support both of those things, so ! Apparently, this compiler does not support both of those things, so
! this file will be blank (i.e., we didn't bother generating the ! this file will be (effecitvely) blank (i.e., we didn't bother
! necessary stuff for MPI_SIZEOF because the compiler doesn't support ! generating the necessary stuff for MPI_SIZEOF because the compiler
! doesn't support
! it). ! it).
! !
! If you want support for MPI_SIZEOF, please use a different Fortran ! If you want support for MPI_SIZEOF, please use a different Fortran
! compiler to build Open MPI.\n\n"; ! compiler to build Open MPI.
! Dummy subroutine, just so that there is *some* Fortran in this file
! (some compilers are unhappy if there are no Fortran statements in this
! file).
subroutine ompi_sad_panda()
implicit none
print *, 'Open MPI is a sad panda because your Fortran compiler'
print *, 'does not support enough Fortran mojo for MPI_SIZEOF'
end subroutine ompi_sad_panda\n\n";
} }
close(OUT); close(OUT);