SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

62
devel/openmpi/pkg/README Normal file
View file

@ -0,0 +1,62 @@
+-----------------------------------------------------------------------
| Customizing ${PKGSTEM} execution on OpenBSD
+-----------------------------------------------------------------------
The OpenMPI runtime is controlled by numerous values specified
on the command line or with environment variables. See mpirun(1) and
ompi_info(1). Example**:
$ export PMIX_MCA_gds=hash
$ mpirun -np 2 -H localhost:2 \
-mca btl tcp,self \
-mca mpi_yield_when_idle 1 -- \
./mpitest
These values (at least) are useful:
OMPI_MCA_btl=self,tcp,vader
Avoid "vader" when launching many processes per node
and you have an NFS swap file. Or use local backing store.
(BTL is byte transfer layer. "vader" is shared memory
communication module.)
OMPI_MCA_mpi_yield_when_idle=1
Set to 1 may improve throughput when launching many
processes per node.
PMIX_MCA_gds=hash
This is the one gds (general data service) that works on OpenBSD.
OMPI_MCA_io=romio321
This is the prefered IO component on OpenBSD.
**Example code taken from:
https://hpcc.usc.edu/support/documentation/examples-of-mpi-programs/
(now only available via waybackmachine)
Compile with:
$ mpicc -o mpitest mpitest.c
/* Adapted from mpihello.f by drs */
#include <mpi.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv)
{
int rank;
char hostname[256];
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
gethostname(hostname, 255);
printf("Hello world! I am process number: %d on host %s\n",
rank, hostname);
MPI_Finalize();
return 0;
}