Пакет проверки компилятора для Fortran 2003? - PullRequest
1 голос
/ 21 октября 2010

Существует ли набор тестов, который проверяет, полностью ли реализует компилятор Fortran стандарт Fortran 2003?

Ответы [ 2 ]

2 голосов
/ 21 октября 2010

Краткий ответ: Нет

Для Fortran 95 существует набор тестов SHAPE95 от Spackman & Hendrickson, Inc. Но он никогда не претендовал на полный набор тестов и не был официально авторитетным. Конечно, то же самое относится и к тестовому пакету NIST F77, который, в отличие от SHAPE95, находится в свободном доступе. Во-вторых, AFAIK SHAPE95 не обновлялся для F2003.

Так что же делать? Ну, несколько лет назад об одном и том же обсуждении на c.l.f:

Bart Vandewoestyne wrote:
> On 2007-12-14, Richard Maine  wrote:
>> It seems reasonably complete to me. But you can't just use a checklist
>> like that for standard compliance. It is a very nice summary, and I find
>> it quite useful, but I'm sorry, the full standard doesn't compress down
>> to one page like that. Sorry, but it ain't gonna happen. If anyone
>> claims to have such a one-page or so checklist of the things that would
>> make a compiler fully f2003 compliant, then they are wrong.

>> But it is a good summary.

> I completely agree with you, Richard.  But then what are the
> criteria for 'full F2003 compliance'?  If a compiler-writer
> claims that he has a 'full F2003 compliant compiler', then what are
> the criteria that he uses to support his statement?

Ultimately, good faith and his reputation.  It's a hard standard to
read (or to write books about, as Richard can tell you) and there is no
official test or validation program.  Real vendors won't claim
to support it unless they really think they do.  And, they'll do
their best to fix any omissions or errors.  There is an interpretation
process that will get J3 to give an official answer to a specific
question.  For the past many years, essentially all of the interp
questions have come from compiler writers who are trying to understand
the standard.

It's not a great situation.  The best advice is to get several
compilers and try your code on several of them--with full error
checking and standards conformance options turned on.

Dick Hendrickson

FWIW, персонаж «Ричард Мейн», представленный выше, был редактором стандарта F2003, и «Дик Хендриксон» также работал в IIRC в комитете по стандартам, и да, он один из тех, кто стоит за SHAPE95. Я знаю, о чем они говорят.

Наконец, компилятор gfortran поставляется с довольно большим набором тестов, который доступен бесплатно, как и остальная часть компилятора. Я видел некоторые замечания от проприетарных производителей компиляторов, что они также использовали его. Но, опять же, тестовый набор gfortran не претендует на то, чтобы быть полным тестовым набором; на самом деле, это в основном тестовые случаи, которые ранее выявляли ошибки в компиляторе.

2 голосов
/ 21 октября 2010

Я не знаю такого набора тестов. Если меня это беспокоит, я посмотрю здесь или прочитайте это .

...