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

How to Set Active Target in XCode 4.5+
Preprocessor assertions in arduino
expanding a macro within a macro definition
GNU-M4: Strip empty lines
Escaping space in OpenCL compiler arguments
Does Corona have preprocessor statements so I can execute Lua code for specific devices?
Preprocessing in C++
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

Categories

HOME
azure-stream-analytics
cobalt
eslint
nunit
mjml
swt
apache-spark-mllib
obfuscation
pdfbox
tivoli
cq5
x264
spring-session
google-admin-sdk
frontend
computer-science
ibeacon-android
startup
redis-sentinel
x-cart
xcodebuild
filechannel
symmetricds
plink
azure-powershell
sse
nim
swagger-2.0
breadth-first-search
named-entity-recognition
exit
exploit
jquery-callback
delimiter
amazon-quicksight
ms-access-2003
vex
utorrent
erb
vue-chartjs
python-import
apiary.io
ods
railstutorial.org
metawidget
mongoose-schema
ogc
magento-1.9.3
movilizer
ssrs-2014
netbeans6.8
podscms
arq
opengl-4
sundials
er-diagram
mathcad
structuremap4
latin
burrows-wheeler-transform
mta
jodd
installshield-2010
freepbx
nservicebus5
blitline
tfs-workitem
avisynth
video-player
extjs-grid
.bash-profile
dronekit-android
botan
git-ftp
user-permissions
gamekit
cryptographichashfunction
addressing-mode
wcm
verold
terminate
fpdi
cascadingdropdown
bjyauthorize
android-sdk-2.3
intersect
curb
fragmenttransaction
thttpd
expression-blend-4
uipagecontrol
unattended-processing
openfaces
purepdf
fdf

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