- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am having some issues with setting the size of the stack when compiling a fortran code via command line.
When I use Visual Studio with ifort, I know that I can go to: Properties → Linker → System and then change the Stack Commit/Reserve size.
Now if I open Intel oneAPI command prompt for Intel 64 for Visual Studio 2019, I am usually able to compile my codes by doing:
ifort -O2 -c -Qopenmp module_master.f90
ifort -O2 -c -Qopenmp main_program.f90
ifort -o main.out -O2 -Qopenmp main_program.f90 module_master.f90
When I run the file I get a stackoverflow error. I tried doing:
ifort -O2 -c -Qopenmp module_master.f90
ifort -O2 -c -Qopenmp main_program.f90
ifort -o main.out -O2 -Qopenmp main_program.f90 module_master.f90 -stack:999999999
But the compiler just ignored the stack flag. Anyone knows how can I compile this via command line?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Before the -stack:xxxx option add -link .
Are you aware that you are compiling the Fortran source files twice with the commands that you showed? This is almost harmless, but wasteful. After separately compiling the Fortran source files, you could have used
ifort -o main.out -O2 -Qopenmp main_program.obj module_master.obj -link -stack:999999900
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Before the -stack:xxxx option add -link .
Are you aware that you are compiling the Fortran source files twice with the commands that you showed? This is almost harmless, but wasteful. After separately compiling the Fortran source files, you could have used
ifort -o main.out -O2 -Qopenmp main_program.obj module_master.obj -link -stack:999999900
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page