./configure --prefix=/apps/common/antlr/2.7.7

make

make install


[오류 내용]

In file included from /apps/wa/build/common/antlr-2.7.7/lib/cpp/src/../../../lib/cpp/src/CharScanner.cpp:10:0:

/apps/wa/build/common/antlr-2.7.7/scripts/../lib/cpp/antlr/CharScanner.hpp:474:30: error: ‘EOF’ was not declared in this scope

  static const int EOF_CHAR = EOF;

                              ^

/apps/wa/build/common/antlr-2.7.7/scripts/../lib/cpp/antlr/CharScanner.hpp: In member function ‘bool antlr::CharScannerLiteralsLess::operator()(const string&, const string&) const’:

/apps/wa/build/common/antlr-2.7.7/scripts/../lib/cpp/antlr/CharScanner.hpp:565:41: error: ‘strcasecmp’ was not declared in this scope

   return (strcasecmp(x.c_str(),y.c_str())<0);

                                         ^


xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

                      >> E R R O R <<

============================================================


g++ -O2 -DNDEBUG -felide-constructors -pipe -c  -I . -I /apps/wa/build/common/antlr-2.7.7/scripts/../lib/cpp /apps/wa/build/common/antlr-2.7.7/lib/cpp/src/../../../lib/cpp/src/CharScanner.cpp

 

vi lib/cpp/antlr/CharScanner.hpp

[변경 전]

#include <antlr/config.hpp>


[변경 후]

#include <fstream>

#include <strings.h>  

#include <antlr/config.hpp>

#ifndef EOF

    #define EOF     std::ifstream::traits_type::eof()

#endif

Posted by 천연사이다


RedHat 5.3 OS 에 GCC 6.1 설치 과정 기록


1. binutils-2.30 install

./configure --prefix=/home01/sunlsy/tachyon2

make

make install


export PATH=/home01/sunlsy/tachyon2/bin:$PATH

export LD_LIBRARY_PATH=/home01/sunlsy/tachyon2/lib:$LD_LIBRARY_PATH


2. gmp-6.1.0

./configure --prefix=/home01/sunlsy/tachyon2

make

make install


3. mpfr-3.1.6

./configure --prefix=/home01/sunlsy/tachyon2 --with-gmp-include=/home01/sunlsy/tachyon2/include --with-gmp-lib=/home01/sunlsy/tachyon2/lib

make

make install


4. mpc-1.0.3

./configure --prefix=/home01/sunlsy/tachyon2 --with-mpfr=/home01/sunlsy/tachyon2 --with-gmp=/home01/sunlsy/tachyon2

make

make install


export PATH=/applic/common/utils/bin:$PATH


5. gcc-6.1.0

./configure --prefix=/home01/sunlsy/tachyon2  \

--enable-shared --enable-threads=posix \

--enable-clocale=gnu --enable-languages=c,c++,fortran,lto \

--with-mpc=/home01/sunlsy/tachyon2 --with-mpfr=/home01/sunlsy/tachyon2 \

--with-gmp=/home01/sunlsy/tachyon2

make

make install 



Posted by 천연사이다


[오류 내용]

error: more than one instance of overloaded function "MPI::Init_thread" has "C" linkage


[해결 방법]

"-DMPICH_SKIP_MPICXX" 를 포함 시켜서 컴파일

'나의일 관련 > Linux' 카테고리의 다른 글

antlr-2.7.7 설치 기록  (0) 2019.01.08
gcc-6.1.0 설치 기록  (0) 2018.07.19
오류내용 : undefined reference to `tgetstr'  (0) 2018.02.01
OpenFOAM 4.1 설치 기록  (0) 2018.02.01
OpenFOAM 3.0.0 설치 기록  (0) 2017.11.13
Posted by 천연사이다

[오류 내용]

/usr/lib/../lib64/libreadline.so: undefined reference to `tgetstr'

/usr/lib/../lib64/libreadline.so: undefined reference to `tputs'

/usr/lib/../lib64/libreadline.so: undefined reference to `BC'

/usr/lib/../lib64/libreadline.so: undefined reference to `tgetent'

/usr/lib/../lib64/libreadline.so: undefined reference to `tgetflag'

