Skip to content

Commit 6bea63a

Browse files
authored
Fix autogenerated links to OpenMPI/MPICH docs (#859)
OpenMPI docs are hosted on a new website, and the docs for all the `*_c` functions are not available for that this MPI library. Also, MPICH manpages are available at the moment for most functions only in the v4.0 website, not v4.1+.
1 parent 1872411 commit 6bea63a

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

src/MPI.jl

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,27 @@ end
1919

2020

2121
function _doc_external(fname)
22-
"""
23-
- `$fname` man page: [OpenMPI](https://www.open-mpi.org/doc/current/man3/$fname.3.php), [MPICH](https://www.mpich.org/static/docs/latest/www3/$fname.html)
24-
"""
22+
# Ideally we'd like to use the "latest" version of the docs, but MPICH v4.0
23+
# at the moment seems to be the last version with all the docstrings.
24+
mpich = "[MPICH](https://www.mpich.org/static/docs/v4.0/www3/$(fname).html)"
25+
# All the *_c functions are undocumented in OpenMPI website
26+
if !endswith(string(fname), "_c")
27+
openmpi = "[OpenMPI](https://docs.open-mpi.org/en/main/man-openmpi/man3/$(fname).3.html)"
28+
# Few docstrings aren't available for MPICH
29+
if fname in (:MPI_Status_c2f, :MPI_Status_f2c) || startswith(string(fname), "MPI_Type_create_f90_")
30+
return """
31+
- `$fname` man page: $(openmpi)
32+
"""
33+
else
34+
return """
35+
- `$fname` man page: $(openmpi), $(mpich)
36+
"""
37+
end
38+
else
39+
return """
40+
- `$fname` man page: $(mpich)
41+
"""
42+
end
2543
end
2644

2745
"""

0 commit comments

Comments
 (0)