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

How to compilte with fpp

Sebastiano_P_
Beginner
1,861 Views

Dear all,

I'm trying to compile with fpp option in Intel Visual Studio 2005.

On the basis of the information contained in previous posts in this forum, I tried to setup the configuration properties. As you can see in the attached screenshot, I defined the Preprocessor Definitions /DPARALLEL, where PARALLEL is the fpp option in my code (see below):

#ifdef PARALLEL
 REQUEST = MPI_REQUEST_NULL
 !send data share with UP
 ...
#endif

When I compiled the code in Linux, I used this simple command line:

ifort -r8 -fpp -DPARALLEL *f90

Thanks.

Sebastiano

 

0 Kudos
9 Replies
Arjen_Markus
Honored Contributor II
1,861 Views

That is the way to do it, but is that not what is happening? You did not include a question or a problem statement in your post.

0 Kudos
Sebastiano_P_
Beginner
1,861 Views

Thanks for the fast reply.

I obtain "Compilation Aborted (code 1)" (in Windows, while in Linux everything works correctly)

 

 

0 Kudos
Sebastiano_P_
Beginner
1,861 Views

This is a quick test that I did now:

 

PROGRAM main

IMPLICIT NONE

#ifdef PARALLEL
     WRITE(*,*) 'Hallo world'
#else
     WRITE(*,*) 'Ciao mondo'
#endif

STOP
END PROGRAM

Also in this case, the error is "Compilation Aborted (code 1)", thus I'm wondering whether the procedure in my first post is correct.

0 Kudos
Arjen_Markus
Honored Contributor II
1,861 Views

Hm, I suspect it is the definition of the macro. I tried it with PARALLEL - no /D, [...] or = and it was all fine.

0 Kudos
Sebastiano_P_
Beginner
1,861 Views

Can you please post a screenshot of your configuration setup?

Thanks,

0 Kudos
Sebastiano_P_
Beginner
1,861 Views

No problem. I solved by writing PARALLEL - no /D in Preprocessor Definitions.

Thank you for the help.

Sebastiano

0 Kudos
Arjen_Markus
Honored Contributor II
1,861 Views

Oops, I had already removed it. But instead of /D[=PARALLEL], my properties window showed PARALLEL.

If you have looked at the online help, then you will see something like your version, but that is simply alternative syntaxes:

/DPARALLEL defines a macro PARALLEL

/DPARALLEL=1 defines a macro with the precise value 1

The [...] is to indicate the enclosed part is optional.

0 Kudos
Steven_L_Intel1
Employee
1,861 Views

It sounds to me as if you're getting an internal compiler error. Are there no other error messages? Would you be able to provide us with the source that is failing (and that of any modules or include files it uses)? A ZIP of the project would be best for us.

0 Kudos
Sebastiano_P_
Beginner
1,861 Views

Dear Steve,

I solved by writing simply PARALLEL in Preprocessor Definitions.

Thank you,

Sebastiano

0 Kudos
Reply