/usr/lib/../lib64/libreadline.so: undefined reference to `tgoto'

/usr/lib/../lib64/libreadline.so: undefined reference to `UP'

/usr/lib/../lib64/libreadline.so: undefined reference to `tgetnum'

/usr/lib/../lib64/libreadline.so: undefined reference to `PC'


[해결 방법]

컴파일 시 "-lreadline" 를 "-lreadline -lcurses" 로 변경해서 사용

'나의일 관련 > Linux' 카테고리의 다른 글

gcc-6.1.0 설치 기록  (0) 2018.07.19
mpich 또는 mvapich2 사용 시 오류  (0) 2018.02.01
OpenFOAM 4.1 설치 기록  (0) 2018.02.01
OpenFOAM 3.0.0 설치 기록  (0) 2017.11.13
CUDA SDK 8.0 관련 이슈 기록  (0) 2017.10.31
Posted by 천연사이다

OpenFOAM 4.1 source 버전으로 설치 하는 방법에 대하여 소개 한다.


1. 설치 환경

 구분

내용 

 OS

RHEL 5.3 

 기타

intel-2015 컴파일러 사용

mvapich2-2.1 MPI 사용

python-2.7.12 사용.


2. 환경 설정 방법

[ 환경 설정 ]

$ export PATH=/applic/compilers/gcc/4.9.3/bin:/applic/common/utils/bin:PATH

$ export LD_LIBRARY_PATH=/applic/compilers/gcc/4.9.3/lib64:$LD_LIBRARY_PATH

$ module load compiler/intel-2015 mpi/mvapich2-2.1 applic/python-2.7.12

$ export PATH=$PATH:/applic/wa/QT/4.7.3/bin

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/applic/wa/QT/4.7.3/lib


3. 설치

 설치 과정 소개는 tar 를 이용한 압축 해제 방법과 설정 방법등 진행 절차를 위주로 설명하고, 소스 파일 다운로드 등은 생략한다. 

  설치과정

$ mkdir OpenFOAM

$ cd OpenFOAM


$ sed -i -e 's/\(boost_version=\)boost-system/\1boost_1_55_0/' OpenFOAM-4.1/etc/config.sh/CGAL

$ sed -i -e 's/\(cgal_version=\)cgal-system/\1CGAL-4.8/' OpenFOAM-4.1/etc/config.sh/CGAL


$ vi OpenFOAM-4.1/etc/bashrc

- - - (1) 수정 사항 참고 - - -

$ export MPI_ROOT=/applic/compilers/intel/2015/mpi/mvapich2/2.1

$ export MPI_ARCH_FLAGS="-DMPICH_SKIP_MPICXX"

$ export MPI_ARCH_INC="-isystem $MPI_ROOT/include"

$ export MPI_ARCH_LIBS="-L$MPI_ROOT/lib -lmpi"


$ vi OpenFOAM-4.1/applications/utilities/mesh/manipulation/setSet/Allwmake

- - - (2) 수정 사항 참고 - - -


$ vi OpenFOAM-4.1/etc/config.sh/settings 

- - - (3) 수정 사항 참고 - - -


$ cd $WM_THIRD_PARTY_DIR

$ tar xvjf gmp-6.1.0.tar.bz2 

$ cd gmp-6.1.0

$ ./configure --prefix=$WM_THIRD_PARTY_DIR/platforms/${WM_ARCH}${WM_COMPILER}/gmp-6.1.0 \

--enable-cxx CC=icc CXX=icpc CFLAGS="-O3 -fPIC" CXXFLAGS="-O3 -fPIC" 

$ make

$ make install

$ cd ..

$ tar xvzf mpfr-3.1.3.tar.gz

$ cd mpfr-3.1.3

$ ./configure --prefix=$WM_THIRD_PARTY_DIR/platforms/${WM_ARCH}${WM_COMPILER}/mpfr-3.1.3 \

CC=icc CXX=icpc CFLAGS="-O3 -fPIC" CXXFLAGS="-O3 -fPIC" --disable-thread-safe \

--with-gmp=$WM_THIRD_PARTY_DIR/platforms/${WM_ARCH}${WM_COMPILER}/gmp-6.1.0 

$ make

$ make install

$ cd ..

$ tar xvzf boost_1_55_0.tar.gz

$ cd boost_1_55_0

$ ./bootstrap.sh --prefix=$WM_THIRD_PARTY_DIR/platforms/${WM_ARCH}${WM_COMPILER}/boost_1_55_0

$ ./b2 install --prefix=$WM_THIRD_PARTY_DIR/platforms/${WM_ARCH}${WM_COMPILER}/boost_1_55_0

$ cd ..

$ ./makeCGAL gmp-6.1.0 mpfr-3.1.3 >& log.makeCFAL 

$ wmRefresh

$ cd $WM_PROJECT_DIR

$ ./Allwmake -j 4 >& log.make 


(1) OpenFOAM-4.1/etc/bashrc 파일 수정
 예제 설치 경로는 "/scratch2/sunlsy/install_test/tachyon2" 이다.
 설치 환경에 맞게 수정
[변경 전]

[ $BASH_SOURCE ] && \

export FOAM_INST_DIR=$(cd ${BASH_SOURCE%/*/*/*} && pwd -P) || \

export FOAM_INST_DIR=$HOME/$WM_PROJECT

export WM_COMPILER=Gcc

export WM_MPLIB=SYSTEMOPENMPI

[변경 후]

export FOAM_INST_DIR=/scratch2/sunlsy/install_test/tachyon2/$WM_PROJECT

export WM_COMPILER=Icc

export WM_MPLIB=SYSTEMMPI


(2) OpenFOAM-4.1/applications/utilities/mesh/manipulation/setSet/Allwmake 파일 수정

[변경 전]

export LINK_FLAGS="-lreadline"

[변경 후]

export LINK_FLAGS="-lreadline -lcurses"


(3) OpenFOAM-4.1/etc/config.sh/settings 파일 수정

[변경 전]

64)

WM_ARCH=linux64

    export WM_COMPILER_LIB_ARCH=64

    export WM_CC='gcc'

    export WM_CXX='g++'

    export WM_CFLAGS='-m64 -fPIC'

    export WM_CXXFLAGS='-m64 -fPIC -std=c++0x'

    export WM_LDFLAGS='-m64'

[변경 후]

64)

    WM_ARCH=linux64

    export WM_COMPILER_LIB_ARCH=64

    export WM_CC='icc'

    export WM_CXX='icpc'

    export WM_CFLAGS='-O3 -m64 -fPIC'

    export WM_CXXFLAGS='-O3 -m64 -fPIC -std=c++0x'

    export WM_LDFLAGS='-m64'


4. 동작 확인

mkdir -p $FOAM_RUN 

$ run 

$ cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily ./ 

$ cd pitzDaily 

$ blockMesh 

$ simpleFoam 






Posted by 천연사이다

OpenFOAM 3.0.0 source 버전으로 설치 하는 방법에 대하여 소개 한다.


1. 설치 환경

 구분

내용 

 OS

RHEL 5.3 

 기타

intel-2015 컴파일러 사용

openmpi-2.1.1 MPI 사용

python-2.7.12 사용.


2. 환경 설정 방법

[ 환경 설정 ]

 module load compiler/intel-2015 mpi/openmpi-2.1.1 applic/python-2.7.12


3. 설치

 설치 과정 소개는 tar 를 이용한 압축 해제 방법과 설정 방법등 진행 절차를 위주로 설명하고, 소스 파일 다운로드 등은 생략한다. 
- 참고 : https://proteusmaster.urcf.drexel.edu/urcfwiki/index.php/Compiling_OpenFOAM 

  설치과정

$ mkdir OpenFOAM

$ cd OpenFOAM

$ tar xvf OpenFOAM-3.0.0.tgz 

$ tar xvf ThirdParty-3.0.0.tgz

$ export WM_CC=icc

$ export WM_CXX=icpc

$ export WM_CFLAGS="-m64 -fPIC -O3 -fopenmp"

$ export WM_CFLAGS="-m64 -fPIC -O3 -fopenmp"

$ export WM_COMPILER_ARCH=IccDPInt32Opt

$ export WM_NCOMPPROCS=8

$ cd OpenFOAM-3.0.0

$ vi etc/bashrc

 - - - 수정은 아래 (1) 참조 - - -

