- #1
- 3,971
- 329
Hi guys, I'm not really sure what these are called, so I just made a title to the best of my knowledge. I have some questions on some if-statements that I see in some code I'm working with. I will see if-statements like this:
I know that this tells the compiler that if multiple processors are being used, then use the code in between. What I don't know (and can't recall) is, how does the code know when mpi is defined or not? Where do you put in the information to tell the compiler this? It's not in the main line of code I'm reading. I also see a statement in my code:
I'm guessing this is a custom-made test...so...where can I tell if newerrtst is defined?
What are these if-statements even called?
Code:
#ifdef mpi
...
#endif
I know that this tells the compiler that if multiple processors are being used, then use the code in between. What I don't know (and can't recall) is, how does the code know when mpi is defined or not? Where do you put in the information to tell the compiler this? It's not in the main line of code I'm reading. I also see a statement in my code:
Code:
#ifdef newerrtst
...
#endif
I'm guessing this is a custom-made test...so...where can I tell if newerrtst is defined?
What are these if-statements even called?