Skip to content

dat and npy files required to run examples have not been deployed #705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
degawa opened this issue Apr 23, 2023 · 0 comments · Fixed by #713
Closed

dat and npy files required to run examples have not been deployed #705

degawa opened this issue Apr 23, 2023 · 0 comments · Fixed by #713
Labels
bug Something isn't working

Comments

@degawa
Copy link
Contributor

degawa commented Apr 23, 2023

Description

Two example programs of stdlib_io, example_loadnpy and example loadtxt, terminated with an error.

>fpm run --example example_loadtxt
Project is up to date
At line 979 of file .\src\stdlib_io.f90
Fortran runtime error: Cannot open file 'example.dat': No such file or directory

>fpm run --example example_loadnpy
Project is up to date
 Failed to read array from file 'example.npy'
ERROR STOP 

Expected Behaviour

I expected the examples to run and finish without any errors.

Version of stdlib

31f5a8b

Platform and Architecture

Windows 10 22H2 64bit, gfortran 11.2 bundled with quickstart Fortran on Windows, fpm 0.7.0 alpha

Additional Information

This problem occurs only on the stdlib-fpm branch.
example.dat and example.npy do not exist in this branch, suggesting some need for more configuration during deployment.

In fpm-deployment.sh, *.dat files and *.npy files in the example directory are not copied; contrary to *.dat files in the test directory are copied.

find test -name "test_*.f90" -exec cp {} "$destdir/test/" \;
find test -name "*.dat" -exec cp {} "$destdir/" \;
find example -name "example_*.f90" -exec cp {} "$destdir/example/" \;

I'm not familiar with Linux or bash scripts, but thanks to the similarity of the process for the test directory, adding commands to copy the *.dat files and *.npy files may solve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant