Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29361 Discussions

error specification statement cannot appear

fadauto
Beginner
3,088 Views

I tried to ivoke a Fortran code but a message error has showed and I don't know what is mean. The initial code and the messege error log are attached. I am working with Visual Fortran Compiler v 11.0 .

Thanks.

0 Kudos
9 Replies
Steven_L_Intel1
Employee
3,088 Views

The attachment isn't showing - you need to go back into Add Files, click on the folder, click on the file name and then click Add as Attachment.

You don't show the full error message but this is probably telling you that you placed a declaration statement after the first executable statement. For example, something like this:

[cpp]integer x
x = 3
real y ! Error![/cpp]
You should read the section towards the front of the Intel Fortran Language Reference (part of the on-disk documentation), or any Fortran textbook, on the statement ordering requirements. Once you have an executable statement, you can't have any other declarations.

0 Kudos
fadauto
Beginner
3,088 Views

OK. Now the files are under the message. Showed attached. Thanks.

0 Kudos
Steven_L_Intel1
Employee
3,088 Views

The specific problem is the line:

use=imslf90

This is an assignment statement that assigns the (uninitialized) variable imslf90 to the undeclared variable use.

You probably meant:

use imslf90

but that is not a valid module name in the IMSL library as provided with Intel Visual Fortran Professional Edtion with IMSL. I did not see, in the main program, calls to any IMSL routines so I am not sure what was wanted here. Also, the commented-out INCLUDE of 'link_f90_static.h' should be uncommented and the name changed to 'link_fnl_static.h'.

However, that is not the worst of the problems. There are uses of the letter O instead of the digit 0, continued lines without the proper continuation, and more. I got many, many errors trying to compile this. It looks as if you may have typed this in from reading it in a book.

0 Kudos
fadauto
Beginner
3,088 Views

The specific problem is the line:

use=imslf90

This is an assignment statement that assigns the (uninitialized) variable imslf90 to the undeclared variable use.

You probably meant:

use imslf90

but that is not a valid module name in the IMSL library as provided with Intel Visual Fortran Professional Edtion with IMSL. I did not see, in the main program, calls to any IMSL routines so I am not sure what was wanted here. Also, the commented-out INCLUDE of 'link_f90_static.h' should be uncommented and the name changed to 'link_fnl_static.h'.

However, that is not the worst of the problems. There are uses of the letter O instead of the digit 0, continued lines without the proper continuation, and more. I got many, many errors trying to compile this. It looks as if you may have typed this in from reading it in a book.


I didn't believe that was only this, and I did fix mistakes you pointed. Now, it is work out.

Many thanks.
0 Kudos
britodsyahoo_com_br
3,088 Views
Quoting - fadauto

I didn't believe that was only this, and I did fix mistakes you pointed. Now, it is work out.

Many thanks.

Steve,

I don't know who is fadauto, but I have the same code/program that he (MONETA). Probably we made the same course and we obtained the code to input the data in a software. I didn't had any experience with programming until now. I'm workin with Microsoft Visual Studio 2008 and Intel Visual Fortran Compiler 11.0, both demo version. I need your support. Please, see attachments.

One more question, it's necessary create extensions of files (*.txt and *.h - 'link_lnf_static.h', mentioned at line of code) in the same directory of moneta.f90 or this files will be create by moneta.f90 automaticaly when it's executed?

Thank you!
0 Kudos
britodsyahoo_com_br
3,088 Views

The specific problem is the line:

use=imslf90

This is an assignment statement that assigns the (uninitialized) variable imslf90 to the undeclared variable use.

You probably meant:

use imslf90

but that is not a valid module name in the IMSL library as provided with Intel Visual Fortran Professional Edtion with IMSL. I did not see, in the main program, calls to any IMSL routines so I am not sure what was wanted here. Also, the commented-out INCLUDE of 'link_f90_static.h' should be uncommented and the name changed to 'link_fnl_static.h'.

However, that is not the worst of the problems. There are uses of the letter O instead of the digit 0, continued lines without the proper continuation, and more. I got many, many errors trying to compile this. It looks as if you may have typed this in from reading it in a book.


Steve,

I don't know who is fadauto, but I have the same code/program that he (MONETA). Probably we made the same course and we obtained the code to input the data in a software. I didn't had any experience with programming until now. I'm workin with Microsoft Visual Studio 2008 and Intel Visual Fortran Compiler 11.0, both demo version. I need your support. Please, see attachments.

One more question, it's necessary create extensions of files (*.txt and *.h - 'link_lnf_static.h', mentioned at line of code) in the same directory of moneta.f90 or this files will be create by moneta.f90 automaticaly when it's executed?

Thank you!
0 Kudos
Steven_L_Intel1
Employee
3,088 Views
This program depends on the IMSL libraries which are provided only if you have purchased "Intel Visual Fortran Professional Edition with IMSL". The file LINK_FNL_STATIC.H is part of the IMSL component, as is a module with IMSL definitions, though it is not named IMSLF90 in our version. If in fact you have IMSL available, than please read this knowledge base article on how to configure and use it. However, the evaluation version does not include IMSL.

Any .txt files that the program might need you will have to create separately.
0 Kudos
britodsyahoo_com_br
3,088 Views
This program depends on the IMSL libraries which are provided only if you have purchased "Intel Visual Fortran Professional Edition with IMSL". The file LINK_FNL_STATIC.H is part of the IMSL component, as is a module with IMSL definitions, though it is not named IMSLF90 in our version. If in fact you have IMSL available, than please read this knowledge base article on how to configure and use it. However, the evaluation version does not include IMSL.

Any .txt files that the program might need you will have to create separately.

Steve,

Sorry my English, I have some difficul yet.

IMSL Fortran Library 6.0 it will work with Microsoft Visual Studio 2008 and Visual Fortran Compiler 11.0? I aquired IMSL demo version in www.vni.com that depend of a license number to test it. Did you have some test version of IMSL Fortran to indicate?

I don't have plans to buy IMSL now. Not exist a especific project to apply this software. I'm not a programmer, I'm a graphic designer curious. I will have to buy IMSL Fortran and others softwares/produts at a distant future, but now, I need to test it to know how IMSL will contribute with my plans.

Danilo Silva Brito

0 Kudos
Steven_L_Intel1
Employee
3,088 Views
Danilo,

Yes, VNI does offer an evaluation version of IMSL. It is not identical to the version that we supply in that it requires some licensing code to be linked in, but the operation should be similar. I can't help with setting up Intel Fortran for use with that version of IMSL, but you may find that the instructions I mentioned earlier are helpful. You will need to talk to VNI for support of that version.

With our version of IMSL, and replacing IMSLF90 with NUMERICAL_LIBRARIES, the source moneta.f90 compiles but on linking it is missing routines OPTIMUM and CALC which are user routines (not part of IMSL.)
0 Kudos
Reply