childmodel / child

Channel-Hillslope Integrated Landscape Development Model
MIT License
12 stars 10 forks source link

Issue in compiling CHILD model #4

Open Nikul16 opened 4 years ago

Nikul16 commented 4 years ago

Hi, I want to use the CHILD Landscape evolution model so that I can work and explore with 4-sided mesh for different simulations. But I am stuck in the very beginning itself. As I have downloaded the CHILD model and tried to compile it, it shows error regarding some missing files. As given in the user guide, I tried to follow the instructions, but still, it is not working.

I have attached the screenshot for the error which I am getting. Error_1

I would be very thankful if anyone could provide some advice in order to solve this problem.

Thank you

gregtucker commented 4 years ago

Thank you for raising this issue @Nikul16. I tried to reproduce this on a 2016 MacBookPro running OS 10.13.6, but did not succeed: it compiles fine for me, using both childir.mk and childi.mk. Could you please try:

Nikul16 commented 4 years ago

Thanks a lot @gregtucker

I tried with both childir.mk again (or childi.mk), I could not succeed in this also.

I had downloaded the child model from GitHub and then after unzipping the folders, I tried to run the model in Linux by using PuTTY as my PC has windows OS.

Thank you

Smerom commented 4 years ago

What compiler version are you running? If it's an older version it might not enable c++11 by default, requiring a "-std=c++11" flag.

Nikul16 commented 4 years ago

I have checked with my version, I am using the following:

gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)

gregtucker commented 4 years ago

@nikul16 try downloading a new version of master, and compiling with

make -f childi.mk

I edited the gcc.mk compile script to add the -std=c++11 option, as suggested by @Smerom. Let me know if that works.

Nikul16 commented 4 years ago

Hello @gregtucker

I tried to compile with the make -f childi.mk after downloading the new version.

But I got this new error. I have attached the error image.

Error

gregtucker commented 4 years ago

In that case I suggest seeing if there is an updated version of gcc that you can install.

Nikul16 commented 4 years ago

Hi @gregtucker

I got the updated version from the university administration. We have the Red Hat 6 version.

But still, I am getting the same error as sent in the last chat.

Error_2

gregtucker commented 4 years ago

Suggest looking into the syntax for the compiler you're using. Do

gcc -h

To get a list of option flags. For me, the compiler is "clang" and among the options is:

-std= Language standard to compile for

See if that's there in your version. I suspect you'll need to find a different compiler that either includes this option, or includes C++11 by default.

Nikul16 commented 4 years ago

Hello @gregtucker

I tried this command, but I got:

"argument to '-h' missing or No input file"

I also contacted our administration for updating the compiler as suggested by you.

However, they said that "It appears gcc is still version 4.4.7 but this appears to be the latest available to Red Hat 6. See https://access.redhat.com/solutions/19458".

Sorry for the delay in response, as it took time through university processes for this.

Is there any other way to compile the model.

Thank you,