Closed johnoel closed 3 years ago
Hi @jimianelli and @Cole-Monnahan-NOAA, please test the issue165 branch. It should be able to read and write to a directory that is different from where the executable is.
I built this branch, compiled simple then tried this:
C:\Users\cole.monnahan\admb\examples\admb>simple\simple.exe Error trying to read in model data This is usual caused by a missing DAT file
Is that what you wanted me to test?
Move simple.exe to another directory (ie C:\Users\cole.monnahan\bin\simple.exe).
Then call simple.exe with it's full path,
C:\Users\cole.monnahan\admb\examples\admb\simple> C:\Users\cole.monnahan\bin\simple.exe
Check that program was able to read input files and write the outputs in the simple directory.
Still fails. I should note this in Win10.
C:\Users\cole.monnahan\admb\examples\admb\simple>C:\Users\cole.monnahan\test\simple\simple.exe -version ADMB Program: C:\Users\cole.monnahan\test\simple\simple.exe
ADMB-12.2-git safe libraries compiled with GNU C++ 8.3.0 (64bit) Copyright (c) 2008-2020 ADMB Foundation and Regents of the University of California Build date: Jan 12 2021
C:\Users\cole.monnahan\admb\examples\admb>C:\Users\cole.monnahan\test\simple\simple.exe Error trying to read in model data This is usual caused by a missing DAT file
C:\Users\cole.monnahan\admb\examples\admb>ls C:\Users\cole.monnahan\test\simple\ simple.dat simple.exe simple.tpl
I misunderstood your original request. The idea is you have one master .exe file and multiple directories with e.g., different inputs and you want the inputs/outputs to always be in the directory. Yes this works:
C:\Users\cole.monnahan\admb\examples\admb\simple>C:\Users\cole.monnahan\test\simple\simple.exe
Initial statistics: 2 variables; iteration 0; function evaluation 0; phase 1 Function value 2.4980653e+01; maximum gradient component mag -3.6127e+00 Var Value Gradient |Var Value Gradient |Var Value Gradient 1 0.00000 -7.2781e-01 | 2 0.00000 -3.6127e+00 |
Currently, if the executable is called with the path, the inputs will be read from the executable path and the outputs would be written to the executable path.
For example,
model.exe would try to read input files from ~/bin, then write outputs to ~/bin instead of ~/run directory. The executable should read and write to the ~/run directory.
@jimianelli requested this feature.