HiFiLES / HiFiLES-solver

High Fidelity Large Eddy Simulation Solver
Other
171 stars 131 forks source link

Cannot open input file for reading #125

Open rafarohit opened 8 years ago

rafarohit commented 8 years ago

I am new to HiFiLES.

I have finished ./configure and make steps and have an executable created in bin. I create a directory (say "test") in bin itself that has input_file and mesh file.neu. I am trying to execute the file using the command bin/./HiFiLES /test/input_file I get an error "Fatal Error 'Cannot open input file for reading.' at ..src/input.cpp:597". I am trying to execute on a single CPU. Any idea what I may be doing wrong?

mlopez14 commented 8 years ago

I think I know what the problem is: Use the command bin/./HiFiLES bin/test/input_file

Saying the input file is "/test/input_file" will make the code look for the folder "test" in the root directory "/".

On Wed, Jun 15, 2016 at 10:01 AM rafarohit notifications@github.com wrote:

I am new to HiFiLES.

I have finished ./configure and make steps and have an executable created in bin. I create a directory (say "test") in bin itself that has input_file and mesh file.neu. I am trying to execute the file using the command bin/./HiFiLES /test/input_file I get an error "Fatal Error 'Cannot open input file for reading.' at ..src/input.cpp:597". I am trying to execute on a single CPU. Any idea what I may be doing wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HiFiLES/HiFiLES-solver/issues/125, or mute the thread https://github.com/notifications/unsubscribe/AFmj65GUmqgdZrkxj49KA23dPi4JF5muks5qMAW_gaJpZM4I2Y3_ .

rafarohit commented 8 years ago

Thank you, that helped open the input file. I am unable to open to the mesh file now. The mesh files I used were from the testcases folder already downloaded with HiFiLES. Do they have to be modified in any way?

mlopez14 commented 8 years ago

In the input file, specify the full location of the mesh file. Otherwise, just place the mesh file where the executable is. On Wed, Jun 15, 2016 at 11:21 AM rafarohit notifications@github.com wrote:

Thank you, that helped open the input file. I am unable to open to the mesh file now. The mesh files I used were from the testcases folder already downloaded with HiFiLES. Do they have to be modified in any way?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/HiFiLES/HiFiLES-solver/issues/125#issuecomment-226221354, or mute the thread https://github.com/notifications/unsubscribe/AFmj68IXtjcYz2d2eer_jb9MqfZEIXYoks5qMBhkgaJpZM4I2Y3_ .

rafarohit commented 8 years ago

Thanks for your patience. I encounter another fatal error 'Unable to open cubature file'. I checked cubature_1d.cpp and realized it is reading from /data/cubature_1d.dat (i.e., from the root) and changed the read location to the actual location. It still gives me the same error. Would you like me to delete the executable and ./configure and make again with the new location in cubature_1d.cpp?

mlopez14 commented 8 years ago

I would suggest placing the executable in the bin folder and calling it from there. At the moment, the executable assumes it is called from bin and looks for other files based on that assumption. On Wed, Jun 15, 2016 at 12:10 PM rafarohit notifications@github.com wrote:

Thanks for your patience. I encounter another fatal error 'Unable to open cubature file'. I checked cubature_1d.cpp and realized it is reading from /data/cubature_1d.dat (i.e., from the root) and changed the read location to the actual location. It still gives me the same error. Would you like me to delete the executable and ./configure and make again with the new location in cubature_1d.cpp?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/HiFiLES/HiFiLES-solver/issues/125#issuecomment-226237410, or mute the thread https://github.com/notifications/unsubscribe/AFmj67FFDC4mm4pZBs8qsG7uV8F36CQGks5qMCPpgaJpZM4I2Y3_ .

rafarohit commented 8 years ago

The executable is in the bin itself. I have placed the mesh file and the folder containing the input file in bin too.

mlopez14 commented 8 years ago

I mean to "cd" into bin and call the executable like this: ./HiFiLES test/input_file On Wed, Jun 15, 2016 at 12:20 PM rafarohit notifications@github.com wrote:

