compiling NBO6 for windows from linux

compiling NBO6 for windows from linux

Postby david » Fri Jun 19, 2015 6:23 pm

Dear Eric,
I have changed Make.config file to compile NBO6 for windows. I used following items:
FC = gfortran
FC_VERSION = 4.7
CC = gcc
INT = i8
OS = win
NBODIR = /root/nbo6
LAPACK = false
BLAS = false
STATIC = true
FTNCHEK = false
FLUSH = true
FAST = false

But I got following error:
------------------------------------------------------------
make -C src/utils NBOfpp
make[1]: Entering directory `/root/nbo6/src/utils'
gfortran -O3 -ffast-math -funroll-loops -std=legacy -fno-sign-zero -fdefault-integer-8 -c NBOfpp.F -o NBOfpp.obj
gfortran -static NBOfpp.obj -o NBOfpp.exe
make[1]: Leaving directory `/root/nbo6/src/utils'
make -C src/gennbo gennbo
make[1]: Entering directory `/root/nbo6/src/gennbo'
/root/nbo6/src/utils/NBOfpp.exe -Di8 -Dflush -Dwin < gennbo.F > gennbo.for
gfortran -c -O3 -ffast-math -funroll-loops -std=legacy -fno-sign-zero -fdefault-integer-8 gennbo.for -o gennbo.obj
make[1]: del: Command not found
make[1]: *** [gennbo.obj] Error 127
make[1]: Leaving directory `/root/nbo6/src/gennbo'
make: *** [gennbo] Error 2
[root@client2 nbo6]#
--------------------------------------------------------

Any idea?
david
 
Posts: 15
Joined: Mon Feb 02, 2015 10:04 pm

Re: compiling NBO6 for windows from linux

Postby ericg » Sun Jun 21, 2015 4:43 pm

The Make.config/Makefile that we distribute only allows NBO to be built for Windows in a DOS command shell using Portland Group's pgfortran. These files could likely be modified to build NBO6 for Windows in other ways, but it's not something that we've had time to explore.

Eric
ericg
 
Posts: 270
Joined: Sat Dec 29, 2012 9:31 am

Re: compiling NBO6 for windows from linux

Postby david » Mon Jun 22, 2015 5:35 am

thanks
So, I need to install portland fortran on windows. But, what are the next steps?
the cmd in windows doesn't accept "make" command.
david
 
Posts: 15
Joined: Mon Feb 02, 2015 10:04 pm

Re: compiling NBO6 for windows from linux

Postby ericg » Mon Jun 22, 2015 6:23 am

We use make from GnuWin32. It gives access to make from the DOS prompt.

Eric
ericg
 
Posts: 270
Joined: Sat Dec 29, 2012 9:31 am

Re: compiling NBO6 for windows from linux

Postby david » Thu Jun 25, 2015 10:09 pm

Dear Eric
Could you please provide some more information about it. What should I do exactly after installing gnu-win32 program. I extracted GetGnuWin32 program, it include some batch files. How can proceed to compile NBO6 source from "cmd" of windows 7?

Thanks
david
 
Posts: 15
Joined: Mon Feb 02, 2015 10:04 pm

Re: compiling NBO6 for windows from linux

Postby ericg » Mon Jun 29, 2015 9:35 am

Open a "PGI Cmd" window, then (in the \nbo6 folder) edit Make.config, setting variables appropriately for your environment, then type "make". Gnu make should proceed to build the Windows executables, which will be written to \nbo6\bin.

A batch script (gennbo.bat) like the following can be used to run the standalone GenNBO program:

Code: Select all
@echo off

REM Set job name to first argument of gennbo command:

set JOB=%1
set NBODTL=%2

REM Select integer word length:
REM i4 selects 32-bit integer code
REM i8 selects 64-bit integer code

set INT=i4

REM Locate top-level NBO directory:

REM set NBOTOP=c:\nbo6w
set NBOTOP=%cd%

REM Locate GenNBO and NBO6 executables:

set GENEXE=%NBOTOP%\bin\gennbo.%INT%.exe
set NBOEXE=%NBOTOP%\bin\nbo6.%INT%.exe

REM Set filename for external files:

set NBOFIL=%JOB%

REM Perform GenNBO calculation:
REM Input is taken from %JOB%.47
REM Output is directed to %JOB%.nbo

%GENEXE% %JOB%.47 > %JOB%.nbo


Eric
ericg
 
Posts: 270
Joined: Sat Dec 29, 2012 9:31 am

Re: compiling NBO6 for windows from linux

Postby david » Wed Jul 01, 2015 9:31 am

Dear Eric
I have installed PGI workstation 11.9 on windows 7 professional edition. It has cygwin, PGI cmd, PGI bash, ...
The "PGI cmd" doesn't recognize "make" command as internal or external command.
PGI bash can use make command, I set following parameters in make.config file:

FC=pgf77 (also tested other pgi fortran compilers such as pgfortran, pgf90, ...)
CC=pgcc
int=i4
OS=win

ther error is :
pgf77-Error-Unknown switch: -Munix

then I removed this option in make.config, but I got following error:

del: command not found

then I test cygwin as OS in make.config, but, in this case, it says that cannot find unistd.h include file. I have added the path of c:\cygwin\usr\include in the environment path of windows, but it cannot find the unistd.h file which exist in above address.
david
 
Posts: 15
Joined: Mon Feb 02, 2015 10:04 pm

Re: compiling NBO6 for windows from linux

Postby ericg » Wed Jul 01, 2015 2:49 pm

David,

I only build NBO in either the PGI cmd shell with GnuWin32 (the Windows build), or in a cygwin shell (the cygwin build). I suspect that NBO could also be built with the PGI bash shell, but I'm not familiar with this shell.

ther error is :
pgf77-Error-Unknown switch: -Munix


I've only built NBO for Windows using pgfortran 13.6. 11.9 may well require other compiler options that I can't help you with.

del: command not found


I suspect that PGI bash is a unix shell, not DOS; thus, the "del" command is not recognized.

then I test cygwin as OS in make.config, but, in this case, it says that cannot find unistd.h include file. I have added the path of c:\cygwin\usr\include in the environment path of windows, but it cannot find the unistd.h file which exist in above address.


I'd suggest the following: (1) get someone who is more familiar with Windows DOS shell to help with the GnuWin32 install so that "make" works with PGI cmd. You'll need to resolve the compiler options (-Munix) yourself then. (2) Alternatively, have someone who is more familiar with Unix, perhaps cygwin, help resolve the include file issue. Option (2) may be more straightforward than (1) because you won't have to deal with compiler options.

Eric
ericg
 
Posts: 270
Joined: Sat Dec 29, 2012 9:31 am

Re: compiling NBO6 for windows from linux

Postby david » Wed Jul 01, 2015 8:02 pm

Dear Eric,
Thanks for your replies and efforts.
Last edited by david on Thu Jul 02, 2015 12:58 am, edited 1 time in total.
david
 
Posts: 15
Joined: Mon Feb 02, 2015 10:04 pm

Re: compiling NBO6 for windows from linux

Postby david » Thu Jul 02, 2015 12:57 am

Dear Eric
Thanks for your efforts. I finally compile it. Now, it works.
Thankkkkkkkkksssssssssssssss
david
 
Posts: 15
Joined: Mon Feb 02, 2015 10:04 pm

Next

Return to NBO Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron