Page 1 of 1

How to install on Cray machines

Posted: Thu Jan 17, 2013 6:19 pm
by pierrecarrier
Dear François Gygi,

I`m starting to work on Qbox here at Cray. Do you have any example of a file ./src/cray.mk that was used at NERSC (Hopper of Franklin), or any other XE or XT machine you have used in the past?

Thank you in advance,
Pierre Carrier

Re: How to install on Cray machines

Posted: Fri Jan 18, 2013 11:02 pm
by fgygi
The following makefile includes can be used to build Qbox 1.56.2 on hopper.nersc.gov (Cray XE6). They require the PrgEnv-intel and fftw modules to be loaded. The following file does not enable OpenMP threads and uses the sequential MKL library:

Code: Select all

#-------------------------------------------------------------------------------
#
#  hopper.nersc.gov
#
#-------------------------------------------------------------------------------
#
 PLT=x86_64
#-------------------------------------------------------------------------------
 XERCESCDIR=$(HOME)/software/xerces/xerces-c-src_2_8_0_intel
 PLTOBJECTS = readTSC.o

 CXX=CC -mkl=sequential
 LD=$(CXX)

 OPT= -O3 -vec-report1

 PLTFLAGS += $(OPT) -DIA32 -DUSE_FFTW -D_LARGEFILE_SOURCE \
             -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DSCALAPACK -DADD_ \
             -DAPP_NO_THREADS -DXML_USE_NO_THREADS -DUSE_XERCES \
             -DMPICH_IGNORE_CXX_SEEK -DPARALLEL_FS -DUSE_DFFTW

 INCLUDE = -I$(XERCESCDIR)/include

 CXXFLAGS= -D$(PLT) $(INCLUDE) $(PLTFLAGS) $(DFLAGS)

 LIBPATH = -L$(XERCESCDIR)/lib

 LIBS =  -lfftw -lxerces-c

 LDFLAGS = $(LIBPATH) $(LIBS)
The following makefile include enables OpenMP threads and uses the threaded MKL library:

Code: Select all

#-------------------------------------------------------------------------------
#
#  hopper.nersc.gov
#
#-------------------------------------------------------------------------------
#
 PLT=x86_64
#-------------------------------------------------------------------------------
 XERCESCDIR=$(HOME)/software/xerces/xerces-c-src_2_8_0_intel
 PLTOBJECTS = readTSC.o

 CXX=CC -mkl=parallel
 LD=$(CXX)

 OPT= -O3 -openmp -vec-report1 -openmp-report1

 PLTFLAGS += $(OPT) -DIA32 -DUSE_FFTW -D_LARGEFILE_SOURCE \
             -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DSCALAPACK -DADD_ \
             -DAPP_NO_THREADS -DXML_USE_NO_THREADS -DUSE_XERCES \
             -DMPICH_IGNORE_CXX_SEEK -DPARALLEL_FS -DUSE_DFFTW

 INCLUDE = -I$(XERCESCDIR)/include

 CXXFLAGS= -D$(PLT) $(INCLUDE) $(PLTFLAGS) $(DFLAGS)

 LIBPATH = -L$(XERCESCDIR)/lib

 LIBS =  -lfftw -lxerces-c

 LDFLAGS = $(LIBPATH) $(LIBS)
The difference between the two files is

Code: Select all

12c12
<  CXX=CC -mkl=sequential
---
>  CXX=CC -mkl=parallel
15c15
<  OPT= -O3 -vec-report1
---
>  OPT= -O3 -openmp -vec-report1 -openmp-report1
To build the Xerces-C 2.8.0 library on hopper, the following arguments can be used with the runConfigure command:

Code: Select all

./runConfigure -p linux -c cc -x CC -r none -n fileonly -s