UW-Hydro / VIC

The Variable Infiltration Capacity (VIC) Macroscale Hydrologic Model
http://vic.readthedocs.io
MIT License
260 stars 383 forks source link

classic and image drivers fail to build - Ubuntu 22.04 #926

Open blounsbury-usbr opened 1 year ago

blounsbury-usbr commented 1 year ago

Bug Report

I am not a Linux or C code or Makefile expert, so don't really know how to debug the cause of the issue. I did also try using CentOS 7, and after figuring out how to get compilers installed and configured had no issues building the classic and image drivers. So, I'm assuming there is some issue related to the newer gcc version in Ubuntu 22.04.

ShihengDuan commented 8 months ago

Having the same issue with this line in Makefile. Any solutions?

bijoychandraAU commented 8 months ago

@blounsbury-usbr were you able to solve it? I am having the same issue.

blounsbury-usbr commented 8 months ago

@ShihengDuan @bijoychandraAU Yikes, my brain is super fuzzy on this. Attached is the Makefile I used. It looks like I switched compilers from MPICC to GCC. However I just ran make, there were no errors (a bunch of warnings), but it did not produce vicNL.exe. So, unfortunately, I'm not sure how I got it to work, as a vicNL.exe exists in the directory. I can try to look around a bit more to see what I can find. Makefile.txt

bijoychandraAU commented 8 months ago

@blounsbury-usbr thank you for your reply. Still, I got an error with "make: *** No rule to make target 'CalcAerodynamic.c', needed by '.depend'. Stop." with your makefile.

dwoodson-usbr commented 8 months ago

@bijoychandraAU, @ShihengDuan, @blounsbury-usbr I believe I ran into this same issue. I was able to compile the image driver by pointing directly to the mpicc location on line 44 of the makefile. You may need to change the path below to wherever mpicc is installed (you should be able to find it by running in your terminal: locate -br "^mpicc$")

Change MPICC = mpicc to MPICC = /usr/lib64/openmpi/bin/mpicc