Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

What Fortran Standard (77, 90, 95, etc) is the CESM written in?

I am trying to build the model using MPI_SERIAL, but whenever I do I get the following error or something similar.

pio_msg_callbacks.F90(260): error #6613: This case-value or case-value-range matches a case-value in another case-value-ra
nge within the same case-construct. [4]
case(mpi_real4)
-------^
compilation aborted for pio_msg_callbacks.F90 (code 1)

I've tried it with 3 different compilers and get the same error every time, so I don't think it's a compiler bug. I'm hoping that if I can force the compiler to use only the standard the CESM is written in then it will compile correctly.

The only other solution I have found on line suggests an error in the source code, but it will compile using OpenMPI no problem.

Thank you,
Aaron
 
I've also gotten the following error pretty consistently...

mpif90.mpich2 -c -I. -I/usr/include -I/usr/include -I/usr/include -I. -I/home/atp42/12test/SourceMods/src.drv -I/home/atp42
/cesm1_0_3/models/drv/driver -I/home/atp42/scratch/12test/lib/include -DMCT_INTERFACE -DHAVE_MPI -DGLC_NEC_10 -DLINUX -DSE
Q_ -DFORTRANUNDERSCORE -DNO_R16 -DNO_SHR_VMATH -g -fno-second-underscore -ffree-line-length-none -ffree-form -fconvert=big-
endian -ffast-math -fno-range-check -O0 /home/atp42/cesm1_0_3/models/drv/driver/seq_domain_mct.F90
/usr/include/mpich2/mpif.h:503.11:
Included at /home/atp42/cesm1_0_3/models/drv/driver/seq_domain_mct.F90:57:

SAVE /MPIFCMB1/,/MPIFCMB2/
1
Warning: SAVE statement at (1) follows blanket SAVE statement
/usr/include/mpich2/mpif.h:504.11:
Included at /home/atp42/cesm1_0_3/models/drv/driver/seq_domain_mct.F90:57:

SAVE /MPIFCMB3/,/MPIFCMB4/,/MPIFCMB5/,/MPIFCMB6/
1
Warning: SAVE statement at (1) follows blanket SAVE statement
/usr/include/mpich2/mpif.h:505.11:
Included at /home/atp42/cesm1_0_3/models/drv/driver/seq_domain_mct.F90:57:

SAVE /MPIFCMB7/,/MPIFCMB8/
1
Warning: SAVE statement at (1) follows blanket SAVE statement
 

jedwards

CSEG and Liaisons
Staff member
atp42 said:
I am trying to build the model using MPI_SERIAL, but whenever I do I get the following error or something similar.
I've tried it with 3 different compilers and get the same error every time, so I don't think it's a compiler bug. I'm hoping that if I can force the compiler to use only the standard the CESM is written in then it will compile correctly.

The only other solution I have found on line suggests an error in the source code, but it will compile using OpenMPI no problem.

Thank you,
Aaron


CESM is written to the f95 standard, however what you are seeing is a bug in the code. You can
correct it by wrapping that case statement in #ifdefs as follows:

#ifndef _MPISERIAL
select case(type)
case(mpi_integer)
call pio_read_darray(file, v, iodesc, aint, ierr)
case(mpi_real4)
call pio_read_darray(file, v, iodesc, areal, ierr)
case(mpi_real8)
call pio_read_darray(file, v, iodesc, adouble, ierr)
end select
#endif
 
Top