MYTID(3PVM) PVM Version 3.4 MYTID(3PVM)NAME
pvm_mytid - Returns the tid of the calling process.
SYNOPSIS
C int tid = pvm_mytid( void )
Fortran call pvmfmytid( tid )
PARAMETERS
tid Integer returning the task identifier of the calling PVM process. Values less than zero indicate an error.
DESCRIPTION
The routine pvm_mytid enrolls this process into PVM on its first call. It also generates a unique tid if this process was not created by
pvm_spawn. pvm_mytid returns the tid of the calling process and can be called multiple times in an application.
Any PVM system call (not just pvm_mytid) will enroll a task in PVM if the task is not enrolled before the call.
The tid is a 32 bit positive integer created by the local pvmd. The 32 bits are divided into fields that encode various information about
this process such as its location in the virtual machine (i.e. local pvmd address), the CPU number in the case where the process is on a
multiprocessor, and a process ID field. This information is used by PVM and is not expected to be used by applications. Applications
should not attempt to predict or interpret the tid with the exception of calling tidtohost()
If PVM has not been started before an application calls pvm_mytid the returned tid will be < 0.
EXAMPLES
C:
tid = pvm_mytid( );
Fortran:
CALL PVMFMYTID( TID )
ERRORS
This error condition can be returned by pvm_mytid
PvmSysErr
pvmd not responding.
SEE ALSO pvm_tidtohost(3PVM), pvm_parent(3PVM)
30 August, 1993 MYTID(3PVM)
Check Out this Related Man Page
GETINST(3PVM) PVM Version 3.4 GETINST(3PVM)NAME
pvm_getinst - Returns the instance number in a group of a PVM process.
SYNOPSIS
C int inum = pvm_getinst( char *group, int tid )
Fortran call pvmfgetinst( group, tid, inum )
PARAMETERS
group Character string group name of an existing group.
tid Integer task identifier of a PVM process.
inum Integer instance number returned by the routine. Instance numbers start at 0 and count up. Values less than zero indicate an
error.
DESCRIPTION
The routine pvm_getinst takes a group name group and a PVM task identifier tid and returns the unique instance number that corresponds to
the input. It can be called by any task whether in the group or not. If pvm_getinst is successful, inum will be >= 0. If some error
occurs then inum will be < 0.
EXAMPLES
C:
inum = pvm_getinst( "worker", pvm_mytid() );
--------
inum = pvm_getinst( "worker", tid[i] );
Fortran:
CALL PVMFGETINST( 'GROUP3', TID, INUM )
ERRORS
These error conditions can be returned by pvm_getinst
PvmSysErr
pvmd was not started or has crashed.
PvmBadParam
giving an invalid tid value.
PvmNoGroup
giving a non-existent group name.
PvmNotInGroup
specifying a group in which the tid is not a member.
SEE ALSO pvm_joingroup(3PVM), pvm_gettid(3PVM)
30 August, 1993 GETINST(3PVM)
I would like to ask that PrintHello accepts a void pointer but how come you can equate it to an integer directly ?
" tid = (int)threadid; "
while at the same time instead if a pointer a normal variable was passed into this function
" pthread_create(&threads, NULL, PrintHello, (void *)t); "
... (2 Replies)
Hi,
I am working on a ksh script and I´m stuck on the following:
I have to get the pthread_id from a procstack file for a particular tid#.
---------- tid# 1274057 (pthread ID: 1800) ----------
---------- tid# 1736913 (pthread ID: 4019) ----------
---------- tid# 1478705 (pthread ID: ... (7 Replies)