Skip to content

Investigate Fortran warnings in run_part.F90 and run_part_opt.F90 (Type mismatch in argument 'this') #482

Description

@Griger5

Compiling with all the warning flags re-enabled (#476) results in these warnings:

  [886/888] /usr/bin/gfortran -I/home/graca/Desktop/code/PyPartMC/src -I/tmp/tmp6kafbq7p/build/include -I/home/graca/Desktop/code/PyPartMC/gitmodules/json/include -I/home/graca/Desktop/code/PyPartMC/gitmodules/nanobind/include -I/home/graca/Desktop/code/PyPartMC/gitmodules/nanobind_json/include -I/home/graca/Desktop/code/PyPartMC/gitmodules/span/include -I/home/graca/Desktop/code/PyPartMC/gitmodules/string_view-standalone/include -I/home/graca/Desktop/code/PyPartMC/gitmodules/optional/include -I/usr/include/python3.12 -O3 -DNDEBUG -O3 -fPIC -fimplicit-none -ffree-line-length-none -Wno-surprising -fno-stack-protector -Wall -Wextra -Wpedantic -Werror -Wno-unused-parameter -ffunction-sections -fdata-sections -Wno-error -fpreprocessed -c CMakeFiles/_PyPartMC.dir/src/run_part.F90-pp.f90 -o CMakeFiles/_PyPartMC.dir/src/run_part.F90.o
  /home/graca/Desktop/code/PyPartMC/src/run_part.F90:10:6-6:

     10 |   use pmc_run_part
        |      1
  Warning: Type mismatch in argument 'this' (CLASS(sub_model_data_t)/CHARACTER(1)) between (1) and (2)
  [887/888] /usr/bin/gfortran -I/home/graca/Desktop/code/PyPartMC/src -I/tmp/tmp6kafbq7p/build/include -I/home/graca/Desktop/code/PyPartMC/gitmodules/json/include -I/home/graca/Desktop/code/PyPartMC/gitmodules/nanobind/include -I/home/graca/Desktop/code/PyPartMC/gitmodules/nanobind_json/include -I/home/graca/Desktop/code/PyPartMC/gitmodules/span/include -I/home/graca/Desktop/code/PyPartMC/gitmodules/string_view-standalone/include -I/home/graca/Desktop/code/PyPartMC/gitmodules/optional/include -I/usr/include/python3.12 -O3 -DNDEBUG -O3 -fPIC -fimplicit-none -ffree-line-length-none -Wno-surprising -fno-stack-protector -Wall -Wextra -Wpedantic -Werror -Wno-unused-parameter -ffunction-sections -fdata-sections -Wno-error -fpreprocessed -c CMakeFiles/_PyPartMC.dir/src/run_part_opt.F90-pp.f90 -o CMakeFiles/_PyPartMC.dir/src/run_part_opt.F90.o
  /home/graca/Desktop/code/PyPartMC/src/run_part_opt.F90:10:8-8:

     10 |     use pmc_run_part
        |        1
  Warning: Type mismatch in argument 'this' (CLASS(sub_model_data_t)/CHARACTER(1)) between (1) and (2)

Due to -Werror they result in errors. They can be silenced in CMake but disabling -Werror for those two files:

set_source_files_properties(
  src/run_part_opt.F90
  PROPERTIES COMPILE_OPTIONS "-Wno-error"
)
set_source_files_properties(
  src/run_part.F90
  PROPERTIES COMPILE_OPTIONS "-Wno-error"
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions