Closed lokitkhemka closed 1 month ago
I ran this example, and it appeared to be fine at my end. I cannot reproduce this unfortunately.
Checking the code around this line, what it does is simply try to ifstream.open
files with different file names.
This could fail due to many reasons, can you please check the permissions first, ls node.supan && cat node.supan
.
I figured it out. Basically, it was looking for the file node.supan
at the current working directory, not at the location of the main .supan
file. Because the current working directory was not the same as the location the main input file, it couldn't find it.
I figured it out. Basically, it was looking for the file
node.supan
at the current working directory, not at the location of the main.supan
file. Because the current working directory was not the same as the location the main input file, it couldn't find it.
Yes, if the files are relocated, the corresponding paths shall be updated. The folder where the executable is invoked is the default CWD, it is also possible to change CWD using the pwd
command.
Describe the bug I tried running the example provided in the page https://tlcfem.github.io/suanPan-manual/latest/Example/Structural/Optimization/evolutionary-structural-optimization/. I run the program using command
./suanPan -f ./evolutionary-structural-optimization.supan
, I get the error[ERROR] command.cpp:1589 ~> Cannot open the input file "node.supan".
I have thenode.supan
in the same folder as the main.supan
file. Most examples are working fine, so I am unable to figure out why this is happening with this particular example.Is it possible this is happening with the debug build of the program, because I am running the program in debug mode? I am running Ubuntu 22.04, if that helps. The options that I used for building the library are as below.