全ての作業は pw 上でやってください. 利用する pw は,【pw0 + 学籍番号下二桁】とします. 例えば,学籍番号085788の学生は pw088 を利用してください.
macbook> ssh -X pw001 # 学籍番号 xxxx01 の場合. pw001$ wget http://www.cis.hut.fi/research/som_pak/som_pak-3.1.tar pw001$ wget http://ie.u-ryukyu.ac.jp/~tnal/Job/som_pak/som_pak_sample.tgz pw001$ tar xvf som_pak-3.1.tar pw001$ tar xvfz som_pak_sample.tgz pw001$ cp som_pak_sample/* som_pak-3.1/ pw001$ cd som_pak-3.1 pw001/som_pak-3.1$ make -f makefile.unix
2014年11月24日現在,Mac OS X 10.9.5 で動作を確認.
macbook> wget http://www.cis.hut.fi/research/som_pak/som_pak-3.1.tar macbook> wget http://ie.u-ryukyu.ac.jp/~tnal/Job/som_pak/som_pak_sample.tgz macbook> wget http://ie.u-ryukyu.ac.jp/~tnal/Job/som_pak/som_pak-3.1.patch macbook> tar xvf som_pak-3.1.tar macbook> tar xvfz som_pak_sample.tgz macbook> cp som_pak_sample/* som_pak-3.1/ macbook> patch -p0 -d . < som_pak-3.1.patch patching file som_pak-3.1/fileio.c #パッチ適用ログ.この4行が出力されればOK. patching file som_pak-3.1/fileio.h patching file som_pak-3.1/lvq_pak.c patching file som_pak-3.1/makefile.unix macbook> cd som_pak-3.1 macbook/som_pak-3.1> make -f makefile.unix
gcc -O2 -c -o vcal.o vcal.c In file included from vcal.c:26: In file included from ./datafile.h:28: ./fileio.h:69:7: error: conflicting types for 'getline' char *getline(struct file_info *fi); ^ /usr/include/stdio.h:440:9: note: previous declaration is here ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restri... ^ 1 error generated. make: *** [vcal.o] Error 1
macbook/som_pak-3.1> find . -name \*.c -exec perl -p -i -e 's/getline/getline_rename/g' {} \; macbook/som_pak-3.1> find . -name \*.h -exec perl -p -i -e 's/getline/getline_rename/g' {} \; macbook/som_pak-3.1> make -f makefile.unix
som_pak-3.1$ ./command.sh animal
pw001/som_pak-3.1$ eog animal.png
macbook/som_pak-3.1> open animal.ps
animal.dat(属性数16)の場合,以下のファイルが作成されます. 各図を参照してください.
サンプルソース内の animal.dat は上記参考サイトの例題です