Perl 사용 시 ""all" is not exported by the List::Util module" 오류가 발생 할 경우는 "List::Util" Perl module 상위 버전을 설치해서 사용 한다.


[설치 과정]

$ wget https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Scalar-List-Utils-1.52.tar.gz 

$ tar xzf Scalar-List-Utils-1.52.tar.gz 
$ cd Scalar-List-Utils-1.52 
$ perl Makefile.PL PREFIX=${HOME}/perl/5.10.1 
$ make 
$ make install


[사용을 위한 환경설정]

아래 내용을 .bashrc 와 같은 환경설정 파일에 내용을 추가 한다.

 $ export PERL5LIB=${HOME}/perl/5.10.1/lib64/perl5:${PERL5LIB}


Posted by 천연사이다

- 오류 내용 : NameError: name 'file' is not defined
- 오류 원인 및 해결 방법 : 
   python 2.x 버전에서 사용하던 file() 은 삭제 되었습니다.
   Python 3 버전에서는 file() 대신 open(filename, mode)을 사용하세요.
- 참고 : https://docs.python.org/release/3.0/whatsnew/3.0.html#builtins
       https://docs.python.org/release/3.0/library/functions.html#open

Posted by 천연사이다

시간이 10시6분34초 인 경우

=TEXT("10:06:34","[s]")

 

excel B2 시간에서 B1 시간을 빼서 초로 변환하는 경우

=TEXT(B2-B1,"[s]")

 

 

Posted by 천연사이다

MAC XQuartz 를 이용하여 OpenGL 라이브러리 사용 시 오류가 발생하면

터미널을 열어서 [해결방법]을 실행 후 다시 ssh 연결 


[해결 방법]

$ defaults write org.macosforge.xquartz.X11 enable_iglx -bool true


[오류 내용]

Gdk-ERROR **: The program '<PROGRAM>' received an X Window System error.

This probably reflects a bug in the program.

The error was '<SOME_ERROR>'.

 (Details: serial <AA> error_code <B> request_code <CC> minor_code <D>)

 (Note to programmers: normally, X errors are reported asynchronously;

  that is, you will receive the error a while after causing it.

   To debug your program, run it with the --sync command line

  option to change this behavior. You can then get a meaningful

  backtrace from your debugger if you break on the gdk_x_error() function.)


Posted by 천연사이다

./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 천연사이다


오류 내용 

ld: cannot find -lfl


해결 방법

flex-devel 설치


'나의일 관련 > 클러스터관리툴' 카테고리의 다른 글

PBS Pro 사용 방법 정리(작성중)  (0) 2020.01.28
ipmitool 명령어 모음  (1) 2019.11.12
linux 유용한 스크립트 기록  (0) 2017.11.16
PBS Pro stack size 조정 기록  (0) 2017.11.13
SLURM 공부 기록  (0) 2017.11.08
Posted by 천연사이다
이전버튼 1 2 3 4 5 이전버튼

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

공지사항

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

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함