RCCE_init.3 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. .TH RCCE 3 2010-02-04 "RCCE MANPAGE" "RCCE Library"
  2. .SH NAME
  3. RCCE_init \- RCCE intitialization function
  4. .SH SYNOPSIS
  5. .B #include <rcce.h>
  6. .sp
  7. .BI "int RCCE_init(int *" argc ", char ***" argv );
  8. .SH DESCRIPTION
  9. The
  10. .BR RCCE_init()
  11. is the RCCE initialization function. It is analogous to
  12. .BR MPI_init()
  13. and provides a place for any code required to set up the environment
  14. for RCCE programs.
  15. .BR RCCE_init()
  16. is a collective routine that must be
  17. encountered jointly by all UEs. It must be the first RCCE statement in
  18. the program. It must also come before any statements that read or
  19. write the argc and/or argv variables.
  20. .TP
  21. .B argc
  22. Pointer to the number of application arguments on the command line.
  23. .TP
  24. .B argv
  25. Pointer to a pointer to an array of strings (application command line arguments).
  26. .SH "RETURN VALUE"
  27. Upon successful completion
  28. .BR RCCE_init ()
  29. returns
  30. .BR RCCE_SUCCESS .
  31. .SH ERRORS
  32. Look in
  33. .BR rcce.h
  34. for additional error codes.
  35. .SH "SEE ALSO"
  36. rcce.h(5)
  37. .SH EXAMPLE
  38. .PP
  39. This example is taken from RCCE_pingpong.c in the apps directory.
  40. .PP
  41. #include <string.h>
  42. .br
  43. #include <stdio.h>
  44. .br
  45. #include "RCCE.h"
  46. .br
  47. .br
  48. #define BUFSIZE 32
  49. .br
  50. #define MAXROUND 10
  51. .br
  52. int RCCE_APP(int argc, char **argv){
  53. .br
  54. int YOU, ME, round;
  55. .br
  56. double timer;
  57. .br
  58. char buffer[BUFSIZE+1];
  59. .br
  60. .
  61. .br
  62. .
  63. .br
  64. .
  65. .br
  66. .br
  67. .BI " RCCE_init(&argc,"" &argv);"
  68. .br
  69. RCCE_debug_set(RCCE_DEBUG_ALL);
  70. .br
  71. .
  72. .br
  73. .
  74. .br
  75. .
  76. .br
  77. .br
  78. return(0);
  79. .br
  80. }