Compilation
The downloaded archive file contains libraries and header files for you to build applications with HP-PVM or the process farm library.
Microsoft Windows
Simple makefiles are included, in Watcom and Microsoft formats. The windows makefile will compile these programs:pvmtest.exe - the HP-PVM test programUse wmake -f watcom.mak for the Watcom compilersimple.exe - the process farm times table program
pmbrot.exe - the parallel mandlebrot program
Use nmake /f micrsoft.mak for the Microsoft compilerThe Watcom makefile assumes the environmental variable WATCOM points to the path of the compiler. The Microsoft makefile requires you to edit the DIR variable in the makefile to give the path of the compiler.
These simple makefiles do not include the icon resources that the supplied executables have linked in. You might like to set up another directory for compiling the programs. Move all of the *.lib, *.dll, *.mak, *.h, *.c, *.f90 and *.a (for Unix) files into it. You should conserve the original supplied test executables - the makefiles will overwrite them if run in the same directory.
Once you have successfully compiled and tested the example programs, you are ready to produce you own.
HP-PVM
HP-PVM programs compiled using the Watcom compiler can use the HP-PVM static library. Programs using other compilers must use the DLL. You can use this by simply linking your programs with the import libraries. These are supplied in Watcom and Microsoft compiler formats.Use the pvm.h header file in any modules that calls HP-PVM functions.
pvmlib_w.lib Watcom format HP-PVM static librarypvmdll.dll HP-PVM dynamic library
pvmdll_w.lib Watcom format import library for pvmdll.dll
pvmdll_m.lib Microsoft format import library for pvmdll.dllpvm.h C library header file. Use with static or dynamic
version of the library.
The pvmtest program is in pvmtest.c.
To compile a Watcom version, link with pvmlib_w.lib and df_win_w.lib. The program uses the pvm.h and df_win.h header files. df_win is a simple default window display, similar to the Windows NT console window. Pvmtest is the only example program that uses this.
pvmtest.c Pvmtest source. This is a HP-PVM test program
pvmtest.exe Pvmtest executable. This is a Watcom format
compilation of the pvmtest programdf_win.h Simple text display window used by pvmtest.c
df_win_w.lib Watcom version
df_win_m.lib Microsoft version
To compile a Microsoft version, link with the pvmdll_m.lib and df_win_m.lib libraries.
Most of the HP-PVM commands have a fortran interface, supplied as a static library in Watcom and Microsoft formats. These can be linked with fortran applications, as well as HP-PVM library. You can use the static or dynamic version of the HP-PVM library.
flib_w.lib Watcom format fortran library
flib_m.lib Microsoft format fortran libraryfpvm.h Fortran functions header file
pvm_cons.h Fortran constants header filepvmtest.f90 Simple fortran test program
Process Farm
The process farm library includes the HP-PVM library so you do not need to link process farm programs with this. Link with procf_w.lib or procf_m.lib. Use the procfarm.h header file for the function prototypes. 'simple.c' is an NT console application. 'pmbrot.c' is a conventional windowed application.pf_man.txt Manual for process farm commands. Use "simple.c"
as a guideprocf_w.lib Watcom C format static process farm library
procf_m.lib Microsoft C format static process farm libraryprocfarm.h Process farm library header file
pmbrot.c Parallel mandlebrot source
simple.c Times table program sourcepmbrot.exe Parallel mandlebrot executable
simple.exe Times table example executable
Unix systems
A single Unix makefile file called 'makefile' will compile these programs:pvmtest - the HP-PVM test programYou might like to set up another directory for compiling the programs. Move all of the *.a, makefile, *.h and *.c files into it. You should conserve the original supplied test executables - the makefiles will overwrite them if run in the same directory.
simple - the process farm times table programOnce you have successfully compiled and tested the example programs, you are ready to produce you own.
HP-PVM
pvmlib.a HP-PVM static librarypvm.h C header file
pvmtest.c Pvmtest source code
pvmtest Pvmtest executable
Process Farm
libprocfarm.a Process farm library
procfarm.h Process farm header filepmbrot.c Parallel mandlebrot source
simple.c Simple process farm times table sourcepmbrot Parallel mandlebrot executable
simple Times table executable
Implemented Commands
The following PVM 3.3 commands are currently implemented in HP-PVM. These account for most of the core capabilities of PVM, and additional commands can usually be added quickly if requested. Please refer to standard PVM documentation, and the supplied C examples for details of the use of these commands.
pvm_mytid pvm_parent pvm_exit
pvm_config pvm_addhosts pvm_mstat
pvm_notify pvm_pstat pvm_spawn
pvm_tidtohostpvm_bufinfo pvm_initsend pvm_nrecv
pvm_probe pvm_recv pvm_send
pvm_trecvpvm_pkbyte pvm_pkcplx pvm_pkdcplx
pvm_pkdouble pvm_pkfloat pvm_pkint
pvm_pklong pvm_pkshort pvm_pkstr
pvm_pkuint pvm_pkulong pvm_pkushortpvm_upkbyte pvm_upkcplx pvm_upkdcplx
pvm_upkdouble pvm_upkfloat pvm_upkint
pvm_upklong pvm_upkshort pvm_upkstr
pvm_upkuint pvm_upkulong pvm_upkushort
The following extra commands have been added to HP-PVM
pvme_config_ex
pvm_config with extended structure which includes count of number of processors per computer, which comes from the config file procs option. It is used in the same way as the standard pvm_config command.
pvme_nsendNon-blocking send command, used like pvm_send. The function returns 1 if the operation completes, and 0 if it does not. The command should be called repeatedly with the same arguments until it completes.
pvme_tsendTime-out send command.pvme_tprobe
PVMINT pvme_tsend(PVMINT dest, PVMINT msg, struct timeval *timeout);
If the send operation blocks and does not complete before the time-out is reached, it will return 0. If it completes it will return 1. The command should be called repeatedly with the same arguments until it completes.Time-out probe. This is used like pvm_probe, but waits for the specified time-out before returning 0, if no data is found.
pvme_set_iconSet icon to use for the pvm debug window. This must be done before calling any other pvm command.
pvme_sysinfoGet system info, as displayed at beginning of the pvmtest program.
pvme_terminateTerminate pvm from the windows procedure whilst in a blocking pvm function. The pvm function should exit with a PvmSysErr return value.
pvme_uniq_daemonForce the application to use a unique network of daemons, rather than using the existing one. This increases scaleabilty when several applications are being run on the same computer, as each daemon can support a limited number of tasks. It also removes the risk of one application breaking another by crashing the daemon.
Notable differences between HP-PVM and standard PVM
There are some notable differences between HP-PVM and standard PVM that the developer should to be aware of.
The large scaleable datagram communications used in HP-PVM, although currently quite slow, include full flow control, which overcomes serious problems that exist in standard PVMHP-PVM does not hijack WinMain or main entry points of your applications, which avoids potential clashes with other libraries which do the same. A slave task should call pvm_mytid to connect into the PVM system quickly after starting up, else it will time out and the spawn will fail at the parent task
HP-PVM applications automatically start up daemons if they are not already running, allowing a simpler, faster and more seamless use of the HP-PVM library by applications.
HP-PVM has some useful extended commands
No 'setopt' options are currently implemented. HP-PVM will perform well when communicating between computers of the same gender, without encoding being switched off, since it uses a different encoding method to standard PVM.
HP-PVM will automatically allocate direct TCP-IP connections or shared memory connections between tasks until resources run out, before falling back on the scaleable daemon routed datagram communications.
The non-determinism harness is currently not operational
The implementation of shared memory in HP-PVM is completely different to the approach used in standard PVM. Communications between shared memory machines and other machines on the network will be significantly faster as direct TCP-IP links are created between tasks, but shared memory communication under Unix may be slower, due to the multiplexing of TCP-IP and shared memory communications.