preprocessor


Fortran preprocessing with Portland compiler


I am trying to pre-process a Fortran module (pmu.F90) with pgf90. The module is as follows:
module pmu
module variables
contains
include 'file.F90'
end module
file.F90 is a subroutine which contains the following lines:
#ifdef PART
startm1 = xstart - 1
startm2 = xstart - 2
endp1 = xend + 1
endp2 = xend + 2
#else
startm1 = xstart - 1
startm2 = xstart - 1
endp1 = xend + 1
endp2 = xend + 1
#endif
If I compile with:
pgf90 -DPART -Mfree -Mbounds -Msave -Mdclchk -r8 -Mpreprocess -I/data/users/mrosso/fftw3/include -c pmu.F90
I get
PGF90-S-0021-Label field of continuation line is not blank.
Well, the included file contains no procedures, which is what you need between the "contains" and "end module" statements in the module pmu file.
Another issue with using CPP with Fortran is that the Fortran include statement is not the same as the CPP #include. In particular, their interaction is not specified. That is, if you're including a file which itself contains CPP directives, it's one less thing that can go wrong if you use #include instead.

Related Links

Truncate string in cpp (preprocessor)
C++ precompiler conditionally include code
DDK preprocessor directives
Preprocessor, Postprocessor, Geometric Processor and NC processor
Gfortran pre-processor directives for Different Operating systems
Good data set for Pre-processing
IDE inserts incorrect #include statement
Save string in C preprocessor
Fortran preprocessing with Portland compiler
Making a macro expansion dependent on its arguments
How to set ISPP defines based on default Inno Setup variables?
standalone C++ preprocessor
Annotations in OCaml
Obtaining the include paths cpp searches
Test for empty macro definition
m4 does not obey expansion?

Categories

HOME
go
facebook-oauth
delphi-7
c99
fpga
formal-languages
package
solver
cakephp-3.4
big-o
telegram-bot
pyqt4
babeljs
nstableheaderview
lanczos
okhttp
little-proxy
pcl-crypto
endeca
pega
tput
speech-synthesis
docx
mongodb-csharp
intershop
jersey-1.0
enterprise-miner
asp.net-core-webapi
sar
pylons
entity-relationship-model
tizen-tv
twiml
calculation
livelink
database-comparison
biztalk-rule-engine
searchkit
password-protection
stringtokenizer
android-ibeacon
glm-math
print-css
apollostack
vaadin-charts
flask-restful
libgphoto2
sonarlint-eclipse
carrot2
context-switch
custom-font
static-cast
android-testing
pdf-conversion
gpg-signature
flac
template-toolkit
cmp
filenet
reachability
seek
watch-os-2
jodd
i386
delta
r-package
aspectj-maven-plugin
kubuntu
mmwormhole
nodelist
cocos3d
entry-point
template-deduction
memset
ios8-extension
dot42
file-not-found
hibernate-entitymanager
light
kendo-dataviz
font-awesome-4.0.0
pdfviewer
xcode3.2
cakephp-1.2
saleslogix
multiplexing
predicatebuilder
winmain
cloudfiles
diagrams
metaweblog
squishit
timertask
load-time
zend-rest
tabpanel
request-headers
echo3
tui
perl5.12
appliance
wspbuilder
great-circle
pnrp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App