Yes, you can change it manually and it should work. But this means that you will need to make sure that you always check it when you switch to a new machine. This will inevetibly cause trouble when you switch to a different HPC, or more likely, when the code gets passed on to someone else and they have the same problem again.

All cgsize_t does is check which cgns library is installed and choose the appropriate integer size, which allows you to compile it hassle free on any machine.

You must make sure that the first of the two lines is indenteded and the second isn't at all. The first must not be #'d and the second must. I'm not sure why, but I think that this exactly the formatting it must be. I can't say why though!

E.G exact formatting below.

IMPLICIT NONE
include 'cgnslib_f.h'

#include "cgnstypes_f.h"

Now, as for compiler options it shouldn't matter, I have debug flags and that works or just compiling with -O3 -r8 -i4 -fpp should work too.