Skip to content

Commit

Permalink
Merge pull request #35 from eschnett/eschnett/fortran-strings-2
Browse files Browse the repository at this point in the history
Correct passing Fortran strings from C
  • Loading branch information
eschnett authored Apr 11, 2023
2 parents 9b06f80 + 151d243 commit 4c6b91e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Configure
run: |
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ authors:
given-names: Erik
orcid: https://orcid.org/0000-0002-4518-9017
title: MPItrampoline
version: v5.2.2
version: v5.2.3
doi: 10.5281/zenodo.6174408
date-released: 2023-04-11
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.12...3.20)
project(
MPItrampoline VERSION 5.2.2
MPItrampoline VERSION 5.2.3
DESCRIPTION "MPI trampoline"
HOMEPAGE_URL "https://github.com/eschnett/MPItrampoline"
LANGUAGES NONE
Expand Down
76 changes: 38 additions & 38 deletions mpiabi/mpi_functions_fortran.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@
("const MPI_Aint *", "outsize"),
("MPI_Aint *", "position"),
("MPI_Fint *", "ierror"),
("const size_t *", "datarep_len"),
("size_t", "datarep_len"),
]),

("void", "MPI_Unpack_external", [
Expand All @@ -692,7 +692,7 @@
("const MPI_Fint *", "outcount"),
("const MPI_Datatype *", "datatype"),
("MPI_Fint *", "ierror"),
("const size_t *", "datarep_len"),
("size_t", "datarep_len"),
]),

("void", "MPI_Pack_external_size", [
Expand All @@ -701,7 +701,7 @@
("const MPI_Datatype *", "datatype"),
("MPI_Aint *", "size"),
("MPI_Fint *", "ierror"),
("const size_t *", "datarep_len"),
("size_t", "datarep_len"),
]),

# 5.3 Barrier Synchronization
Expand Down Expand Up @@ -1504,45 +1504,45 @@
("const MPI_Comm *", "comm"),
("const char *", "comm_name"),
("MPI_Fint *", "ierror"),
("const size_t *", "comm_name_len"),
("size_t", "comm_name_len"),
]),

("void", "MPI_Comm_get_name", [
("const MPI_Comm *", "comm"),
("char *", "comm_name"),
("int *", "resultlen"),
("MPI_Fint *", "ierror"),
("const size_t *", "comm_name_len"),
("size_t", "comm_name_len"),
]),

("void", "MPI_Type_set_name", [
("const MPI_Datatype *", "type"),
("const char *", "type_name"),
("MPI_Fint *", "ierror"),
("const size_t *", "type_name_len"),
("size_t", "type_name_len"),
]),

("void", "MPI_Type_get_name", [
("const MPI_Datatype *", "type"),
("char *", "type_name"),
("int *", "resultlen"),
("MPI_Fint *", "ierror"),
("const size_t *", "type_name_len"),
("size_t", "type_name_len"),
]),

("void", "MPI_Win_set_name", [
("const MPI_Win *", "win"),
("const char *", "win_name"),
("MPI_Fint *", "ierror"),
("const size_t *", "win_name_len"),
("size_t", "win_name_len"),
]),

("void", "MPI_Win_get_name", [
("const MPI_Win *", "win"),
("char *", "win_name"),
("int *", "resultlen"),
("MPI_Fint *", "ierror"),
("const size_t *", "win_name_len"),
("size_t", "win_name_len"),
]),

# 7.5 Topology Constructors
Expand Down Expand Up @@ -1860,14 +1860,14 @@
("char *", "version"),
("int *", "resultlen"),
("MPI_Fint *", "ierror"),
("const size_t *", "version_len"),
("size_t", "version_len"),
]),

("void", "MPI_Get_processor_name", [
("char *", "name"),
("int *", "resultlen"),
("MPI_Fint *", "ierror"),
("const size_t *", "name_len"),
("size_t", "name_len"),
]),

# 8.2 Memory Allocation
Expand Down Expand Up @@ -1971,7 +1971,7 @@
("char *", "string"),
("int *", "resultlen"),
("MPI_Fint *", "ierror"),
("const size_t *", "string_len"),
("size_t", "string_len"),
]),

# 8.4 Error Codes and Classes
Expand Down Expand Up @@ -1999,7 +1999,7 @@
("const MPI_Fint *", "errorcode"),
("const char *", "string"),
("MPI_Fint *", "ierror"),
("const size_t *", "string_len"),
("size_t", "string_len"),
]),

("void", "MPI_Comm_call_errhandler", [
Expand Down Expand Up @@ -2066,15 +2066,15 @@
("const char *", "key"),
("const char *", "value"),
("MPI_Fint *", "ierror"),
("const size_t *", "key_len"),
("const size_t *", "value_len"),
("size_t", "key_len"),
("size_t", "value_len"),
]),

("void", "MPI_Info_delete", [
("const MPI_Info *", "info"),
("const char *", "key"),
("MPI_Fint *", "ierror"),
("const size_t *", "key_len"),
("size_t", "key_len"),
]),

