I am actually working on a scientific project in Fortran and the set of employed functions are divided into the 64bit and 32bit version. In addition, some variables are defined with different properties for a same function in two different architectures. For example, in 32bit a variable is INTEGER*4 while in 64 bit it is INTEGER*8.
Now, I saw that in C++ it is possible to check this using #ifndef at the beginning of the file, like it was explained in this post. Is there something available in Fortran? Which possible solutions would you suggest me?
Keep in mind that the project should run on Windows and Linux, with a large variety of architecture. But still any suggestion would be appreciated!
Edit: to reply to some comments, imagine you want to employ PARDISO solver, part of the MKL libraries. There are two subroutines that we can call: pardiso and pardiso_64. Pardiso requires a variable, called PT in the manual (page 6, here), that allows pardiso to work with data. In the 32 bit version, it is a INTEGER*4, while in the 64 bit one is INTEGER*8. Basically, i do not want to allocate memory for the two and then select the right variable with a IF statement.
I immagine now that preprocessing would do the job, but has it to be a C preprocessor even if I am working in Fortran? For example, would Intel Fortran call the C preprocessor as gcc/gfortran does?