example direct launch debugger tool
naterini opened this issue · 2 comments
naterini commented
Background information
Example code does not compile
https://openpmix.github.io/support/how-to/example-direct-launch-debugger-tool
What version of the PMIx Reference RTE (PRRTE) are you using? (e.g., v2.0, v3.0, git master @ hash, etc.)
$ prte -V
prte (PRRTE) 4.0.0a1
What version of PMIx are you using? (e.g., v4.2.0, git branch name and hash, etc.)
Package: PMIx nate@OmicronPersei8 Distribution
PMIX: 6.0.0a1
PMIX repo revision: v1.1.3-3825-g7d25bd02
PMIX release date: Unreleased developer copy
PMIX Standard: 4.1
PMIX Standard ABI: Stable (0.0), Provisional (0.0)
Prefix: /usr/local/pmix/v5
Configured architecture: pmix.arch
Configure host: OmicronPersei8
Configured by: nate
Configured on: Mon Mar 13 21:57:47 UTC 2023
Configure host: OmicronPersei8
Configure command line: '--prefix=/usr/local/pmix/v5/' '--enable-debug'
'--with-slurm'
Built by: nate
Built on: Mon Mar 13 09:58:12 PM UTC 2023
Built host: OmicronPersei8
C compiler: /usr/local/gcc/12.2.0/bin/gcc
C compiler absolute:
C compiler family name: GNU
C compiler version: "12" "." "2" "." "1"
Internal debug support: yes
dl support: yes
Symbol vis. support: yes
Manpages built: yes
MCA bfrops: v12 (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA bfrops: v20 (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA bfrops: v21 (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA bfrops: v3 (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA bfrops: v4 (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA bfrops: v41 (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA gds: hash (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA gds: shmem (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA pcompress: zlib (MCA v2.1.0, API v2.0.0, Component v6.0.0)
MCA pdl: pdlopen (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA pfexec: linux (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA pif: posix_ipv4 (MCA v2.1.0, API v2.0.0, Component
v6.0.0)
MCA pinstalldirs: env (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA pinstalldirs: config (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA plog: default (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA plog: stdfd (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA plog: syslog (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA pmdl: mpich (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA pmdl: ompi (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA pmdl: oshmem (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA pnet: opa (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA preg: compress (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA preg: native (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA preg: raw (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA prm: default (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA prm: slurm (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA psec: native (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA psec: none (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA psec: munge (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA psensor: file (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA psensor: heartbeat (MCA v2.1.0, API v1.0.0, Component
v6.0.0)
MCA psquash: flex128 (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA psquash: native (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA pstat: linux (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA pstrg: vfs (MCA v2.1.0, API v1.0.0, Component v6.0.0)
MCA ptl: client (MCA v2.1.0, API v2.0.0, Component v6.0.0)
MCA ptl: server (MCA v2.1.0, API v2.0.0, Component v6.0.0)
MCA ptl: tool (MCA v2.1.0, API v2.0.0, Component v6.0.0)
Please describe the system on which you are running
- Operating system/version:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
$ gcc --version
gcc (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0
- Computer hardware: x86_64
- Network type: ethernet
Details of the problem
Example code does not compile with the following errors:
$ pcc test.c -o test
In file included from /usr/local/pmix/v5/include/pmix_common.h:2647,
from /usr/local/pmix/v5/include/pmix.h:53,
from /usr/local/pmix/v5/include/pmix_tool.h:64,
from test.c:8:
test.c: In function ‘main’:
test.c:202:30: error: ‘PMIX_CONNECT_SYSTEM_ONLY’ undeclared (first use in this function); did you mean ‘PMIX_CONNECT_SYSTEM_FIRST’?
202 | PMIX_INFO_LOAD(&info[0], PMIX_CONNECT_SYSTEM_ONLY, NULL, PMIX_BOOL);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pmix/v5/include/pmix_deprecated.h:642:30: note: in definition of macro ‘PMIX_INFO_LOAD’
642 | (void) PMIx_Info_load(i, k, d, t)
| ^
test.c:202:30: note: each undeclared identifier is reported only once for each function it appears in
202 | PMIX_INFO_LOAD(&info[0], PMIX_CONNECT_SYSTEM_ONLY, NULL, PMIX_BOOL);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pmix/v5/include/pmix_deprecated.h:642:30: note: in definition of macro ‘PMIX_INFO_LOAD’
642 | (void) PMIx_Info_load(i, k, d, t)
| ^
/usr/local/pmix/v5/include/pmix_deprecated.h:103:53: warning: passing argument 2 of ‘PMIx_Info_load’ makes pointer from integer without a cast [-Wint-conversion]
103 | #define PMIX_DEBUG_WAITING_FOR_NOTIFY -58
| ^~~
| |
| int
/usr/local/pmix/v5/include/pmix_deprecated.h:642:30: note: in definition of macro ‘PMIX_INFO_LOAD’
642 | (void) PMIx_Info_load(i, k, d, t)
| ^
test.c:348:31: note: in expansion of macro ‘PMIX_DEBUG_WAITING_FOR_NOTIFY’
348 | PMIX_INFO_LOAD(&dinfo[3], PMIX_DEBUG_WAITING_FOR_NOTIFY, NULL, PMIX_BOOL); // tell the daemon that the proc is waiting
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pmix/v5/include/pmix_deprecated.h:271:54: note: expected ‘const char *’ but argument is of type ‘int’
271 | const char *key,
| ~~~~~~~~~~~~^~~
In file included from /usr/local/gcc/12.2.0/lib/gcc/x86_64-pc-linux-gnu/12.2.1/include/stdint.h:9,
from /usr/local/pmix/v5/include/pmix_common.h:63:
/usr/local/pmix/v5/include/pmix_common.h:114:29: error: incompatible types when assigning to type ‘pmix_proc_t’ {aka ‘struct pmix_proc’} from type ‘unsigned int’
114 | #define PMIX_RANK_WILDCARD UINT32_MAX-1
| ^~~~~~~~~~
test.c:352:16: note: in expansion of macro ‘PMIX_RANK_WILDCARD’
352 | wildcard = PMIX_RANK_WILDCARD;
| ^~~~~~~~~~~~~~~~~~
naterini commented
Same issue with the indirect example from https://openpmix.github.io/support/how-to/example-indirect-launch-debugger-tool
$ pcc test2.c -o test
test2.c: In function ‘release_fn’:
test2.c:89:38: error: ‘mpiexec_space’ undeclared (first use in this function); did you mean ‘mpiexec_nspace’?
89 | if (0 == strncmp(source->nspace, mpiexec_space, PMIX_MAX_NSLEN)) {
| ^~~~~~~~~~~~~
| mpiexec_nspace
test2.c:89:38: note: each undeclared identifier is reported only once for each function it appears in
test2.c: In function ‘main’:
test2.c:132:5: error: ‘ninfo’ undeclared (first use in this function); did you mean ‘info’?
132 | ninfo = 0;
| ^~~~~
| info
test2.c:135:12: error: ‘clientnspace’ undeclared (first use in this function)
135 | memset(clientnspace, 0, sizeof(clientnspace));
| ^~~~~~~~~~~~
In file included from /usr/local/pmix/v5/include/pmix_common.h:2647,
from /usr/local/pmix/v5/include/pmix.h:53,
from /usr/local/pmix/v5/include/pmix_tool.h:64,
from test2.c:8:
test2.c:141:30: error: ‘PMIX_CONNECT_SYSTEM_ONLY’ undeclared (first use in this function); did you mean ‘PMIX_CONNECT_SYSTEM_FIRST’?
141 | PMIX_INFO_LOAD(&info[0], PMIX_CONNECT_SYSTEM_ONLY, NULL, PMIX_BOOL);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pmix/v5/include/pmix_deprecated.h:642:30: note: in definition of macro ‘PMIX_INFO_LOAD’
642 | (void) PMIx_Info_load(i, k, d, t)
| ^
test2.c:183:10: error: ‘n’ undeclared (first use in this function)
183 | for (n=1; n < argc; n++ {
| ^
test2.c:183:28: error: expected ‘)’ before ‘{’ token
183 | for (n=1; n < argc; n++ {
| ~ ^~
| )
test2.c:288:1: error: expected expression before ‘}’ token
288 | }
| ^
rhc54 commented
The website examples are terribly out-of-date - you should look at the code in the repository (at examples/debugger) instead.