The executable is in the bin itself. I have placed the mesh file and the folder containing the input file in bin too.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/HiFiLES/HiFiLES-solver/issues/125#issuecomment-226240256, or mute the thread https://github.com/notifications/unsubscribe/AFmj6w6iq0kZiuDCSggeQSIOH9thiztNks5qMCY2gaJpZM4I2Y3_ .

rafarohit commented 8 years ago

yes, that is what I have been doing!

rafarohit commented 8 years ago

screenshot from 2016-06-15 11-21-32 The error I have now is at the end

mlopez14 commented 8 years ago

Ah, I know what's going on:

The environment variable HIFILES_DIR needs to be defined in bash as the directory where HiFiLES is installed. We need to make this error more detailed. On Wed, Jun 15, 2016 at 12:25 PM rafarohit notifications@github.com wrote:

[image: screenshot from 2016-06-15 11-21-32] https://cloud.githubusercontent.com/assets/13486773/16088213/b3907a04-32eb-11e6-97f7-b3ab140ff936.png The error I have now is at the end

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/HiFiLES/HiFiLES-solver/issues/125#issuecomment-226241643, or mute the thread https://github.com/notifications/unsubscribe/AFmj6-nyFQVS61yKdBFLVsHupksuFRt8ks5qMCdXgaJpZM4I2Y3_ .

rafarohit commented 8 years ago

Aha, I get it and I actually had a question about setting the environment variables in .bashrc. Do I only have to append the given line 'export HIFILES_HOME= export HIFILES_RUN=/bin' to the .bashrc file or is there a specific location where this line is to be included? Sorry, I am new to all of this.

rafarohit commented 8 years ago

screenshot from 2016-06-15 11-38-56 That is my .bashrc file and I have placed the line given in the installation instructions to set environment variables at the very end. I am not sure if that is right.

mlopez14 commented 8 years ago

I see; the tutorial is confusing. Add the following line to your ~/.bashrc file: export HIFILES_HOME='/home/rohit/Downloads/HiFiLES-solver-master'

save and exit. This sets the environment variable.

Then type in your terminal: source ~/.bashrc so the changes apply immediately.

On Wed, Jun 15, 2016 at 12:41 PM, rafarohit notifications@github.com wrote:

[image: screenshot from 2016-06-15 11-38-56] https://cloud.githubusercontent.com/assets/13486773/16088668/dca541a2-32ed-11e6-8041-04a4913cca41.png That is my .bashrc file and I have placed the line given in the installation instructions to set environment variables at the very end. I am not sure if that is right.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HiFiLES/HiFiLES-solver/issues/125#issuecomment-226246195, or mute the thread https://github.com/notifications/unsubscribe/AFmj6_goM1FB1ILnS38KcDxL-9Oizataks5qMCs8gaJpZM4I2Y3_ .

rafarohit commented 8 years ago

I solved the problem a few days ago. I set the environment variable to: export HIFILES_HOME= export HIFILES_RUN=/home/rohit/Downloads/HiFiLES-solver-master/bin/HiFiLES

Besides that, I had to make sure the cubature.cpp from the src folder was reading from the correct location. Hence, made following change in the .cpp file: filename = "/home/rohit/Downloads/HiFiLES-solver-master/data/cubature_1d.dat";

Note: it is not "filename+=" but just "filename=". Thanks for the help.

mlopez14 commented 8 years ago

Glad you could solve it!

On Sat, Jun 18, 2016 at 1:12 AM rafarohit notifications@github.com wrote:

I solved the problem a few days ago. I set the environment variable to: export HIFILES_HOME= export HIFILES_RUN=/home/rohit/Downloads/HiFiLES-solver-master/bin/HiFiLES

Besides that, I had to make sure the cubature.cpp from the src folder was reading from the correct location. Hence, made following change in the .cpp file: filename = "/home/rohit/Downloads/HiFiLES-solver-master/data/cubature_1d.dat";

Note: it is not "filename+=" but just "filename=". Thanks for the help.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/HiFiLES/HiFiLES-solver/issues/125#issuecomment-226922648, or mute the thread https://github.com/notifications/unsubscribe/AFmj63TEDcjphIpz0GACAYM2SCeIN4seks5qM35KgaJpZM4I2Y3_ .