Skip to content
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

Cannot open input file for reading #125

Open
rafarohit opened this issue Jun 15, 2016 · 15 comments
Open

Cannot open input file for reading #125

rafarohit opened this issue Jun 15, 2016 · 15 comments

Comments

@rafarohit
Copy link

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
Copy link
Member

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 [email protected] 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
#125, or mute the thread
https://github.com/notifications/unsubscribe/AFmj65GUmqgdZrkxj49KA23dPi4JF5muks5qMAW_gaJpZM4I2Y3_
.

@rafarohit
Copy link
Author

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
Copy link
Member

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 [email protected] 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
#125 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AFmj68IXtjcYz2d2eer_jb9MqfZEIXYoks5qMBhkgaJpZM4I2Y3_
.

@rafarohit
Copy link
Author

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
Copy link
Member

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 [email protected] 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
#125 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AFmj67FFDC4mm4pZBs8qsG7uV8F36CQGks5qMCPpgaJpZM4I2Y3_
.

@rafarohit
Copy link
Author

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

@mlopez14
Copy link
Member

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 [email protected] 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
#125 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AFmj6w6iq0kZiuDCSggeQSIOH9thiztNks5qMCY2gaJpZM4I2Y3_
.

@rafarohit
Copy link
Author

yes, that is what I have been doing!

@rafarohit
Copy link
Author

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

@mlopez14
Copy link
Member

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 [email protected] 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
#125 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AFmj6-nyFQVS61yKdBFLVsHupksuFRt8ks5qMCdXgaJpZM4I2Y3_
.

@rafarohit
Copy link
Author

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
Copy link
Author

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
Copy link
Member

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 [email protected]
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
#125 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AFmj6_goM1FB1ILnS38KcDxL-9Oizataks5qMCs8gaJpZM4I2Y3_
.

@rafarohit
Copy link
Author

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
Copy link
Member

Glad you could solve it!

On Sat, Jun 18, 2016 at 1:12 AM rafarohit [email protected] 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
#125 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AFmj63TEDcjphIpz0GACAYM2SCeIN4seks5qM35KgaJpZM4I2Y3_
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants