01-21-2008
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
I have a C++ program that generates a lot of log information on the console, I need this output (printed using printf function) to go to a file since I will use crontab to schedule the job.
I know I can do this:
myprog > myfile
but I don't know how to enter this in crontab.
I use... (3 Replies)
Discussion started by: GMMike
3 Replies
2. UNIX for Dummies Questions & Answers
Hello
I wander if im doing :
ls -l and its giving me lets say 3 results :
-rw-r--r-- 1 blah other 1789 May 19 2003 foo.c
-rw-r--r-- 1 blah other 1014 May 19 2003 foo.h
-rw-r--r-- 1 blah other 270 May 19 2003 foo1.c
now I would like to use the first... (1 Reply)
Discussion started by: umen
1 Replies
3. Programming
The output I got for this pgm is "4 4 4 4".
Can any one help me to understand how I got this output.
Also please suggest me some links to learn about argumnets evaluation in C.
# include <stdio.h>
void func(int a, int b, int c, int d)
{
printf("%d %d %d %d", a, b, c, d);
}
int... (3 Replies)
Discussion started by: arunviswanath
3 Replies
4. AIX
Hi All,
I found a strange thing in one of our DB server.
one of the file system /orcale/ABC/rman size df output showing 100% full eventhough its occupying 2.18MB
$ df -mP /oraclev/ABC/rman
Filesystem MB blocks Used Available Capacity Mounted on
/dev/lv20906 1024.00 1024.00 0.00 100%... (2 Replies)
Discussion started by: ram1729
2 Replies
5. UNIX for Dummies Questions & Answers
I Wrote code that forks into two processes, a parent process, and a child process. The parent process will take the arguments to main() and send them one character at a time to the child process through a pipe (one call to write for each character). The child process will count the characters... (1 Reply)
Discussion started by: hansel13
1 Replies
6. UNIX for Advanced & Expert Users
i use the system command to execute a shell command... ca i collect the out put in the form of a string or something using the same C program? (5 Replies)
Discussion started by: damn_bkb
5 Replies
7. Shell Programming and Scripting
Hello,
I was written a cgi with a textarea to save some words from web.
I grab and write words like this:
$cgiparams{'CONTENTS'} =~ s/\r//g;
#$cgiparams{'CONTENTS'} =~ s/á/á/g;
open(TM, ">$editedfilename");
#binmode(TM,... (1 Reply)
Discussion started by: Zaxon
1 Replies
8. Programming
Hello All,
iam a new memeber today i joined this forum.
hope i will get help. the below program takes input strings and give reverse of input string.
&& mv /home/test1/programs/display /home/test1/programs/old
echo " Please enter the test "
read a
echo "$a" > file
wc -c file > file1
perl... (1 Reply)
Discussion started by: ameyrk
1 Replies
9. Programming
Hi All,
When i try to compile the following code for 64-bit it works, whereas for 32-bit version, Compiler barfs:
#include <iostream>
#include <string>
class String {
public:
String() { }
String(const char* src) : myStr(src) { }
String(const std::string& src) :... (0 Replies)
Discussion started by: 14341
0 Replies
10. Shell Programming and Scripting
hi,
i have posted the same kind of the question in some other forum of the same site. but realized that it is supposed to be here so i am reposting it .this is the perl script written to check for particular pattern.
my file 1 would look like this
hwk:678:9878:asd:09: abc cfgb 12 nmjk ......... (3 Replies)
Discussion started by: anurupa777
3 Replies
MPI_Init(3OpenMPI) MPI_Init(3OpenMPI)
NAME
MPI_Init - Initializes the MPI execution environment
SYNTAX
C Syntax
#include <mpi.h>
int MPI_Init(int *argc, char ***argv)
Fortran Syntax
INCLUDE 'mpif.h'
MPI_INIT(IERROR)
INTEGER IERROR
C++ Syntax
#include <mpi.h>
void MPI::Init(int& argc, char**& argv)
void MPI::Init()
INPUT PARAMETERS
argc C/C++ only: Pointer to the number of arguments.
argv C/C++ only: Argument vector.
OUTPUT PARAMETER
IERROR Fortran only: Error status (integer).
DESCRIPTION
This routine, or MPI_Init_thread, must be called before any other MPI routine (apart from MPI_Initialized) is called. MPI can be initial-
ized at most once; subsequent calls to MPI_Init or MPI_Init_thread are erroneous.
All MPI programs must contain a call to MPI_Init or MPI_Init_thread. Open MPI accepts the C/C++ argc and argv arguments to main, but nei-
ther modifies, interprets, nor distributes them:
{
/* declare variables */
MPI_Init(&argc, &argv);
/* parse arguments */
/* main program */
MPI_Finalize();
}
NOTES
The Fortran version does not have provisions for argc and argv and takes only IERROR.
The MPI Standard does not say what a program can do before an MPI_Init or after an MPI_Finalize. In the Open MPI implementation, it should
do as little as possible. In particular, avoid anything that changes the external state of the program, such as opening files, reading
standard input, or writing to standard output.
ERRORS
Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ func-
tions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism
will be used to throw an MPI:Exception object.
Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for
I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be
used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error.
See the MPI man page for a full list of MPI error codes.
SEE ALSO
MPI_Init_thread
MPI_Initialized
MPI_Finalize
Open MPI 1.2 September 2006 MPI_Init(3OpenMPI)