Page 1 of 1

problem compiling instanton.F

Posted: Wed Feb 29, 2012 1:10 pm
by dfcox
I am trying to add the VTSTtools to VASP 5.2.12.
I run into a problem doing the compilation. I get the error:

instanton.F(1181): #error: #if at line 448 has no matching #endif.
make: *** [instanton.o] Error 1

FYI - We are running CentOS 5.5. The fortran compiler is ifort version 11.1
(build version 20100806), MKL version 10.2.7.041, OpenMPI 1.4.2 with the same intel compilers.

Is there a simple fix? Apologies if I didn't find an appropriate thread addressing this problem.

Re: problem compiling instanton.F

Posted: Fri Mar 02, 2012 7:42 pm
by dfcox
I got some help from my computing center. They tell me the VASP code is "Intel fpp clean", but the vtst code is not. For a work around, they suggested using GNU cpp to do the preprocessing for several of the vtst files. The addition of the following rules to the makefile fixed my compiling problems:

chain.o : chain.F
./preprocess <$*.F | /usr/bin/cpp -P -C -traditional -DMPI -DHOST=\"LinuxIFC\" -DIFC \
-DCACHE_SIZE=4000 -DPGF90 -Davoidalloc -DNGZhalf \
-DMPI_BLOCK=8000 >$*$(SUFFIX)
$(FC) $(FFLAGS) $(OFLAG) $(INCS) -c $*$(SUFFIX)

dimer.o : dimer.F
./preprocess <$*.F | /usr/bin/cpp -P -C -traditional -DMPI -DHOST=\"LinuxIFC\" -DIFC \
-DCACHE_SIZE=4000 -DPGF90 -Davoidalloc -DNGZhalf \
-DMPI_BLOCK=8000 >$*$(SUFFIX)
$(FC) $(FFLAGS) $(OFLAG) $(INCS) -c $*$(SUFFIX)

instanton.o: instanton.F
./preprocess <$*.F | /usr/bin/cpp -P -C -traditional -DMPI -DHOST=\"LinuxIFC\" -DIFC \
-DCACHE_SIZE=4000 -DPGF90 -Davoidalloc -DNGZhalf \
-DMPI_BLOCK=8000 >$*$(SUFFIX)
$(FC) $(FFLAGS) $(OFLAG) $(INCS) -c $*$(SUFFIX)

Re: problem compiling instanton.F

Posted: Sun Apr 01, 2012 2:19 pm
by barryhyc
I met the same question today. I adopted your suggestion, add "./preprocess etc" at the end of the makefile. But the error still exists(instanton.F(1181): #error: #if at line 448 has no matching #endif.). Would you give me some advice and paste your makefile for reference? Thank you

Re: problem compiling instanton.F

Posted: Sat Apr 07, 2012 12:04 pm
by barryhyc
nobody can help me?

Re: problem compiling instanton.F

Posted: Tue Apr 10, 2012 4:06 pm
by graeme
Can you try removing the space before the #endif on line 1178?

Re: problem compiling instanton.F

Posted: Mon May 07, 2012 2:25 pm
by dfcox
barryhyc - apologies, I just saw your post.

FYI - I had this same problem trying to compile on a new machine with an intel compiler. I tried Graeme's suggestion - removing the space before the #endif on line 1178 - and it compiled fine.

Thanks Graeme.