problem compiling instanton.F

Vasp transition state theory tools

Moderator: moderators

Post Reply
dfcox
Posts: 11
Joined: Sat Aug 02, 2008 7:50 pm

problem compiling instanton.F

Post 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.
dfcox
Posts: 11
Joined: Sat Aug 02, 2008 7:50 pm

Re: problem compiling instanton.F

Post 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)
barryhyc
Posts: 12
Joined: Mon Jan 12, 2009 7:41 am

Re: problem compiling instanton.F

Post 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
barryhyc
Posts: 12
Joined: Mon Jan 12, 2009 7:41 am

Re: problem compiling instanton.F

Post by barryhyc »

nobody can help me?
graeme
Site Admin
Posts: 2260
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: problem compiling instanton.F

Post by graeme »

Can you try removing the space before the #endif on line 1178?
dfcox
Posts: 11
Joined: Sat Aug 02, 2008 7:50 pm

Re: problem compiling instanton.F

Post 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.
Post Reply