My computer (intel core i7 CPU, 20 GB RAM, 2TB HDD) is running Windows 8 and I usually boot up the Linux VM to do my programming, but I am currently trying to run a Fortran program natively in Windows 8 using Cygwin. I am writing a program which has large memory requirements and I am creating a double precision array of size 13943 x Nfiles
where I let Nfiles vary and I am trying to make it as large as possible while still remaining under 20 GB of RAM.
I notice that when I get to around Nfiles = 17000
it uses about 1.77 GB of RAM. However, when I raise Nfiles
to 20000, I get a compilation error of
gfortran -ffixed-line-length-132 -fimplicit-none -O2 -o smear_sfs.exe xdriver.F90 modules.o
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/crtbegin.o:cygming-crtbegin.c:(.text+0x2b): relocation truncated to fit: R_X86_64_PC32 against symbol `__imp_GetModuleHandleA' defined in .idata$5 section in /usr/lib/w32api/libkernel32.a(dysgbs00548.o)
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/crtbegin.o:cygming-crtbegin.c:(.text+0x47): relocation truncated to fit: R_X86_64_PC32 against symbol `__imp_GetProcAddress' defined in .idata$5 section in /usr/lib/w32api/libkernel32.a(dysgbs00598.o)
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/crtbegin.o: bad reloc address 0x0 in section `.pdata'
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: final link failed: Invalid operation
collect2: error: ld returned 1 exit status
Makefile:30: recipe for target `smear_sfs' failed
make: *** [smear_sfs] Error 1
But after searching online I cannot figure out what the problem is. gfortran -v
reveals the following information
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.1-3/src/gcc-4.8.1/configure --srcdir=/cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.1-3/src/gcc-4.8.1 --prefix=/usr --exec- prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib
Thread model: posix
gcc version 4.8.1 (GCC)
so it seems like I am correctly using a 64-bit compiler on a 64-bit OS.
Any ideas?