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

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

Open
blounsbury-usbr opened this issue Aug 18, 2022 · 5 comments
Open

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

blounsbury-usbr opened this issue Aug 18, 2022 · 5 comments

Comments

@blounsbury-usbr
Copy link

Bug Report

  • Version of VIC that you are using (e.g. VIC.5.0.0)
    • Tried all 5x versions and the master branch, no issue with VIC 4.2.d
  • Name and version of the C compiler you are using
    • gcc 11.2
    • mpicc 11.2
  • Operating system
    • Ubuntu 22.04
  • A description of relevant model settings
    • N/A
  • A summary of the bug or error message you are getting
    • running make fails with "make[1]: *** [Makefile:126: model] Error 1" for the image driver Makefile that corresponds to this line "$(MPICC) -o ${COMPEXE}${EXT} $(OBJS) $(CFLAGS) $(LIBRARY)"

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

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

@bijoychandraAU
Copy link

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

@blounsbury-usbr
Copy link
Author

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

bijoychandraAU commented Nov 27, 2023

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

@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

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

4 participants