CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   C Compiler for CFD Programmes (https://www.cfd-online.com/Forums/main/131135-c-compiler-cfd-programmes.html)

avsksan March 10, 2014 04:27

C Compiler for CFD Programmes
 
Dear all,
I am using code blocks for smaller level c programs to solve CFD problems. but its time to move on. The problem with Code Blocks is that it can't handle large matrix(its not using more than 200MB of RAM in my system, Even though i have 4GB of RAM). Is there any other Compliers, software or options that uses maximum RAM memory to run such programs. Please help me out of this.
Thank you.

andy_ March 10, 2014 05:33

Quote:

Originally Posted by avsksan (Post 479084)
Dear all,
I am using code blocks for smaller level c programs to solve CFD problems. but its time to move on. The problem with Code Blocks is that it can't handle large matrix(its not using more than 200MB of RAM in my system, Even though i have 4GB of RAM). Is there any other Compliers, software or options that uses maximum RAM memory to run such programs. Please help me out of this.
Thank you.

Code Blocks is not a compiler it is an Integrated Development Environment (IDE). The C compiler is a separate program which the IDE will call when you click on the button to compile. Which compiler are you using?

If a C program cannot allocate enough memory it will either write out an error message and stop or it will crash. Which is your program doing?

avsksan March 11, 2014 03:18

I am using default compiler in Windows 8. It detected as gcc compiler. Which compiler should I use?

By the way it crashes(i.e., Programm stops working). What should i do? Please advice.

andy_ March 11, 2014 05:05

Quote:

Originally Posted by avsksan (Post 479267)
I am using default compiler in Windows 8. It detected as gcc compiler. Which compiler should I use?

By the way it crashes(i.e., Programm stops working). What should i do? Please advice.

Is the generated code 32 bit or 64 bit? Even if you are on a 64 bit computer it is common to generate 32 bit code.

The maximum address for 32 bits is 4GB but I think on Windows you would need to knock off memory for the graphics card and a few other bits and bobs. I would suggest allocating 1GB and seeing if that works then 2GB and seeing if that works, etc...

gcc is not the native Windows C compiler but it is unlikely to be the cause of restrictions on allocated memory.

You are allocating memory on the heap with malloc? You are checking the returned pointer? If there is insufficient memory the pointer should be null.

shirazbj March 11, 2014 22:23

Quote:

Originally Posted by avsksan (Post 479267)
I am using default compiler in Windows 8. It detected as gcc compiler. Which compiler should I use?

By the way it crashes(i.e., Programm stops working). What should i do? Please advice.

You might installed the gcc while you install code block.

You can use that gcc inside a DOS terminal without using the code block.


All times are GMT -4. The time now is 09:35.