Re: [AMBER] Question about running AMBER on a mac

From: Jason Swails <jason.swails.gmail.com>
Date: Tue, 4 May 2010 09:29:06 -0400

Hello,

You do not need another intel compiler to compile amber. The configure
script is written to take the GNU or INTEL options (for the first, it'll try
to use gcc and gfortran, for the second it'll try to use icc and ifort). If
you want to use the gcc/ifort combo, you'll have to hack the configure
script to set icc to gcc (and you'll have to change the corresponding
CFLAGS/OCFLAGS (flags for the c-compiler and optimized flags for the
c-compiler, respectively). Before I get into that, though, is there a
reason you didn't install icc/icpc? As far as I know, the Mac download that
you purchase comes with ifort, icc, icpc, and the intel MKL . It would be
easiest if you could get your hands on icc/icpc and just use ./configure
intel. If you can't, follow the instructions below:

      cc=icc
      cplusplus=icpc

locate those lines in configure. Change them to

      cc=gcc
      cplusplus=g++

And everywhere within the intel) case block, remove intel-specific cflags
and ocflags (-O3/2/1/0 are not specific. If you're not sure whether a flag
is specific or not, remove it). If you fail to remove a flag, the configure
script will most likely fail with some comment like "Don't recognize -ip" or
something. Just locate where that flag is being set and remove it.

Once you get no complaints from configure, the software should build just
fine.

Good luck!
Jason

On Tue, May 4, 2010 at 9:18 AM, Emily Curtis <emilymariecurtis.gmail.com>wrote:

> Hi. I am trying to install ambertools on a mac. I installed MacPorts and
> I
> have the intel version of the ifort compiler to compile fortran. Do I
> still
> need to install gfortran?
>
> *When I try to run "./compile gnu" I get the following error messages:*
>
> Emily-Curtis-MacBook-Pro:src emily$ ./configure gnu
> Your AMBERHOME environment variable should be set to
> /Users/emily/amber11/amber11
>
>
> Obtaining the gnu suite version:
> gcc -v
> The version is 4.2.1
>
> Testing the gcc compiler:
> gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o testp testp.c
> OK
>
> Validating the C++ compiler version:
> g++ -v
> The version is 4.2.1
> OK
>
> Testing the gfortran compiler:
> gfortran -O0 -o testp testp.f
> ./configure: line 1019: gfortran: command not found
> ./configure: line 1020: ./testp: No such file or directory
> Unable to compile a Fortran program using gfortran -O0
> We will be unable to compile sqm
>
> Testing mixed C/Fortran compilation:
> gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -c -o testp.c.o testp.c
> gfortran -O0 -c -o testp.f.o testp.f
> ./configure: line 1054: gfortran: command not found
> gcc -o testp testp.c.o testp.f.o -lgfortran
> i686-apple-darwin10-gcc-4.2.1: testp.f.o: No such file or directory
> ./configure: line 1057: ./testp: No such file or directory
> WARNING: Unable to compile mixed C/Fortran code.
>
> Testing pointer size:
> gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o test_pointer_size
> test_pointer_size.c
> Detected 64 bit operating system.
>
> Testing flex:
> OK
>
> Configuring NetCDF; (may be time-consuming)
>
> Error: NetCDF configure returned 1
> NetCDF configure failed! Check the netcdf_config.log file.
> Continuing but NetCDF will be skipped.
>
> Configuring fftw-2.1.5; (may be time-consuming)
>
> Error: fftw configure returned 1
> fftw configure failed! Check the fftw2_config.log file.
>
>
>
>
>
> *If I try to run using "./configure intel" I get the following error
> messages:*
>
> Emily-Curtis-MacBook-Pro:src emily$ ./configure intel
> Your AMBERHOME environment variable should be set to
> /Users/emily/amber11/amber11
>
> ./configure: line 571: [: : integer expression expected
> ./configure: line 600: [: : integer expression expected
>
> Testing the icc compiler:
> icc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o testp testp.c
> ./configure: line 966: icc: command not found
> ./configure: line 967: ./testp: No such file or directory
> Error: Unable to compile a C program using icc -D_FILE_OFFSET_BITS=64
> -D_LARGEFILE_SOURCE
> Please check your compiler settings or configure flags.
> Emily-Curtis-MacBook-Pro:src emily$
>
>
>
>
>
>
> Thank you for any help.
>
> Emily
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>



-- 
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Graduate Student
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue May 04 2010 - 06:30:06 PDT
Custom Search