Add a couple of test programs
This commit was SVN r22137.
Этот коммит содержится в:
родитель
033233a403
Коммит
7afd65d631
@ -1,4 +1,4 @@
|
||||
PROGS = mpi_no_op mpi_barrier hello hello_nodename abort multi_abort simple_spawn concurrent_spawn spawn_multiple mpi_spin delayed_abort loop_spawn loop_child bad_exit pubsub hello_barrier segv accept connect hello_output hello_show_help crisscross read_write ziatest slave_spawn slave cell_spawn reduce-hang ziaprobe ziatest bcast_loop parallel_w8 parallel_w64 parallel_r8 parallel_r64 sio sendrecv_blaster
|
||||
PROGS = mpi_no_op mpi_barrier hello hello_nodename abort multi_abort simple_spawn concurrent_spawn spawn_multiple mpi_spin delayed_abort loop_spawn loop_child bad_exit pubsub hello_barrier segv accept connect hello_output hello_show_help crisscross read_write ziatest slave_spawn slave cell_spawn reduce-hang ziaprobe ziatest bcast_loop parallel_w8 parallel_w64 parallel_r8 parallel_r64 sio sendrecv_blaster hello++ hellof90
|
||||
|
||||
all: $(PROGS)
|
||||
|
||||
@ -16,7 +16,7 @@ CFLAGS_INTERNAL = -I../../.. -I../../../orte/include -I../../../opal/include
|
||||
CXX = mpic++
|
||||
CXXFLAGS = -g
|
||||
F77 = mpif77
|
||||
FC = mpif77
|
||||
FC = mpif90
|
||||
FFLAGS = -g
|
||||
|
||||
clean:
|
||||
|
24
orte/test/mpi/hello++.cc
Обычный файл
24
orte/test/mpi/hello++.cc
Обычный файл
@ -0,0 +1,24 @@
|
||||
//
|
||||
// Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
// University Research and Technology
|
||||
// Corporation. All rights reserved.
|
||||
// Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
//
|
||||
// Sample MPI "hello world" application in C++
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
#include "mpi.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int rank, size;
|
||||
|
||||
MPI::Init(argc, argv);
|
||||
rank = MPI::COMM_WORLD.Get_rank();
|
||||
size = MPI::COMM_WORLD.Get_size();
|
||||
std::cout << "Hello, world! I am " << rank << " of " << size << std::endl;
|
||||
MPI::Finalize();
|
||||
|
||||
return 0;
|
||||
}
|
21
orte/test/mpi/hellof90.f90
Обычный файл
21
orte/test/mpi/hellof90.f90
Обычный файл
@ -0,0 +1,21 @@
|
||||
!
|
||||
! Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
! University Research and Technology
|
||||
! Corporation. All rights reserved.
|
||||
! Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
! All rights reserved.
|
||||
! Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
!
|
||||
! Sample MPI "hello world" application in Fortran 90
|
||||
!
|
||||
program main
|
||||
use mpi
|
||||
implicit none
|
||||
integer :: ierr, rank, size
|
||||
|
||||
call MPI_INIT(ierr)
|
||||
call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)
|
||||
call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierr)
|
||||
print *, "Hello, world, I am ", rank, " of ", size
|
||||
call MPI_FINALIZE(ierr)
|
||||
end
|
Загрузка…
Ссылка в новой задаче
Block a user