avenger@avenger_ws
Member
I am trying to make CAM 3.1.p2 'compilable' on g95, and would like some help of people who know internally how does it work.
As I am beginning with CAM (dropped from CCM3 while not yet being familiar with it too), I understand little things of its working mechanism, so I am changing only orthogonal things, things that already have on the other compilers (found on other working source files for example).
Well so far, I left ESMF from the package and built latest version directly from the developers' website (version 2.2.2p3). With some special commandline arguments passed to CAM3.1's configure, it compiled the outer ESMF successfully (some tests seems to work, but real test comes when CAM3.1 is done).
Btw, my g95 is 0.92 (for gcc 4.0.3), 64bit, binary distribution got from the developers' website also (www.g95.org). NetCDF is also installed with g95 (thanks to a guy who sent a post to netcdf's website with parameters that permitted g95 to compile it -- his guidances are also helping the compile of CAM3.1 with g95.
Back to the building, after ESMF is compiled by CAM3.1's configure script, tons of errors pop up. Missing libraries, fixed (without changing makefile) with
(missing libs regards to the -I's only -- the other is to make possible linking .c's and .f's objects together)
After that, I started to have problems with not found includes for 'netcdf.inc', which was already on the -I's. The workaround was to change every
to
As both do the same, but the first looks only on current directory, I assumed that on other compilers they also look for on all include directories and just g95 needed it this way, but the others would support this changed include as well, as there were occurrences of these on other source files already.
Now I am under a problem with kissvec(), where on file models/atm/cam/src/physics/cam1/icarus_scops.F90, line 651 (and maybe others), it passes a real(8 ) value to kissvec() which accepts a real(4 ). Would that be safer to turn these into real(4 ) before passing, or better make kissvec accept real(8 ) (more memory) and make other calls to it real(8 )?
Thanks in advance.
As I am beginning with CAM (dropped from CCM3 while not yet being familiar with it too), I understand little things of its working mechanism, so I am changing only orthogonal things, things that already have on the other compilers (found on other working source files for example).
Well so far, I left ESMF from the package and built latest version directly from the developers' website (version 2.2.2p3). With some special commandline arguments passed to CAM3.1's configure, it compiled the outer ESMF successfully (some tests seems to work, but real test comes when CAM3.1 is done).
Btw, my g95 is 0.92 (for gcc 4.0.3), 64bit, binary distribution got from the developers' website also (www.g95.org). NetCDF is also installed with g95 (thanks to a guy who sent a post to netcdf's website with parameters that permitted g95 to compile it -- his guidances are also helping the compile of CAM3.1 with g95.
Back to the building, after ESMF is compiled by CAM3.1's configure script, tons of errors pop up. Missing libraries, fixed (without changing makefile) with
Code:
-fflags '-fno-second-underscore -I. -Iesmf/mod/modO/linux_pgi -Iesmf/mod/modO/Linux.g95.64.mpiuni.default -I/usr/include -Imodels/atm/cam/src/dynamics/eul -Imodels/atm/cam/src/physics/cam1 -Imodels/atm/cam/src/control -Imodels/atm/cam/src/ocnsice/dom -Imodels/atm/cam/src/advection/slt'
(missing libs regards to the -I's only -- the other is to make possible linking .c's and .f's objects together)
After that, I started to have problems with not found includes for 'netcdf.inc', which was already on the -I's. The workaround was to change every
Code:
include 'netcdf.inc'
to
Code:
#include <netcdf.inc>
As both do the same, but the first looks only on current directory, I assumed that on other compilers they also look for on all include directories and just g95 needed it this way, but the others would support this changed include as well, as there were occurrences of these on other source files already.
Now I am under a problem with kissvec(), where on file models/atm/cam/src/physics/cam1/icarus_scops.F90, line 651 (and maybe others), it passes a real(8 ) value to kissvec() which accepts a real(4 ). Would that be safer to turn these into real(4 ) before passing, or better make kissvec accept real(8 ) (more memory) and make other calls to it real(8 )?
Thanks in advance.