Ask Your Question
0

jobcomp Error: Rank mismatch

asked 2021-07-02 18:00:46 +0100

Hello everybody! I hope they are fine!

I have a problem compiling my simulation. I'm just running a simulation of physical parameters for the Gulf of California inlet area. Previously it ran without any problem, but lately, I get the following error:

% =================================================================================================== /usr/local/netcdf-f/include/netcdf.inc:1277:38: warning: missing terminating ' character [-Winvalid-pp-token] integer nf_ecantread ! Can't read. ^ /usr/local/netcdf-f/include/netcdf.inc:1279:38: warning: missing terminating ' character [-Winvalid-pp-token] integer nf_ecantwrite ! Can't write. ^ /usr/local/netcdf-f/include/netcdf.inc:1281:38: warning: missing terminating ' character [-Winvalid-pp-token] integer nf_ecantcreate ! Can't create. ^ 3 warnings generated. gfortran -c -O3 -fdefault-real-8 -fdefault-double-8 put_global_atts_.f -o put_global_atts.o put_global_atts_.f:1235:64:

1218 | & 1, theta_s) | 2
...... 1235 | & sc_w) | 1 Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1) put_global_atts_.f:1239:64:

1218 | & 1, theta_s) | 2
...... 1239 | & Cs_w) | 1 Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1) put_global_atts_.f:1242:62:

1218 | & 1, theta_s) | 2
...... 1242 | ierr=nf_put_att_double(ncid,nf_global,'sc_r',nf_ftype,N,sc_r) | 1 Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1) put_global_atts_.f:1245:62:

1218 | & 1, theta_s) | 2
...... 1245 | ierr=nf_put_att_double(ncid,nf_global,'Cs_r',nf_ftype,N,Cs_r) | 1 Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1) gmake: * [Makedefs:14: put_global_atts.o] Error 1

% =================================================================================================== The parameters I have been using are:

% Vertical grid parameters % theta_s = 7; theta_b = 0.3; hc = 10.; vtransform = 2.;

I don't know why right now I have this error. Someone can help me o guide me with my problem!?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2021-08-05 07:16:43 +0100

ezaron gravatar image

updated 2021-08-05 07:17:47 +0100

Hi:

I am having this problem, too, with a fresh download of v1.1. It seems to be a new feature of the latest gfortran:

https://gcc.gnu.org/gcc-10/porting_to...

You can add this option to the compiler options on line 145 of jobcomp:

-fallow-argument-mismatch

and be careful to preserve the ending whitespace there.

-Ed

edit flag offensive delete link more

Comments

Hi, Thank you so much for your help Ed. I followed your recommendation, but I have the same error. Maybe I didn't add it in the right place. These are my lines in jobcomp file: # # compiler options # FC=gfortran -fallow-argument-mismatch # Can you check if is it correct? please! Thanks again!

mariathdz gravatar imagemariathdz ( 2021-08-09 22:17:50 +0100 )edit

I can't tell from your message. It looks as if the "FC=" statement is inside a comment block. Can you post your entire file as an attachment here? Alternately, you can email it to me directly at edwarddzaron@oregonstate.edu, and I will compare it with mine.

ezaron gravatar imageezaron ( 2021-08-09 22:41:54 +0100 )edit

Thanks Ed, if you don't mind I'll email it to you because I don't know how to attach it here!

mariathdz gravatar imagemariathdz ( 2021-08-09 22:46:41 +0100 )edit
0

answered 2022-07-02 03:37:58 +0100

andres gravatar image

And here for MPI (mpif90)

    FFLAGS1="$FFLAGS1 $MPIINC -fallow-argument-mismatch"
edit flag offensive delete link more
0

answered 2022-07-02 03:31:08 +0100

andres gravatar image

updated 2022-07-02 03:31:49 +0100

Seems it is needed here (now compiles serial and openmp)

    elif [[ $FC == gfortran ]] ; then
            CPP1="cpp -traditional -DLinux"
            CFT1=gfortran
            FFLAGS1="-O3 -fdefault-real-8 -fdefault-double-8 -fallow-argument-mismatch"    
                                                             **************************
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-07-02 18:00:46 +0100

Seen: 3,578 times

Last updated: Jul 02 '22