("void", "MPI_Info_get", [
Expand All @@ -2084,8 +2084,8 @@
("char *", "value"),
("int *", "flag"),
("MPI_Fint *", "ierror"),
("const size_t *", "key_len"),
("const size_t *", "value_len"),
("size_t", "key_len"),
("size_t", "value_len"),
]),

("void", "MPI_Info_get_valuelen", [
Expand All @@ -2094,7 +2094,7 @@
("int *", "valuelen"),
("int *", "flag"),
("MPI_Fint *", "ierror"),
("const size_t *", "key_len"),
("size_t", "key_len"),
]),

("void", "MPI_Info_get_nkeys", [
Expand All @@ -2108,7 +2108,7 @@
("const MPI_Fint *", "n"),
("char *", "key"),
("MPI_Fint *", "ierror"),
("const size_t *", "key_len"),
("size_t", "key_len"),
]),

("void", "MPI_Info_dup", [
Expand All @@ -2134,8 +2134,8 @@
("MPI_Comm *", "intercomm"),
("int *", "array_off_errcodes"),
("MPI_Fint *", "ierror"),
("const size_t *", "command_len"),
("const size_t *", "argv_len"),
("size_t", "command_len"),
("size_t", "argv_len"),
]),

("void", "MPI_Comm_get_parent", [
Expand All @@ -2154,8 +2154,8 @@
("MPI_Comm *", "intercomm"),
("int *", "array_of_errcodes"),
("MPI_Fint *", "ierror"),
("const size_t *", "arrray_of_commands_len"),
("const size_t *", "arrray_of_argv_len"),
("size_t", "arrray_of_commands_len"),
("size_t", "arrray_of_argv_len"),
]),

# 10.4 Establishing Communication
Expand All @@ -2164,13 +2164,13 @@
("const MPI_Info *", "info"),
("char *", "port_name"),
("MPI_Fint *", "ierror"),
("const size_t *", "port_name_len"),
("size_t", "port_name_len"),
]),

("void", "MPI_Close_port", [
("const char *", "port_name"),
("MPI_Fint *", "ierror"),
("const size_t *", "port_name_len"),
("size_t", "port_name_len"),
]),

("void", "MPI_Comm_accept", [
Expand All @@ -2180,7 +2180,7 @@
("const MPI_Comm *", "comm"),
("MPI_Comm *", "newcomm"),
("MPI_Fint *", "ierror"),
("const size_t *", "port_name_len"),
("size_t", "port_name_len"),
]),

("void", "MPI_Comm_connect", [
Expand All @@ -2190,34 +2190,34 @@
("const MPI_Comm *", "comm"),
("MPI_Comm *", "newcomm"),
("MPI_Fint *", "ierror"),
("const size_t *", "port_name_len"),
("size_t", "port_name_len"),
]),

("void", "MPI_Publish_name", [
("const char *", "service_name"),
("const MPI_Info *", "info"),
("const char *", "port_name"),
("MPI_Fint *", "ierror"),
("const size_t *", "service_name_len"),
("const size_t *", "port_name_len"),
("size_t", "service_name_len"),
("size_t", "port_name_len"),
]),

("void", "MPI_Unpublish_name", [
("const char *", "service_name"),
("const MPI_Info *", "info"),
("const char *", "port_name"),
("MPI_Fint *", "ierror"),
("const size_t *", "service_name_len"),
("const size_t *", "port_name_len"),
("size_t", "service_name_len"),
("size_t", "port_name_len"),
]),

("void", "MPI_Lookup_name", [
("const char *", "service_name"),
("const MPI_Info *", "info"),
("char *", "port_name"),
("MPI_Fint *", "ierror"),
("const size_t *", "service_name_len"),
("const size_t *", "port_name_len"),
("size_t", "service_name_len"),
("size_t", "port_name_len"),
]),

# 10.5 Other Functionality
Expand Down Expand Up @@ -2609,7 +2609,7 @@
("const MPI_Info *", "info"),
("MPI_File *", "fh"),
("MPI_Fint *", "ierror"),
("const size_t *", "filename_len"),
("size_t", "filename_len"),
]),

("void", "MPI_File_close", [
Expand All @@ -2621,7 +2621,7 @@
("const char *", "filename"),
("const MPI_Info *", "info"),
("MPI_Fint *", "ierror"),
("const size_t *", "filename_len"),
("size_t", "filename_len"),
]),

("void", "MPI_File_set_size", [
Expand Down Expand Up @@ -2676,7 +2676,7 @@
("const char *", "datarep"),
("const MPI_Info *", "info"),
("MPI_Fint *", "ierror"),
("const size_t *", "datarep_len"),
("size_t", "datarep_len"),
]),

("void", "MPI_File_get_view", [
Expand All @@ -2686,7 +2686,7 @@
("MPI_Datatype *", "filetype"),
("char *", "datarep"),
("MPI_Fint *", "ierror"),
("const size_t *", "datarep_len"),
("size_t", "datarep_len"),
]),

# 13.4 Data Access
Expand Down

0 comments on commit 4c6b91e

Please sign in to comment.