Compiling error
Compiling error
Hi, can anyone help me work out what this error means? I am completely new to ROMS and I am using cygwin to run
In file uv_rotate.f90:260
Vout(i,j,k)=Vout(i,j,k)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
In file uv_rotate.f90:274
Vout(i,j,k)=Vrho*CosAngler(i,j)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
ROMS/Utility/Module.mk:15: recipe for target 'Build/uv_rotate.o' failed
make: *** [Build/uv_rotate.o] Error 1
In file uv_rotate.f90:260
Vout(i,j,k)=Vout(i,j,k)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
In file uv_rotate.f90:274
Vout(i,j,k)=Vrho*CosAngler(i,j)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
ROMS/Utility/Module.mk:15: recipe for target 'Build/uv_rotate.o' failed
make: *** [Build/uv_rotate.o] Error 1
Re: Compiling error
It's saying you have a rank mis-match for Vout. Looking at uv_rotate.F, there's a routine in which Vout is 2-D, then a routine in which Vout is 3-D. Did your uv_rotate.f90 somehow get garbled? Perhaps try deleting the uv_rotate.f90 and let the build process recreate it.
Re: Compiling error
HI was there ever any solution to this problem. I have tried many many times to install ROMS at this point and this error keeps coming up. Even after I did the suggested delete of the uv_rotate.f90
Re: Compiling error
Did you compare uv_rotate.F to uv_rotate.f90? We edit the former while the compiler sees the latter. One gets from the first to the second using "cpp --traditional". The C preprocessor should do the right thing... and does for most of us.
-
- Posts: 11
- Joined: Mon Jan 16, 2017 1:02 am
- Location: DSS
Re: Compiling error
when i am trying to compile roms, uv_rotate.F has failed to build with this error.
uv_rotate.f90:268.18:
Vout(i,j,k)=Vout(i,j,k)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:268.30:
Vout(i,j,k)=Vout(i,j,k)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:272.18:
Vout(i,j,k)=Vout(i,j,k)*rmask_full(i,j)
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:272.30:
Vout(i,j,k)=Vout(i,j,k)*rmask_full(i,j)
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:284.18:
Vout(i,j,k)=Vrho*CosAngler(i,j)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:287.18:
Vout(i,j,k)=Vout(i,j,k)*rmask_full(i,j)
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:287.30:
Vout(i,j,k)=Vout(i,j,k)*rmask_full(i,j)
1
Error: Rank mismatch in array reference at (1) (3/4)
I am using gcc 4.9.2 and gfortran 4.9.2. my Linux_gfortran.mk file has
FC := gfortran
FFLAGS := -frepack-arrays
CPP := /usr/bin/cpp
CPPFLAGS := -P
MDEPFLAGS := --cpp --fext=f90 --file=- --objdir=$(SCRATCH_DIR)
I noticed that the error appears when SOLVE3D is defined. It is trying to do both 2d and 3d in uv_rotate.F
Any help would be appreciated.
uv_rotate.f90:268.18:
Vout(i,j,k)=Vout(i,j,k)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:268.30:
Vout(i,j,k)=Vout(i,j,k)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:272.18:
Vout(i,j,k)=Vout(i,j,k)*rmask_full(i,j)
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:272.30:
Vout(i,j,k)=Vout(i,j,k)*rmask_full(i,j)
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:284.18:
Vout(i,j,k)=Vrho*CosAngler(i,j)+ &
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:287.18:
Vout(i,j,k)=Vout(i,j,k)*rmask_full(i,j)
1
Error: Rank mismatch in array reference at (1) (3/4)
uv_rotate.f90:287.30:
Vout(i,j,k)=Vout(i,j,k)*rmask_full(i,j)
1
Error: Rank mismatch in array reference at (1) (3/4)
I am using gcc 4.9.2 and gfortran 4.9.2. my Linux_gfortran.mk file has
FC := gfortran
FFLAGS := -frepack-arrays
CPP := /usr/bin/cpp
CPPFLAGS := -P
MDEPFLAGS := --cpp --fext=f90 --file=- --objdir=$(SCRATCH_DIR)
I noticed that the error appears when SOLVE3D is defined. It is trying to do both 2d and 3d in uv_rotate.F
Any help would be appreciated.
Last edited by roopakotta on Tue Feb 21, 2017 5:53 pm, edited 1 time in total.
Re: Compiling error
Again, you need to look at the uv_rotate.f90 file to see what's what there with Vout. The problem is either with the cpp step or with the compile step and we can't tell from here. Maybe if you attach your uv_rotate.f90?
-
- Posts: 11
- Joined: Mon Jan 16, 2017 1:02 am
- Location: DSS
Re: Compiling error
Thank you for your reply.
I defined SOLVE3d in my cppdefs.h
Attached is my uv_rotate.f90
I defined SOLVE3d in my cppdefs.h
Attached is my uv_rotate.f90
- Attachments
-
- uv_rotate.f90
- (13.08 KiB) Downloaded 329 times
Re: Compiling error
There's a problem here:
which should be:
I haven't run into this problem because I have ASSUMED_SHAPE turned on and this is in the "else" case.
Code: Select all
Vout(LBi:UBi,LBj:UBj,LBk,UBk)
Code: Select all
Vout(LBi:UBi,LBj:UBj,LBk:UBk)
-
- Posts: 11
- Joined: Mon Jan 16, 2017 1:02 am
- Location: DSS
Re: Compiling error
Thank you so much kate.
It is working now.
It is working now.