Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Compiling with HDF5 support #141

man74cio started this conversation in General
Discussion options

Hello to all,
I am trying to build my code with FPM . The code contains some functions and program in c++ but the main executable and most part of the tools are in fortran. In the fortran part the code use openmp, mpi_f08 and hdf5 (optional using preprocessor flags).
Normally, when building with Makefile, the compiler is "h5pfc" but I cant use it with FPM. So I able to compile only the version without HDF5 support.

here my fmp.toml

name = "code_neutrino"
version = "0.1.0"
license = "license"
author = "Marco Mancini"
maintainer = "marco.mancini@obspm.fr"
copyright = "Copyright 2024, Marco Mancini"
[[executable]]
name = "neutrino"
main = "neutrino_main.F90"
source-dir = "src/F90"
[[executable]]
name = "merger"
main = "merger_main.F90"
source-dir = "src/F90"
[[executable]]
name = "merger2"
main = "merger2.F90"
source-dir = "src/F90"
# [[executable]]
# name = "badpoints"
# main = "badboints.cpp"
# source-dir = "src/C"
[[executable]]
name = "haupt"
main = "analyse.F90"
source-dir = "src/F90"
[library]
#include-dir="/opt/homebrew/Cellar/hdf5-mpi/1.14.3/include"
[build]
auto-executables = true
auto-tests = true
auto-examples = true
module-naming = false
external-modules = [ "mpi_f08","mpi", "hdf5"]
link = [ "stdc++","blas", "lapack","hdf5"]
[install]
library = false
[fortran]
implicit-typing = false
implicit-external = false
source-form = "free"
[dependencies]
openmp = "*"
# hdf5 = "*"% 

and to build I launch:

fpm build --compiler mpif90 --flag "-I/opt/homebrew/Cellar/hdf5-mpi/1.14.3/include -L/opt/homebrew/Cellar/hdf5-mpi/1.14.3/lib"

How could I compile with h5pfc ?

Regards,

Marco

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /