Convert results programmatically Windows
- Anastasios Raptis
- Posts: 12
- Joined: Fri Sep 14, 2018 11:19 am
Convert results programmatically Windows
Hi, I am using SimVascular in Windows and I am interested in converting the simulation results programmatically (command prompt or through Python).
I saw in a previous post the following command that I think it only works with the Linux distribution:
//to create multiple files and each of them has data for one time step
svpost -all -indir [sim result folder] -outdir [output folder] -start [start time step] -stop [stop time step] -incr [time step increment] -vtp all_resutls -vtu all_results
Is there a way to do it in Windows?
Best,
Tasos
I saw in a previous post the following command that I think it only works with the Linux distribution:
//to create multiple files and each of them has data for one time step
svpost -all -indir [sim result folder] -outdir [output folder] -start [start time step] -stop [stop time step] -incr [time step increment] -vtp all_resutls -vtu all_results
Is there a way to do it in Windows?
Best,
Tasos
- David Parker
- Posts: 1719
- Joined: Tue Aug 23, 2005 2:43 pm
Re: Convert results programmatically Windows
Hi Tasos,
You can run svpost from the command line on Windows 10 by installing Cygwin https://www.cygwin.com/. Cygwin provides a Unix-like shell you can use to execute the bash scripts in C:\Program Files\SimVascular\svSolver\2019-05-26\.
Cheers,
Dave
You can run svpost from the command line on Windows 10 by installing Cygwin https://www.cygwin.com/. Cygwin provides a Unix-like shell you can use to execute the bash scripts in C:\Program Files\SimVascular\svSolver\2019-05-26\.
Cheers,
Dave
- Anastasios Raptis
- Posts: 12
- Joined: Fri Sep 14, 2018 11:19 am
Re: Convert results programmatically Windows
Hi Dave,
Thanks a lot for the tip!
I know this might not be an issue with svpost, but when I run the command from cygwin, it returns error opening the restart file. I start cygwin as administrator nevertheless.
Does it happen that you know what's going wrong?
Cheers,
Tasos
Thanks a lot for the tip!
I know this might not be an issue with svpost, but when I run the command from cygwin, it returns error opening the restart file. I start cygwin as administrator nevertheless.
Does it happen that you know what's going wrong?
Cheers,
Tasos
- David Parker
- Posts: 1719
- Joined: Tue Aug 23, 2005 2:43 pm
Re: Convert results programmatically Windows
Hi Tasos,
It seems that the svpost bash script is not correct on Window, it is setting $SV_HOME=/usr/local/package/svsolver/2019-05-28 which does not exist.
You can execute svpost-bin.exe directly I think, I'm able to do this on other platforms.
Cheers,
Dave
It seems that the svpost bash script is not correct on Window, it is setting $SV_HOME=/usr/local/package/svsolver/2019-05-28 which does not exist.
You can execute svpost-bin.exe directly I think, I'm able to do this on other platforms.
Cheers,
Dave
- Anastasios Raptis
- Posts: 12
- Joined: Fri Sep 14, 2018 11:19 am
Re: Convert results programmatically Windows
Hi Dave,
Basically I am getting the error when running svpost-bin.exe directly as the bash script was indeed pointing to another folder.
The same happens (error opening restart file) with other cases in other folders as well.
Thanks for the help.
Best,
Tasos
Basically I am getting the error when running svpost-bin.exe directly as the bash script was indeed pointing to another folder.
The same happens (error opening restart file) with other cases in other folders as well.
Thanks for the help.
Best,
Tasos
- David Parker
- Posts: 1719
- Joined: Tue Aug 23, 2005 2:43 pm
Re: Convert results programmatically Windows
Hi Tasos,
Could you please show me the list the files in the folder that your results are in and the svpost command you are using?
The folder containing the simulation results should look something like this
The command to convert the results looks something like this
svpost -all -indir -outdir /SimVascular/CylinderProject/Simulations/steady/output -start 0 -stop 100 -incr 10 -vtp all_resutls -vtu all_results
You must have restart files that match the ranges of values you use for -start and -stop and -incr, e.g. restart.0.1, restart.10.1
restart.100.1. Using -incr 1 would not work because there are no restart.1.1, restart.2.1, etc. files.
Cheers,
Dave
Could you please show me the list the files in the folder that your results are in and the svpost command you are using?
The folder containing the simulation results should look something like this
Code: Select all
bct.dat
bct.vtp
echo.dat
geombc.dat.1
histor.dat
inflow.flow
mesh-complete/
numstart.dat
restart.0.1
restart.10.1
restart.100.1
restart.110.1
restart.120.1
restart.130.1
restart.140.1
restart.150.1
restart.160.1
restart.170.1
restart.180.1
restart.190.1
restart.20.1
restart.200.1
restart.30.1
restart.40.1
restart.50.1
restart.60.1
restart.70.1
restart.80.1
restart.90.1
solver.inp
steady.svpre
svLS_NS.log
svpost -all -indir -outdir /SimVascular/CylinderProject/Simulations/steady/output -start 0 -stop 100 -incr 10 -vtp all_resutls -vtu all_results
You must have restart files that match the ranges of values you use for -start and -stop and -incr, e.g. restart.0.1, restart.10.1
restart.100.1. Using -incr 1 would not work because there are no restart.1.1, restart.2.1, etc. files.
Cheers,
Dave
- Anastasios Raptis
- Posts: 12
- Joined: Fri Sep 14, 2018 11:19 am
Re: Convert results programmatically Windows
Hi Dave,
I attach an image with the list of files in the results folder.
I change the path to /cygdrive/c/'Program Files'/SimVascular/svSolver/2019-05-28 and I am running the following command:
./svpost-bin.exe -all -indir /cygdrive/d/Projects/Hemodynamics/Simulations/250K_C_0002/4-procs_case -outdir /cygdrive/d/Projects/Hemodynamics/Simulations/250K_C_0002/4-procs_case -start 0 -stop 780 -incr 10 -vtp all_results -vtu all_results
The increment value is according to the exported restart files as you said.
Thanks,
Tasos
I attach an image with the list of files in the results folder.
I change the path to /cygdrive/c/'Program Files'/SimVascular/svSolver/2019-05-28 and I am running the following command:
./svpost-bin.exe -all -indir /cygdrive/d/Projects/Hemodynamics/Simulations/250K_C_0002/4-procs_case -outdir /cygdrive/d/Projects/Hemodynamics/Simulations/250K_C_0002/4-procs_case -start 0 -stop 780 -incr 10 -vtp all_results -vtu all_results
The increment value is according to the exported restart files as you said.
Thanks,
Tasos
- David Parker
- Posts: 1719
- Joined: Tue Aug 23, 2005 2:43 pm
Re: Convert results programmatically Windows
Hi Tasos,
You do have a restart.780.1, restart.780.2, restart.780.3 and restart.780.4, files yes? I didn't see them listed in the image of the files you attached.
Cheers,
Dave
You do have a restart.780.1, restart.780.2, restart.780.3 and restart.780.4, files yes? I didn't see them listed in the image of the files you attached.
Cheers,
Dave
- Anastasios Raptis
- Posts: 12
- Joined: Fri Sep 14, 2018 11:19 am
Re: Convert results programmatically Windows
Hi Dave,
Yes, I confirm that there are also restart.780.1, restart.780.2, restart.780.3 and restart.780.4 files in the folder.
Thanks,
Tasos
Yes, I confirm that there are also restart.780.1, restart.780.2, restart.780.3 and restart.780.4 files in the folder.
Thanks,
Tasos
- David Parker
- Posts: 1719
- Joined: Tue Aug 23, 2005 2:43 pm
Re: Convert results programmatically Windows
Hi Tasos,
I created a Virtual Machine for WIndows 10 and downloaded some simulation results. I got the same error you did when giving the input directory on the command line. I tried executing svpost-bin.exe in my results directory and that worked. So instead of using
do this
It seems that the gzopen() function used to read results is not handling the /cygdrive directory correctly, not sure why.
Cheers,
Dave
I created a Virtual Machine for WIndows 10 and downloaded some simulation results. I got the same error you did when giving the input directory on the command line. I tried executing svpost-bin.exe in my results directory and that worked. So instead of using
Code: Select all
./svpost-bin.exe -all -indir /cygdrive/d/Projects/Hemodynamics/Simulations/250K_C_0002/4-procs_case -outdir /cygdrive/d/Projects/Hemodynamics/Simulations/250K_C_0002/4-procs_case -start 0 -stop 780 -incr 10 -vtp all_results -vtu all_results
Code: Select all
$ cd /cygdrive/d/Projects/Hemodynamics/Simulations/250K_C_0002/4-procs_case
$ /cygdrive/c/'Program Files'/SimVascular/svSolver/2019-05-28/svpost-bin.exe -all -indir . -outdir . -start 0 -stop 780 -incr 10 -vtp all_results -vtu all_results
Cheers,
Dave