Skip to content

Commit 3f7b1fc

Browse files
jmarkJohannes Markert
andauthored
Fix: generalize hard-coded Cint to MPI_Comm in t8_forest_get_mpicomm. (#78)
* Applied minor fixes. * Added another patch replace line. --------- Co-authored-by: Johannes Markert <[email protected]>
1 parent 73877de commit 3f7b1fc

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "T8code"
22
uuid = "d0cc0030-9a40-4274-8435-baadcfd54fa1"
33
authors = ["Johannes Markert <[email protected]>"]
4-
version = "0.7.2"
4+
version = "0.7.3"
55

66
[deps]
77
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"

dev/fixes.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ LIB_JL="Libt8.jl"
99

1010
set -euxo pipefail
1111

12+
sed -i "s/using CEnum/using CEnum: @cenum/g" "${LIB_JL}"
13+
1214
# Remove Fortran macros
1315
sed -i "/INTEGER(KIND/d" "${LIB_JL}"
1416

@@ -25,8 +27,10 @@ sed -i "s/mpifile::Cint/mpifile::MPI_File/g" "${LIB_JL}"
2527
sed -i "s/mpidatatype::Cint/mpidatatype::MPI_Datatype/g" "${LIB_JL}"
2628
sed -i "s/\bt::Cint/t::MPI_Datatype/g" "${LIB_JL}"
2729

28-
sed -i "s/forest::Cint/forest::t8_forest_t/" "${LIB_JL}"
30+
sed -i "s/t8_forest_get_mpicomm\(forest::t8_forest_t\)::Cint/t8_forest_get_mpicomm(forest::t8_forest_t)::MPI_Comm/g" "${LIB_JL}"
2931

32+
sed -i "s/forest::Cint/forest::t8_forest_t/" "${LIB_JL}"
33+
sed -i "s/cmesh::Cint/cmesh::t8_cmesh_t/" "${LIB_JL}"
3034

3135
# Use libsc for `sc_*` functions
3236
sed -i "s/libt8\.sc_/libsc.sc_/g" "${LIB_JL}"

src/Libt8.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ end
4141
const ptrdiff_t = Cptrdiff_t
4242

4343
# Definitions used from MPI.jl
44-
using MPI: MPI, MPI_Datatype, MPI_Comm, MPI_Group, MPI_File
44+
using MPI: MPI, MPI_Datatype, MPI_Comm, MPI_File
4545

4646
const MPI_COMM_WORLD = MPI.COMM_WORLD
4747
const MPI_COMM_SELF = MPI.COMM_SELF
@@ -13125,7 +13125,7 @@ end
1312513125
"""
1312613126
t8_stash_attribute_sort(stash)
1312713127

13128-
Sort the attributes array of a stash in the order (treeid, packageid, key) *
13128+
Sort the attributes array of a stash in the order (treeid, package_id, key) *
1312913129

1313013130
# Arguments
1313113131
* `stash`:\\[in,out\\] The stash to be considered.
@@ -15698,7 +15698,7 @@ sc_MPI_Comm t8_forest_get_mpicomm (const t8_forest_t forest);
1569815698
```
1569915699
"""
1570015700
function t8_forest_get_mpicomm(forest)
15701-
@ccall libt8.t8_forest_get_mpicomm(forest::t8_forest_t)::Cint
15701+
@ccall libt8.t8_forest_get_mpicomm(forest::t8_forest_t)::MPI_Comm
1570215702
end
1570315703

1570415704
"""
@@ -17844,7 +17844,7 @@ void t8_geom_load_tree_data_vertices (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, con
1784417844
```
1784517845
"""
1784617846
function t8_geom_load_tree_data_vertices(cmesh, gtreeid, user_data)
17847-
@ccall libt8.t8_geom_load_tree_data_vertices(cmesh::Cint, gtreeid::Cint, user_data::Ptr{Ptr{Cvoid}})::Cvoid
17847+
@ccall libt8.t8_geom_load_tree_data_vertices(cmesh::t8_cmesh_t, gtreeid::Cint, user_data::Ptr{Ptr{Cvoid}})::Cvoid
1784817848
end
1784917849

1785017850
"""

0 commit comments

Comments
 (0)