$ vi etc/config/CGAL.sh

 - - - 수정은 아래 (2) 참조 - - -

$ source etc/bashrc

$ vi $WM_DIR/rules/linux64Icc/cOpt

$ vi $WM_DIR/rules/linux64Icc/c++Opt

$ cd $WM_DIR

$ ./makeWmake

$ cd $WM_THIRD_PARTY_DIR

$ tar xvjf gmp-6.1.0.tar.bz2    # GMP-6.1.0 버전 설치

cd gmp-6.1.0

$ ./configure --prefix=$WM_THIRD_PARTY_DIR/platforms/${WM_ARCH}${WM_COMPILER}/gmp-6.1.0 \

--enable-cxx CC=icc CXX=icpc CFLAGS="-O3 -fPIC" CXXFLAGS="-O3 -fPIC" 

$ make

$ make install

$

$ tar xvzf mpfr-3.1.3.tar.gz   # MPFR-3.1.3 버전 설치

$ cd mpfr-3.1.3

$ ./configure --prefix=$WM_THIRD_PARTY_DIR/platforms/${WM_ARCH}${WM_COMPILER}/mpfr-3.1.3 \

CC=icc CXX=icpc CFLAGS="-O3 -fPIC" CXXFLAGS="-O3 -fPIC" --disable-thread-safe \

--with-gmp=$WM_THIRD_PARTY_DIR/platforms/${WM_ARCH}${WM_COMPILER}/gmp-6.1.0 

$ make

$ make install

$ tar xvzf boost_1_61_0.tar.gz   #BOOST-1.61.0 버전 설치
$ cd boost_1_61_0
$ ./bootstrap.sh --prefix=$WM_THIRD_PARTY_DIR/platforms/${WM_ARCH}${WM_COMPILER}/boost_1_61_0
$ ./b2 install --prefix=$WM_THIRD_PARTY_DIR/platforms/${WM_ARCH}${WM_COMPILER}/boost_1_61_0
$ export WM_COMPILER_ARCH=Icc
$
$ vi makeCGAL
- - - 수정은 아래 (3) 참조 - - -
$ vi ${WM_THIRD_PARTY_DIR}/etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-64Int32
- - - 수정은 아래 (4) 참조 - - -
$ ./makeCGAL boost_1_61_0 gmp-6.1.0 mpfr-3.1.3
$ export SCOTCH_VERSION=6
$ ./Allwmake
$ cd $WM_PROJECT_DIR
$ ./Allwmake

(1) etc/bashrc 파일 수정
 intel 컴파일러에 맞게 수정
[변경 전]

foamInstall=$HOME/$WM_PROJECT

export WM_COMPILER=Gcc

[변경 후]

foamInstall=$USER/applications/$WM_PROJECT

export WM_COMPILER=Icc


(2) etc/config/CGAL.sh 파일 수정

[변경 전]

boost_version=boost-system

[변경 후]

boost_version=boost_1_61_0


(3) makeCGAL 파일 수정

패키지들 버전에 맞게 수정

cgalPACKAGE=CGAL-4.7

boostPACKAGE=boost_1_61_0

gmpPACKAGE=gmp-6.1.0

mpfrPACKAGE=mpfr-3.1.3 


(4) Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-64Int32 파일 수정

intel 컴파일러 환경으로 수정

[변경 전]

AR      = gcc

CCS     = gcc

[변경 후]

AR      = icc

CCS     = icc


4. 사용 환경 설정

$ module load compiler/intel-2015 mpi/openmpi-2.1.1 

$ source /applic/applications/OpenFOAM/OpenFOAM-3.0.0/etc/bashrc







Posted by 천연사이다

CUDA SDK 8.0 버전이 icc 17.0 버전 이상을 인식하지 못하는 문제가 있어 수정 기록

- 수정 파일 : /usr/local/cuda-8.0/include/host_config.h (기본 CUDA SDK 설치 경로를 사용한 경우)

- 참고 : http://archive.ambermd.org/201707/0114.html

[수정 전]

 #if (__ICC != 1500 && __ICC != 1600) || !defined(__GNUC__) || 

!defined(__LP64__) 

[수정 후]

#if (__ICC != 1600 && __ICC != 1700) || !defined(__GNUC__) || 

