gavin971 / cvmix

Automatically exported from code.google.com/p/cvmix
0 stars 0 forks source link

The default parameters in cvmix_ddiff cause fatal (gnu) compiler error when using -r8 command line option #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using /trunk, revision 129.
2. Compiling src/shared in context of MOM6 (GFDL code)
3. Use gnu compiler environment on Cray with options "-fcray-pointer 
-fdefault-real-8 -Waliasing"

What is the expected output? What do you see instead?
ftn -Duse_libMPI -Duse_netCDF -DSPMD -DLAND_BND_TRACERS   -fcray-pointer 
-fdefault-real-8 -Waliasing -ffree-line-length-none -fno-range-check  -O2 
-fno-expensive-optimizations  -c     
../../MOM6/src/parameterizations/CVmix/cvmix_ddiff.F90                          

../../MOM6/src/parameterizations/CVmix/cvmix_ddiff.F90:169.67:                  

          call cvmix_put(CVmix_ddiff_params, "kappa_ddiff_t", 7d-5)
                                                                   1
Error: There is no specific subroutine for the generic 'cvmix_put' at (1)
../../MOM6/src/parameterizations/CVmix/cvmix_ddiff.F90:172.67:           

          call cvmix_put(CVmix_ddiff_params, "kappa_ddiff_s", 1d-4)
                                                                   1
Error: There is no specific subroutine for the generic 'cvmix_put' at (1)
../../MOM6/src/parameterizations/CVmix/cvmix_ddiff.F90:175.64:           

          call cvmix_put(CVmix_ddiff_params, "mol_diff", 1.5d-6)
                                                                1
Error: There is no specific subroutine for the generic 'cvmix_put' at (1)
../../MOM6/src/parameterizations/CVmix/cvmix_ddiff.F90:179.67:           

          call cvmix_put(CVmix_ddiff_params, "kappa_ddiff_t", 7d-1)
                                                                   1
Error: There is no specific subroutine for the generic 'cvmix_put' at (1)
../../MOM6/src/parameterizations/CVmix/cvmix_ddiff.F90:185.64:           

          call cvmix_put(CVmix_ddiff_params, "mol_diff", 1.5d-2)
                                                                1
Error: There is no specific subroutine for the generic 'cvmix_put' at (1)
make[1]: *** [cvmix_ddiff.o] Error 1                                     

Please use labels and text to provide additional information.
It seems using the "D" notation for the exponent in combination with the 
-fdefault-real-8 option is causing the arguments between caller and module to 
have different kinds. Changing to the "E" notation, e.g. 7d-5 to 7.e-5, seems 
to work.

Original issue reported on code.google.com by adcr...@gmail.com on 4 Jun 2013 at 7:55

GoogleCodeExporter commented 9 years ago
As you mentioned when we talked, switching from 7d-5 to 7e-5_cvmix_r8 is 
preferred. I made this change (as well as a few in the stand-alone driver) in 
r133... see the commit log for more details.

Original comment by mike.lev...@gmail.com on 4 Jun 2013 at 8:43