- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trying to compile one of the open source projects related with FEM(Elmer). I'm facing with very annoying hurdle. The project is comprised from many packages some of them individual some of them are well known e.g. LAPACK etc.. and everything is bundled intocorresponding folderwhere some kind of Linux-like script is need to be run to compile all of them (plenty of makefile, config. etc..).
Thereare a Fortranfiles which solves the equations in "fem" named subfolder, what I want to achieve is to compile just only these Fortran codes. Since I couldn't locate any file starting with program prefixI couldn't even guess what it's suposed to create after compilation (exe. lib. dll etc..).
I tried my chance, but it seems that Fortran compiler doesn't detect the conditional compilation. The form is like thatand there are many of conditional statements. Those ARCH_32_BITS is defined in config.h files.
and Fortran compiler complains with taht "Error 7 error #6418: This name has already been assigned a data type."#ifdef (ARCH_32_BITS)
INTEGER, PARAMETER :: AddrInt = SELECTED_INT_KIND(9)
#else
INTEGER, PARAMETER :: AddrInt = SELECTED_INT_KIND(18)
#endif
Regards,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But exactly where to set that ?
Project->Fortran->Preprocessor =Processor DEfinition to FFP only
Tried that w/o succes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set Project:Fortran:Preprocessor:Preprocess_Source_File to Yes (/fpp), and
Set Project:Fortran:Preprocessor:Preprocessor_Definitions to whatever you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Running fpp to Preprocess Files
You can explicitly run fpp in these ways:
-
On the ifort command line, use the ifort command with the -fpp (Linux OS and Mac OS X) or /fpp (Windows OS) option. By default, the specified files are then compiled and linked. To retain the intermediate (.i or .i90) file, specify the -save-temps (Linux OS and Mac OS X) or /Qsave-temps (Windows OS) option.
-
On the command line, use the fpp command. In this case, the compiler is not invoked. When using the fpp command line, you need to specify the input file and the intermediate (.i or .i90) output file. For more information, type fpp -help (Linux OS and Mac OS X) or fpp /help (Windows OS) on the command line.
-
In the Microsoft Visual Studio* IDE, set the Preprocess Source File option to Yes in the Fortran Preprocessor Option Category. To retain the intermediate files, add /Qsave-temps to Additional Options in the Fortran Command Line Category.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
USE, INTRINSIC :: ISO_C_BINDING, ONLY: AddrInt => C_INTPTR_T
There is also an Intel extension, compatible with CVF:
INTEGER, PARAMETER :: AddrInt = INT_PTR_KIND()
For pre-F2003 compilers but with Cray pointers there is:
LOGICAL :: DONT_USE_ME
POINTER(DONT_USE_ME_EITHER,DONT_USE_ME)
INTEGER, PARAMETER :: AddrInt = KIND(DONT_USE_ME_EITHER)

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page