!defined(__LP64__) 


'나의일 관련 > Linux' 카테고리의 다른 글

OpenFOAM 4.1 설치 기록  (0) 2018.02.01
OpenFOAM 3.0.0 설치 기록  (0) 2017.11.13
MPI hello world 예제(Fortran언어)  (0) 2017.10.27
MPI hello world 예제(C언어)  (0) 2017.10.27
Quantum Espresso 6.1 설치 기록  (0) 2017.10.27
Posted by 천연사이다

시스템 상태 체크 시 사용하는 MPI 코드


       program main

      use mpi

      implicit none


      integer :: provided, ierr, size, rank, len

      character (len=MPI_MAX_PROCESSOR_NAME) :: name

      call MPI_Init_thread(MPI_THREAD_MULTIPLE, provided, ierr)


      call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierr)

      call MPI_Comm_size(MPI_COMM_WORLD, size, ierr)

      call MPI_Get_processor_name(name, len, ierr)


      write(*, '(2A,I2,A,I2,3A)') &

           'Hello, World! ', &

           'I am process ', rank, &

           ' of ', size, &

           ' on ', name(1:len), '.'


      call MPI_Finalize(ierr)

      end program main


'나의일 관련 > Linux' 카테고리의 다른 글

OpenFOAM 3.0.0 설치 기록  (0) 2017.11.13
CUDA SDK 8.0 관련 이슈 기록  (0) 2017.10.31
MPI hello world 예제(C언어)  (0) 2017.10.27
Quantum Espresso 6.1 설치 기록  (0) 2017.10.27
[galaxy] fftw-3.3.4 설치 기록  (0) 2017.10.27
Posted by 천연사이다

시스템 상태 체크 시 사용하는 MPI 코드 


#include <stdio.h>

#include <mpi.h>


void main(int argc, char *argv[]){

    int rank,size,len;

    char name[MPI_MAX_PROCESSOR_NAME];


    MPI_Init(&argc, &argv);

    MPI_Comm_rank(MPI_COMM_WORLD, &rank);

    MPI_Comm_size(MPI_COMM_WORLD, &size);

    MPI_Get_processor_name(name, &len);

    printf("Hello, World! I am process %d of size %d on %s \n",rank, size, name );


    MPI_Finalize();



'나의일 관련 > Linux' 카테고리의 다른 글

CUDA SDK 8.0 관련 이슈 기록  (0) 2017.10.31
MPI hello world 예제(Fortran언어)  (0) 2017.10.27
Quantum Espresso 6.1 설치 기록  (0) 2017.10.27
[galaxy] fftw-3.3.4 설치 기록  (0) 2017.10.27
siesta-4.0 설치 기록  (0) 2017.10.27
Posted by 천연사이다

$ tar xvzf qe-6.1.tar.gz 

$ cd qe-6.1

$ unset LD_LIBRARY_PATH

$ module load  compiler/intel-2017  cuda/8.0 cudampi/mvapich2-2.2

$ export FC=mpif90 

$ export CC=mpicc 

$ export F77=mpif90 

$ export EXTLIB_FLAGS="-mkl=sequential"

$ export CFLAGS="-O3 -ip -ftz -xAVX -fPIC -shared-intel"

$ export FFLAGS="-O3 -ip -ftz -xAVX -fPIC -shared-intel"

$ export FCFLAGS="-O3 -ip -ftz -xAVX -fPIC -shared-intel"

$ ./configure --prefix=$HOME/applications/espresso/6.1/intel/2017/mvapich2/2.2 \

  --enable-parallel --with-scalapack=no \

  FFT_LIBS=/applic/compilers/intel/2017/mkl/lib/intel64/libfftw3xf_intel.a

$ vi make.inc

$ make all

$ make install


[Edit the make.inc file]

IFLAGS = -I$(TOPDIR)/include -I../include/ -I/applic/compilers/intel/2017/mkl/include \

             -I/applic/compilers/intel/2017/mkl/include/fftw

Posted by 천연사이다
이전버튼 1 2 3 4 이전버튼

블로그 이미지
공부 기록
천연사이다

공지사항

Yesterday
Today
Total

달력

 « |  » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함