- Notifications
You must be signed in to change notification settings - Fork 197
Description
Description
When I use stdlib_io_npy via FPM, i.e. with
[dependencies] stdlib = { git="https://github.com/fortran-lang/stdlib", branch="stdlib-fpm" } the FPM defaults to building with maximum rank of 4 for array procedures. While I can see that there are instructions for building with cmake to set this higher (up to 15), I'm running in a cluster environment where I'm having a few issues with cmake suddenly while FPM basically just works.
Except that I need rank 7. Is there a way in the FPM toml or environment variable to set -DCMAKE_MAXIMUM_RANK to 7 instead?
Expected Behaviour
The preprocessor generates array procedures with up to rank 7 when using the FPM.
Version of stdlib
Platform and Architecture
SUSE Linux Enterprise Server 15 SP4
Additional Information
I have some binary data U which is naturally rank 7, double precision complex. I need to convert this to a different format for use in other code but the code to do this is in python. I have reader code in Fortran that I know gives me the correct ordering. I was going to use this fortran code to read the data, dump it to numpy so I can read it into python and then output it again there. This way, I could be assured that I had not messed up the ordering of the data.
The stdlib function I was to use was save_npy and so hence a MWE would be
program example_savenpy use stdlib_io_npy, only: save_npy implicit none real :: x(3, 2, 4, 4, 4, 4, 4) = 1 call save_npy('example.npy', x) end program example_savenpy but of course the difficulty is in the FPM build.