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

got error while compiling #1

Open
qyxiao opened this issue Dec 13, 2021 · 6 comments
Open

got error while compiling #1

qyxiao opened this issue Dec 13, 2021 · 6 comments

Comments

@qyxiao
Copy link

qyxiao commented Dec 13, 2021

Hi Jody, thanks for the sharing. I tried to use your code but when running 'make' I got the error message below:

if [ ! -L PTRACERS_MOD.h ]; then ln -s /home/qx344/MitgcmTutor/MITgcm//pkg/ptracers/PTRACERS_MOD.h PTRACERS_MOD.h; fi
mpif90 -m64 -convert big_endian -assume byterecl -mcmodel=medium -O2 -align -ip -fp-model source -xHost  -c btforcing_tendency_apply.f
btforcing_tendency_apply.f(1933): error #5082: Syntax error, found ',' when expecting one of: ( : % [ . = =>
      RL_ tideamp, f, tidefreq
-----------------^
btforcing_tendency_apply.f(1936): error #6404: This name does not have a type, and must have an explicit type.   [BTFORCINGTIDEFREQ]
      tidefreq = btforcingTideFreq
-----------------^
btforcing_tendency_apply.f(1937): error #6404: This name does not have a type, and must have an explicit type.   [TIDEAMP]
      tideamp = -btforcingTideAmp
------^
btforcing_tendency_apply.f(1937): error #6404: This name does not have a type, and must have an explicit type.   [BTFORCINGTIDEAMP]
      tideamp = -btforcingTideAmp
-----------------^
btforcing_tendency_apply.f(3515): error #6404: This name does not have a type, and must have an explicit type.   [BTFORCINGU0]
     &     + maskS(i,j,k,bi,bj) * fCori(i, j, bi, bj) * btforcingU0
--------------------------------------------------------^

Do you have any idea what causes this? It may be helpful if you can share the details of how you compile the code usually. What I did was:
module load openmpi/intel/4.0.5
module load netcdf-fortran/intel/4.5.3
/home/qx344/MitgcmTutor/MITgcm/tools/genmake2 -rootdir /home/qx344/MitgcmTutor/MITgcm/ -mods /home/qx344/MitgcmTutor/MITgcm/verification/20kmMPRun/code/ -mpi -optfile /home/qx344/MitgcmTutor/MITgcm/tools/build_options/linux_amd64_ifort11
make depend
make

Thanks in advance!

@jklymak
Copy link
Owner

jklymak commented Dec 14, 2021

It looks like somehow your pre-processor is not running properly. RL_ should get replaced when the *.f file is made by Real*8 or Real*4. I'd remove *.f from your build directory and start again...

@qyxiao
Copy link
Author

qyxiao commented Dec 16, 2021

Hi Jody.
I have tried a few more times but still got the same error. I guess I don't fully understand what you mean when you say 'pre-processor'.
Also, could you point me to a reference where the equations in your code comes from? Sorry I'm new to this field of tides...
Thank you again.

@jklymak
Copy link
Owner

jklymak commented Dec 17, 2021

https://en.wikipedia.org/wiki/C_preprocessor it translates things like _RL to 'Real*8'. Maybe you just need to remove *.for files.

I'm not sure I underhand the question about equations. Its a simple body force, applied in units of m/s^2...

@qyxiao
Copy link
Author

qyxiao commented Dec 17, 2021

For example, where does the '(tidefreqtidefreq - ff)/tidefreq' come from? Haven't seen this in other places... Is this a parameter we get when we take the derivative of the tidal potential?

@jklymak
Copy link
Owner

jklymak commented Dec 17, 2021

If you want to force a velocity you need an acceleration that is the derivative of the velocity.

@LemingVan
Copy link

Hi @jklymak and @qyxiao ,

I think I found the error, it is the RL_ in

RL_ tideamp, f, tidefreq

I changed the RL_ to _RL, it works now.

Cheers

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

3 participants