~ubuntu-branches/ubuntu/saucy/nwchem/saucy

« back to all changes in this revision

Viewing changes to src/tools/ga-4-3/tcgmsg-mpi/test_asyn.c

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2012-02-09 20:02:41 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120209200241-jgk03qfsphal4ug2
Tags: 6.1-1
* New upstream release.

[ Michael Banck ]
* debian/patches/02_makefile_flags.patch: Updated.
* debian/patches/02_makefile_flags.patch: Use internal blas and lapack code.
* debian/patches/02_makefile_flags.patch: Define GCC4 for LINUX and LINUX64
  (Closes: #632611 and LP: #791308).
* debian/control (Build-Depends): Added openssh-client.
* debian/rules (USE_SCALAPACK, SCALAPACK): Removed variables (Closes:
  #654658).
* debian/rules (LIBDIR, USE_MPIF4, ARMCI_NETWORK): New variables.
* debian/TODO: New file.
* debian/control (Build-Depends): Removed libblas-dev, liblapack-dev and
  libscalapack-mpi-dev.
* debian/patches/04_show_testsuite_diff_output.patch: New patch, shows the
  diff output for failed tests.
* debian/patches/series: Adjusted.
* debian/testsuite: Optionally run all tests if "all" is passed as option.
* debian/rules: Run debian/testsuite with "all" if DEB_BUILD_OPTIONS
  contains "checkall".

[ Daniel Leidert ]
* debian/control: Used wrap-and-sort. Added Vcs-Svn and Vcs-Browser fields.
  (Priority): Moved to extra according to policy section 2.5.
  (Standards-Version): Bumped to 3.9.2.
  (Description): Fixed a typo.
* debian/watch: Added.
* debian/patches/03_hurd-i386_define_path_max.patch: Added.
  - Define MAX_PATH if not defines to fix FTBFS on hurd.
* debian/patches/series: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
#include <mpi.h>
 
3
 
 
4
main(argc, argv)
 
5
int argc;
 
6
char *argv[];
 
7
{
 
8
int numprocs, myid;
 
9
int ierr;
 
10
char req=0, ack=0;
 
11
int atag=999, rtag=555, to;
 
12
MPI_Status status;
 
13
MPI_Request request;
 
14
 
 
15
 
 
16
   MPI_Init(&argc, &argv);
 
17
   MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
 
18
   MPI_Comm_rank(MPI_COMM_WORLD, &myid);
 
19
 
 
20
   if(myid==0){
 
21
      to = numprocs-1;
 
22
      printf("Testing nonblocking receive\n\n"); fflush(stdout);
 
23
      ierr = MPI_Irecv(&ack, 1, MPI_CHAR, to, atag ,MPI_COMM_WORLD, &request);
 
24
      printf(":after nonblocking receive\n"); fflush(stdout);
 
25
      ierr = MPI_Send(&req, 1, MPI_CHAR, to, rtag, MPI_COMM_WORLD);
 
26
      printf(":sent request\n"); fflush(stdout);
 
27
      ierr = MPI_Wait(&request, &status);
 
28
      printf(":received response\n"); fflush(stdout);
 
29
      printf("\nnonblocking receive is working\n"); fflush(stdout);
 
30
   }
 
31
   if(myid==numprocs-1){
 
32
      to = 0;
 
33
      ierr = MPI_Recv(&req, 1, MPI_CHAR, to, rtag, MPI_COMM_WORLD, &status);
 
34
      printf("::request received\n"); fflush(stdout);
 
35
      ierr = MPI_Send(&ack, 1, MPI_CHAR, to, atag, MPI_COMM_WORLD);
 
36
   }
 
37
   MPI_Finalize();
 
38
}
 
39
 
 
40
 
 
41
   
 
42