Closed gydx6 closed 1 year ago
problems have been soloved after using gnu 10.2.0 compiler. Additional information: (1) you need to re-compile the netcdf using gnu 10.2.0 (2) netcdf-fortran compile may encounter the error using gnu 10.2.0 :" Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)", check this page to solve the problem: https://github.com/Unidata/netcdf-fortran/issues/212
I'm having similar issues. I was able to compile and run the model with the single point tutorial on my university's HPC, but I can't seem to compile it on my local machine.
I'm using a 2021 Mac M1. It seems that the issues are coming from compiling and pointing to the right versions of 'netcdf', 'netcdf-fortran', 'jasper', 'gcc' and 'perl'. I've been trouble shooting for a while but don't seem to be making any progress. I looked through the model documentation and haven't been able to find resources on how to do a clean install of the dependencies and point the model to them. When I run 'make' I get errors like this:
21 warnings generated. gfortran -c -I. -I../../hrldas/Utility_routines \ -g -fconvert=big-endian -fbounds-check -fno-range-check -fallow-argument-mismatch -ffree-form -ffree-line-length-none -I/usr/local/include module_sf_bep_bem.f90
make[1]: *** No rule to make target
../../noahmp/drivers/hrldas/NoahmpIOVarType.o', needed by
NoahmpUrbanDriverMainMod.o'. Stop.
My user_build_options file looks like this:
COMPILERF90 = gfortran FREESOURCE = -ffree-form -ffree-line-length-none F90FLAGS = -g -fconvert=big-endian -fbounds-check -fno-range-check -fallow-argument-mismatch MODFLAG = -I LDFLAGS = CPP = cpp CPPFLAGS = -P -traditional -DGFORTRAN # -DSPATIAL_SOIL LIBS = LIBJASPER = -ljasper INCJASPER = -I/usr/include/jasper NETCDFMOD = -I/usr/local/include NETCDFLIB = -L/usr/local/lib -lnetcdf -lnetcdff BZIP2 = NO RM = rm -f CC = cc
Any help would be appreciated. Thanks.
I'm having similar issues. I was able to compile and run the model with the single point tutorial on my university's HPC, but I can't seem to compile it on my local machine.
I'm using a 2021 Mac M1. It seems that the issues are coming from compiling and pointing to the right versions of 'netcdf', 'netcdf-fortran', 'jasper', 'gcc' and 'perl'. I've been trouble shooting for a while but don't seem to be making any progress. I looked through the model documentation and haven't been able to find resources on how to do a clean install of the dependencies and point the model to them. When I run 'make' I get errors like this:
21 warnings generated. gfortran -c -I. -I../../hrldas/Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -fallow-argument-mismatch -ffree-form -ffree-line-length-none -I/usr/local/include module_sf_bep_bem.f90
make[1]: *** No rule to make target
../../noahmp/drivers/hrldas/NoahmpIOVarType.o', needed by
NoahmpUrbanDriverMainMod.o'. Stop.My user_build_options file looks like this:
COMPILERF90 = gfortran FREESOURCE = -ffree-form -ffree-line-length-none F90FLAGS = -g -fconvert=big-endian -fbounds-check -fno-range-check -fallow-argument-mismatch MODFLAG = -I LDFLAGS = CPP = cpp CPPFLAGS = -P -traditional -DGFORTRAN # -DSPATIAL_SOIL LIBS = LIBJASPER = -ljasper INCJASPER = -I/usr/include/jasper NETCDFMOD = -I/usr/local/include NETCDFLIB = -L/usr/local/lib -lnetcdf -lnetcdff BZIP2 = NO RM = rm -f CC = cc
Any help would be appreciated. Thanks.
The problem may be caused by the M1 chip? Because it is arm architecture, and our common computer cpu are x86 architecture, netcdf library or other dependent libraries may be a little different from our x86 function, and eventually lead to the inability to compile
Hi,@grantfalvo
I have not installed noahmp on mac, but I have tried to install WRF on mac, I think it is somewhat similar, you can refer to the configuration of environment variables in WRF installation (note that you are using zsh or bash)
Maybe you can also try changing the clang compiler to GNU's
https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php
For netcdf and jasper... these packages, you can try to use homebrew to install, pay attention to change the path in users_build_option.
the guy who compile wrf in Mac with M1 chip
(1) configure option: 6.Linux gfortran compiler MPI (2) remove the "-fallow-argument-mismatch" of the "F90FLAGS" cause the gfortran 4.8.5 dosen't support this paramter. (3) change the netcdf and jasper path in user_build_options (this netcdf and jasper can compile WRF4.1 and WRF-hydro5.2 succeed). (4) "make all" and get the error:
i will change the gcc version and then report the new situation