Discussion:
[問題] 安裝軟體的路徑錯誤
(时间太久无法回复)
libertines
2014-01-22 16:17:39 UTC
Permalink
抱歉我重新整理發問

我要安裝一個叫talys的軟體

README裡面寫到
https://www.dropbox.com/s/k04n9m5y61c3i75/README

talys.setup
https://www.dropbox.com/s/ardxgrm4w1q30am/talys.setup


我把talys的資料夾放在
/home/lee/physics/talys
Loading Image...

但我應該是在

3. machine這邊有打錯?

所以有structure data base not installed的錯誤

想請教該怎麼打

我把 talysdir 換成/home/lee/physics/talys
應該沒錯吧?

Loading Image...




#!/bin/sh
unalias -a
#
# This script takes care of the TALYS installation.
# All you have to do is adapt the next variables to your own situation,
# and run.....
#
#compiler='lf95 --staticlink'
compiler='g95'
Thome=${/home/lee/physics/talys}
bindir=$Thome'/home/lee/physics/talys/bin' # destiny directory of the TALYS
executable
#
# From here on, the rest should work automatically
#
# 1. Define the talys directory
#
talysdir=`pwd`
#
# 2. Ensure that all directories have execute permission and that
# all files have a read and write permission
#
cd ..
chmod -R u+rwX talys
#
# 3. Ensure that TALYS can read the structure database by replacing
# the path name in subroutine machine.f
#
datapath=${talysdir}'/'
datapathnew=`echo $datapath | sed 's/\//\\\\\//g'`
cd ${talysdir}'/source/'
sed "s/ home='.*'/ home='${datapathnew}'/" machine.f > machine_tmp.f
mv -f machine_tmp.f machine.f
#
# 4. Compile TALYS.
# Please note that the compilation of ecis06t.f
# may result in some trivial warning messages
#
${compiler} -c *.f
${compiler} *.o -o talys
#
# 5. Check whether the setup procedure has been successful
#
if [ -e talys ]
then
mv -f talys ${bindir}/talys
echo ' '
echo 'The TALYS setup has been completed.'
echo ' '
echo 'You will find a talys executable in your' $bindir 'directory.'
echo ' '
echo 'You are all set to run the sample problems in the samples directory'
echo 'with the verify script.'
else
echo 'TALYS setup failed'
fi

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 101.3.35.40
呢帽漢
2014-01-23 05:49:11 UTC
Permalink
剛剛製作了一個 Fedora 適用的套件
https://build.opensuse.org/package/show/home:bluebat/talys
基本上不需要 talys.setup 而只需

cd source
sed -i 's|/home/finux01b/akoning/talys/|.|' machine.f
g77 -c *.f
g77 *.o -o talys

即可,但不確定執行是否正常

上述的 g77 是由 compat-gcc-34-g77 套件所提供
或可替換為 gcc-gfortran 套件中的 f95
lf95 是商業軟體
g95 並不在 Fedora 官方套件庫中

※ 引述《flied (libertines)》之銘言:
: 我要安裝一個叫talys的軟體

--
http://community.fedora-hant.org

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.139.95.63
libertines
2014-01-23 15:02:40 UTC
Permalink
※ 引述《FedoraHanT (呢帽漢)》之銘言:
: 剛剛製作了一個 Fedora 適用的套件
: https://build.opensuse.org/package/show/home:bluebat/talys
: 基本上不需要 talys.setup 而只需
: cd source
: sed -i 's|/home/finux01b/akoning/talys/|.|' machine.f
: g77 -c *.f
: g77 *.o -o talys
: 即可,但不確定執行是否正常
: 上述的 g77 是由 compat-gcc-34-g77 套件所提供
: 或可替換為 gcc-gfortran 套件中的 f95
: lf95 是商業軟體
: g95 並不在 Fedora 官方套件庫中
: ※ 引述《flied (libertines)》之銘言:
: : 我要安裝一個叫talys的軟體

請教一下我下載檔案後放在talys資料夾
Loading Image...

接著執行的畫面
Loading Image...

***@lee-X402CA:~/physics/talys/source$ sed -i 's|/home/lee/physics/talys/|.|'
***@lee-X402CA:~/physics/talys/source$ g77 -c *.f
無 'g77' 這個指令,是指這個嗎:
'f77' 指令來自於 'fort77' 套件 (universe)
g77:無此指令
***@lee-X402CA:~/physics/talys/source$ f95 -c *.f
***@lee-X402CA:~/physics/talys/source$ f95 *.o -o talys
***@lee-X402CA:~/physics/talys/source$ mv talys /bin
mv: 無法將 ‘talys’ 移動至 ‘/bin/talys’: 拒絕不符權限的操作
***@lee-X402CA:~/physics/talys/source$ sudo mv talys /bin
[sudo] password for lee:
***@lee-X402CA:~/physics/talys/source$ rehash
無 'rehash' 這個指令,是指這個嗎:
'rhash' 指令來自於 'rhash' 套件 (universe)
'rahash' 指令來自於 'radare-common' 套件 (universe)
rehash:無此指令
***@lee-X402CA:~/physics/talys/source$ ./rehash
bash: ./rehash: 沒有此一檔案或目錄
***@lee-X402CA:~/physics/talys/source$ ./ rehash
bash: ./: 是個目錄
***@lee-X402CA:~/physics/talys/source$ cd ..
***@lee-X402CA:~/physics/talys$ cd samples
***@lee-X402CA:~/physics/talys/samples$ verify


但沒有如README裡面講的
Under Linux/Unix, this should run all sample cases (about 1 hour on
a fast PC).

麻煩在指點了
謝謝

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 101.3.47.52
Neisseria
2014-01-24 00:42:07 UTC
Permalink
※ 引述《flied (libertines)》之銘言:
: 請教一下我下載檔案後放在talys資料夾
: https://www.dropbox.com/s/yn7muhhwqwsf69g/2014-01-23%2022%3A55%3A40.png
: 接著執行的畫面
: https://www.dropbox.com/s/sg8a3surzoa6u6o/2014-01-23%2022%3A57%3A00.png
: ***@lee-X402CA:~/physics/talys/source$ sed -i 's|/home/lee/physics/talys/|.|'
其實不太需要手動下這行,talys-setup 這個 script 就會自動處理了

: ***@lee-X402CA:~/physics/talys/source$ g77 -c *.f
: 無 'g77' 這個指令,是指這個嗎:
: 'f77' 指令來自於 'fort77' 套件 (universe)
: g77:無此指令
這裡意思是系統沒有 g77 這個指令
每個系統安裝的 Fortran compiler 不同
像在我系統上的 Fortran compiler 指令是 gfortran (GNU Fortran 95 compiler)

: ***@lee-X402CA:~/physics/talys/source$ f95 -c *.f
: ***@lee-X402CA:~/physics/talys/source$ f95 *.o -o talys
其實不太需要自己手動執行,talys-setup 這個 script 已經有寫好這個動作了
anyway,能夠順利編譯就好

: ***@lee-X402CA:~/physics/talys/source$ mv talys /bin
: mv: 無法將 ‘talys’ 移動至 ‘/bin/talys’: 拒絕不符權限的操作
: ***@lee-X402CA:~/physics/talys/source$ sudo mv talys /bin
: [sudo] password for lee:
個人建議,會將自己 compile 的指令都放在 $HOME/bin 這個目錄底下
儘量不要丟在系統的資料夾 否則 時間一久 也忘記了 不好整理

: ***@lee-X402CA:~/physics/talys/source$ rehash
: 無 'rehash' 這個指令,是指這個嗎:
: 'rhash' 指令來自於 'rhash' 套件 (universe)
: 'rahash' 指令來自於 'radare-common' 套件 (universe)
: rehash:無此指令
: ***@lee-X402CA:~/physics/talys/source$ ./rehash
: bash: ./rehash: 沒有此一檔案或目錄
: ***@lee-X402CA:~/physics/talys/source$ ./ rehash
: bash: ./: 是個目錄
猜測您可能是用 Bash 吧 Bash 沒有 rehash 這個指令
相對地 是輸入 hash -r
其實這行指令不是必需的 將終端機關掉在重開也是一個方法

: ***@lee-X402CA:~/physics/talys/source$ cd ..
: ***@lee-X402CA:~/physics/talys$ cd samples
: ***@lee-X402CA:~/physics/talys/samples$ verify
因為 verify 的位置沒有設定在 PATH 裡面
請下 ./verify 這樣就會直接從 verify 所在的位置執行這個 script
同樣地 一開始安裝時 也是直接在 talys-setup 所在的位置執行 像是 ./talys-setup
前提是要在 talys-setup 裡修改 compiler 和 安裝路徑的名稱

建議稍微熟悉一下 Linux 的操作
對之後的工作或研究會有一些幫助 至少不會卡在一些瑣碎的問題上

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.104.139.149
libertines
2014-01-25 02:33:22 UTC
Permalink
※ 引述《Neisseria (Neisseria)》之銘言:
: ※ 引述《flied (libertines)》之銘言:
: : 請教一下我下載檔案後放在talys資料夾
: : https://www.dropbox.com/s/yn7muhhwqwsf69g/2014-01-23%2022%3A55%3A40.png
: : 接著執行的畫面
: : https://www.dropbox.com/s/sg8a3surzoa6u6o/2014-01-23%2022%3A57%3A00.png
: : ***@lee-X402CA:~/physics/talys/source$ sed -i 's|/home/lee/physics/talys/|.|'
: 其實不太需要手動下這行,talys-setup 這個 script 就會自動處理了
: : ***@lee-X402CA:~/physics/talys/source$ g77 -c *.f
: : 無 'g77' 這個指令,是指這個嗎:
: : 'f77' 指令來自於 'fort77' 套件 (universe)
: : g77:無此指令
: 這裡意思是系統沒有 g77 這個指令
: 每個系統安裝的 Fortran compiler 不同
: 像在我系統上的 Fortran compiler 指令是 gfortran (GNU Fortran 95 compiler)
: : ***@lee-X402CA:~/physics/talys/source$ f95 -c *.f
: : ***@lee-X402CA:~/physics/talys/source$ f95 *.o -o talys
: 其實不太需要自己手動執行,talys-setup 這個 script 已經有寫好這個動作了
: anyway,能夠順利編譯就好
: : ***@lee-X402CA:~/physics/talys/source$ mv talys /bin
: : mv: 無法將 ‘talys’ 移動至 ‘/bin/talys’: 拒絕不符權限的操作
: : ***@lee-X402CA:~/physics/talys/source$ sudo mv talys /bin
: : [sudo] password for lee:
: 個人建議,會將自己 compile 的指令都放在 $HOME/bin 這個目錄底下
謝謝
: 儘量不要丟在系統的資料夾 否則 時間一久 也忘記了 不好整理
: : ***@lee-X402CA:~/physics/talys/source$ rehash
: : 無 'rehash' 這個指令,是指這個嗎:
: : 'rhash' 指令來自於 'rhash' 套件 (universe)
: : 'rahash' 指令來自於 'radare-common' 套件 (universe)
: : rehash:無此指令
: : ***@lee-X402CA:~/physics/talys/source$ ./rehash
: : bash: ./rehash: 沒有此一檔案或目錄
: : ***@lee-X402CA:~/physics/talys/source$ ./ rehash
: : bash: ./: 是個目錄
: 猜測您可能是用 Bash 吧 Bash 沒有 rehash 這個指令
: 相對地 是輸入 hash -r
: 其實這行指令不是必需的 將終端機關掉在重開也是一個方法
請問我電腦關機重開了
需要再次執行以上步驟嗎?
我這次沒執行

: : ***@lee-X402CA:~/physics/talys/source$ cd ..
: : ***@lee-X402CA:~/physics/talys$ cd samples
: : ***@lee-X402CA:~/physics/talys/samples$ verify
: 看了一下您系統畫面的圖片 您的系統不知道是否剛好有一個指令也叫 verify
: 下下看 which verify 就知道了
: 如果要執行那個那個 verify script 請下 ./verify
: 這樣就會直接從 verify 所在的位置執行這個 script

執行的內容

Loading Image...

***@lee-X402CA:~/physics/talys$ cd samples
***@lee-X402CA:~/physics/talys/samples$ ./verify
bash: ./verify: 拒絕不符權限的操作
***@lee-X402CA:~/physics/talys/samples$ which verify
/usr/bin/verify
***@lee-X402CA:~/physics/talys/samples$ sudo verify
[sudo] password for lee:
Verify CIE values, Version 1.4.0
Author: Graeme W. Gill, licensed under the AGPL Version 3
usage: verify [-options] target.ti3 measured.ti3
-v Verbose - print each patch value
-n Normalise each files reading to white Y
-N Normalise each files reading to white XYZ
-D Use D50 100.0 as L*a*b* white reference
-c Show CIE94 delta E values
-k Show CIEDE2000 delta E values
-s Sort patch values by error
-w create VRML vector visualisation (measured.wrl)
-W create VRML marker visualisation (measured.wrl)
-x Use VRML axes
-i illum Choose illuminant for print/transparency spectral data:
A, C, D50 (def.), D65, F5, F8, F10 or file.sp
-o observ Choose CIE Observer for spectral data:
1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
-f Use Fluorescent Whitening Agent compensation
-X file.ccmx Apply Colorimeter Correction Matrix to second file
target.ti3 Target (reference) PCS or spectral values.
measured.ti3 Measured (actual) PCS or spectral values
***@lee-X402CA:~/physics/talys/samples$ ls
1 11 13 15 17 19 20 22 24 3 5 7 9 verify
10 12 14 16 18 2 21 23 25 4 6 8 README
***@lee-X402CA:~/physics/talys/samples$ sudo ./verify
sudo: ./verify: command not found
***@lee-X402CA:~/physics/talys/samples$ ./verify
bash: ./verify: 拒絕不符權限的操作


: 同樣地 一開始安裝時 也是直接在 talys-setup 所在的位置執行 像是 ./talys-setup
: 前提是要在 talys-setup 裡修改 compiler 和 安裝路徑的名稱

我的talys-setup如下
Loading Image...
Loading Image...
請問第3點那有弄錯嗎?

: 建議稍微熟悉一下 Linux 的操作
: 對之後的工作或研究會有一些幫助 至少不會卡在一些瑣碎的問題上

抱歉 學生時期只碰過一下linux
現在碰到問題很同痛
我知道弱手我問這問題給大家叫笑
麻煩大家指點

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 101.3.47.52
Neisseria
2014-01-25 07:17:19 UTC
Permalink
※ 引述《flied (libertines)》之銘言:
: 執行的內容
: https://www.dropbox.com/s/o02ec96zi9mjflb/2014-01-25%2010%3A20%3A04.png
: ***@lee-X402CA:~/physics/talys$ cd samples
: ***@lee-X402CA:~/physics/talys/samples$ ./verify
: bash: ./verify: 拒絕不符權限的操作
試著執行看看
$ which talys
確定系統上已經有 talys 執行檔

假設已經在 verify 所在的資料夾...
$ chmod +x verify
$ ./verify

: ***@lee-X402CA:~/physics/talys/samples$ which verify
: /usr/bin/verify
這樣代表系統上剛好有個執行檔也叫 verify
不過我的系統沒有 就不知道你系統上的 verify 是做什麼的

: ***@lee-X402CA:~/physics/talys/samples$ sudo verify
: [sudo] password for lee:
: Verify CIE values, Version 1.4.0
: Author: Graeme W. Gill, licensed under the AGPL Version 3
: usage: verify [-options] target.ti3 measured.ti3
即使使用 sudo,在這裡同樣是執行系統上的 verify 而非該目錄下的 verify

: 我的talys-setup如下
: https://www.dropbox.com/s/ep5l9o6wvr5wt8u/%202014-01-25%2010%3A20%3A44.png
: https://www.dropbox.com/s/f7rgpaskau9ex64/2014-01-25%2010%3A20%3A55.png
: 請問第3點那有弄錯嗎?
這個要看實際上自己系統的 Fortran compiler 為何 別人幫助有限
同樣地 先用 which talys 檢查一下 已經裝好了就跟這個 setup 檔無關

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.104.122.208
libertines
2014-01-26 01:35:55 UTC
Permalink
※ 引述《Neisseria (Neisseria)》之銘言:
: ※ 引述《flied (libertines)》之銘言:
: : 執行的內容
: : https://www.dropbox.com/s/o02ec96zi9mjflb/2014-01-25%2010%3A20%3A04.png
: : ***@lee-X402CA:~/physics/talys$ cd samples
: : ***@lee-X402CA:~/physics/talys/samples$ ./verify
: : bash: ./verify: 拒絕不符權限的操作
: 試著執行看看
: $ which talys

***@lee-X402CA:~$ which talys
/usr/bin/talys

: 確定系統上已經有 talys 執行檔
: 假設已經在 verify 所在的資料夾...
: $ chmod +x verify
: $ ./verify

***@lee-X402CA:/bin$ chmod +x verify
chmod: 無法存取 ‘verify’: 沒有此一檔案或目錄
***@lee-X402CA:/bin$ ./verify
bash: ./verify: 沒有此一檔案或目錄
***@lee-X402CA:/bin$ verify
Verify CIE values, Version 1.4.0
Author: Graeme W. Gill, licensed under the AGPL Version 3
usage: verify [-options] target.ti3 measured.ti3
-v Verbose - print each patch value
-n Normalise each files reading to white Y
-N Normalise each files reading to white XYZ
-D Use D50 100.0 as L*a*b* white reference
-c Show CIE94 delta E values
-k Show CIEDE2000 delta E values
-s Sort patch values by error
-w create VRML vector visualisation (measured.wrl)
-W create VRML marker visualisation (measured.wrl)
-x Use VRML axes
-i illum Choose illuminant for print/transparency spectral data:
A, C, D50 (def.), D65, F5, F8, F10 or file.sp
-o observ Choose CIE Observer for spectral data:
1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2
-f Use Fluorescent Whitening Agent compensation
-X file.ccmx Apply Colorimeter Correction Matrix to second file
target.ti3 Target (reference) PCS or spectral values.
measured.ti3 Measured (actual) PCS or spectral values

: : ***@lee-X402CA:~/physics/talys/samples$ which verify
: : /usr/bin/verify
: 這樣代表系統上剛好有個執行檔也叫 verify

: 不過我的系統沒有 就不知道你系統上的 verify 是做什麼的

我是灌ubuntu 13.10 64bit

幾乎沒更改過設定
所以也不知道怎麼回事

: : ***@lee-X402CA:~/physics/talys/samples$ sudo verify
: : [sudo] password for lee:
: : Verify CIE values, Version 1.4.0
: : Author: Graeme W. Gill, licensed under the AGPL Version 3
: : usage: verify [-options] target.ti3 measured.ti3
: 即使使用 sudo,在這裡同樣是執行系統上的 verify 而非該目錄下的 verify
: : 我的talys-setup如下
: : https://www.dropbox.com/s/ep5l9o6wvr5wt8u/%202014-01-25%2010%3A20%3A44.png
: : https://www.dropbox.com/s/f7rgpaskau9ex64/2014-01-25%2010%3A20%3A55.png
: : 請問第3點那有弄錯嗎?
: 這個要看實際上自己系統的 Fortran compiler 為何 別人幫助有限
: 同樣地 先用 which talys 檢查一下 已經裝好了就跟這個 setup 檔無關

原本灌另一個軟體時
http://www.fluka.org/fluka.php?id=ins_run
有灌 gcc/gfortran

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 101.3.47.52
流水
2014-01-26 02:46:51 UTC
Permalink
�� �ޭz�mflied (libertines)�n���ʨ��G
: �� �ޭz�mNeisseria (Neisseria)�n���ʨ��G
: : �յ۰����ݬ�
: : $ which talys
: ***@lee-X402CA:~$ which talys
: /usr/bin/talys
: : �T�w�t�ΤW�w�g�� talys ������
�o��ӴN�O�i�H����call�o��talys���O�F

: : ���]�w�g�b verify �Ҧb�����Ƨ�...
: : $ chmod +x verify
: : $ ./verify
�o�O���e���峹
: ***@lee-X402CA:~/physics/talys/samples$ ./verify
: bash: ./verify: �ڵ������v�����ާ@
�o�O���ӧA���檺���p
: ***@lee-X402CA:/bin$ chmod +x verify
: chmod: �L�k�s�� ��verify��: �S�����@�ɮשΥؿ�
: ***@lee-X402CA:/bin$ ./verify
: bash: ./verify: �S�����@�ɮשΥؿ�

�Ъ`�N�p�{�b���Ҧb�ؿ��A
�����⦸���G�A�A�O���O�ӥh ~/physics/talys/samples �M���A��verify

���M�����D���ƻ��A�|�b/bin�̭��A�h�B��פ@�U�A���Q�k�n�F�G

1. �A�i���{�������ɭn�b/bin���U�~���]�H
=> ���ڤW���ΡA���ɮ��v�������t
���n�`�N���O�A�p�G�A�n���檺���O�b�t��$PATH�̭����{���A
�n�ά۹��ε������|���覡�h�I�s�C

���O�A�b ~/physics/talys/samples�̭��I�s�۹����| "./":
~/physics/talys/samples$ ./verify

�άO�������|
/home/�A���b��/physics/talys/samples/verify

�Y�O�A�����I�sverify�A�N�O�I�s���t�ιw����������verify�u���C

2. �A�i�ण�T�wchmod���\���H��"bash: ./verify: �ڵ������v�����ާ@"�����]
=> �����L�׬Oscript�ε{���@���ӻ����ݭn�ɮ��v���~�������F
�o�䪺�v�{�����ӭ��V�G�A���v���A�M�]�w���ɮת��v���C
�ڭ̥��Ӭݬݤ@���v�����e�{�覡�G
$ ls -ld /bin/bash
-rwxr-xr-x 1 root root 959120 Mar 29 2013 /bin/bash
�Ĥ@��rwx�O�o���ɮת��֦���root�үవ���Ʊ�
read, write, execute

�ĤG��rwx�O�o���ɮת��֦��̸s�աAroot�s�թүవ���Ʊ�
�ҥH���broot�s�եB�D�ϥΪ�root�h�|�Ѧҳo�ճ]�w

�ĤT��rwx�h�O�����H�~���H���v���C

�ҥH���A�ڭ̥i�H�ݨ�/bin/bash�o���ɮסA
- �֦���root�㦳�Ҧ��v���F
- �֦��̸s��root�S���ק�(�g�J)���v���A���i�HŪ���M�����F
- �ѤU���H���O�S���ק��B��Ū�����檺�v���C

�@�몺���r�ɮ����������O644�A�Ҧp�G
$ ls -ld /etc/hosts
-rw-r--r-- 1 root root 342 Jan 22 20:16 /etc/hosts
�ڷQ�A��~/physics/talys/samples/verify��Ӥ]�O���������ΡA
�]���A�ݭn���O��L�[�Wexecute
~/physics/talys/samples/$ chmod +x verify

sudo �i�H��A���o���P�ϥΪ̪��v���A���w��x�o���]�w�q�`�ݭn��chmod�ӽվ��C

: ***@lee-X402CA:/bin$ verify
: Verify CIE values, Version 1.4.0
: : �o�˥N���t�ΤW���n���Ӱ����ɤ]�s verify

: : �Y�Ϩϥ� sudo�A�b�o�̦P�ˬO�����t�ΤW�� verify �ӫD�ӥؿ��U�� verify

�o���N�u�O�A���t�Φ��w�ˤ@�ӥs��verify�����O�A
���o�A���ϥθg���ݨӡA���ӫ��O�ä��O�A�o���w�˪��B�J���ݭn�I�s�쪺�C


--
�������c�c�d�c���� �r��
���������p�p�i���� �� �c�c�c�c�c�c�c 
�� �y�y�c �c���k�k�� �b�����U�x�v  ���F��project�t�C 
 ���� �c�n�n �áááááá� 
  /�������c�c�c�c�c�c  �� �z �� ��  PTT�F���O Touhou ��
 �f�f�������g�g�g�g�g�h �áááááá� ����

--
�� �o�H��: ���������~�{(ptt.cc)
�� From: 27.147.30.27
libertines
2014-01-26 13:40:47 UTC
Permalink
※ 引述《soem (流水)》之銘言:
: ※ 引述《flied (libertines)》之銘言:
: : ***@lee-X402CA:~$ which talys
: : /usr/bin/talys
: 這應該就是可以直接call得到talys指令了
: 這是之前的文章
: : ***@lee-X402CA:~/physics/talys/samples$ ./verify
: : bash: ./verify: 拒絕不符權限的操作
: 這是後來你執行的狀況
: : ***@lee-X402CA:/bin$ chmod +x verify
: : chmod: 無法存取 ‘verify’: 沒有此一檔案或目錄
: : ***@lee-X402CA:/bin$ ./verify
: : bash: ./verify: 沒有此一檔案或目錄
: 請注意妳現在的所在目錄,
: 比對兩次結果,你是不是該去 ~/physics/talys/samples 尋找你的verify
: 雖然不知道為甚麼你會在/bin裡面,姑且推論一下你的想法好了:
: 1. 你可能認為執行檔要在/bin底下才能跑?
: => 實際上不用,跟檔案權限有關系
: 但要注意的是,如果你要執行的不是在系統$PATH裡面的程式,
: 要用相對或絕對路徑的方式去呼叫。
: 像是你在 ~/physics/talys/samples裡面呼叫相對路徑 "./":
: ~/physics/talys/samples$ ./verify
: 或是絕對路徑
: /home/你的帳號/physics/talys/samples/verify
: 若是你直接呼叫verify,就是呼叫到系統預先有的那隻verify工具。
: 2. 你可能不確定chmod的功能以及"bash: ./verify: 拒絕不符權限的操作"的成因
: => 首先無論是script或程式一般來說都需要檔案權限才能執行;
: 這邊的權現有兩個面向:你的權限,和設定給檔案的權限。
: 我們先來看看一般權限的呈現方式:
: $ ls -ld /bin/bash
: -rwxr-xr-x 1 root root 959120 Mar 29 2013 /bin/bash
: 第一組rwx是這個檔案的擁有者root所能做的事情
: read, write, execute
: 第二組rwx是這個檔案的擁有者群組,root群組所能做的事情
: 所以有在root群組且非使用者root則會參考這組設定
: 第三組rwx則是除此以外的人的權限。
: 所以說,我們可以看到/bin/bash這個檔案,
: - 擁有者root具有所有權限;
: - 擁有者群組root沒有修改(寫入)的權限,但可以讀取和執行;
: - 剩下的人亦是沒有修改、有讀取執行的權限。
: 一般的文字檔案類型往往是644,例如:
: $ ls -ld /etc/hosts
: -rw-r--r-- 1 root root 342 Jan 22 20:16 /etc/hosts
: 我想你的~/physics/talys/samples/verify應該也是類似的情形,
: 因此你需要的是幫他加上execute
: ~/physics/talys/samples/$ chmod +x verify
: sudo 可以幫你取得不同使用者的權限,但針對x這項設定通常需要用chmod來調整。
謝謝

我執行了這行成功
***@lee-X402CA:~/physics/talys/samples$ ./verify
bash: ./verify: 拒絕不符權限的操作
***@lee-X402CA:~/physics/talys/samples$ chmod +x verify
***@lee-X402CA:~/physics/talys/samples$ ./verify

/home/lee/physics/talys/samples/17/a/new
/home/lee/physics/talys/samples/17/b/new
/home/lee/physics/talys/samples/17/c/new
/home/lee/physics/talys/samples/11/new
/home/lee/physics/talys/samples/10/a/new
/home/lee/physics/talys/samples/10/b/new
/home/lee/physics/talys/samples/20/new
/home/lee/physics/talys/samples/1/f/new
/home/lee/physics/talys/samples/1/g/new
/home/lee/physics/talys/samples/1/e/new
/home/lee/physics/talys/samples/1/h/new
/home/lee/physics/talys/samples/1/a/new
/home/lee/physics/talys/samples/1/b/new
/home/lee/physics/talys/samples/1/d/new
/home/lee/physics/talys/samples/1/i/new
/home/lee/physics/talys/samples/1/c/new
/home/lee/physics/talys/samples/8/new
/home/lee/physics/talys/samples/21/new
/home/lee/physics/talys/samples/3/a/new
/home/lee/physics/talys/samples/3/b/new
/home/lee/physics/talys/samples/3/d/new
/home/lee/physics/talys/samples/3/c/new
/home/lee/physics/talys/samples/22/new
/home/lee/physics/talys/samples/9/new
/home/lee/physics/talys/samples/6/a/new
/home/lee/physics/talys/samples/6/b/new
/home/lee/physics/talys/samples/19/new
/home/lee/physics/talys/samples/16/a/new
/home/lee/physics/talys/samples/16/b/new
/home/lee/physics/talys/samples/16/d/new
/home/lee/physics/talys/samples/16/c/new
/home/lee/physics/talys/samples/2/new
/home/lee/physics/talys/samples/24/new
/home/lee/physics/talys/samples/25/new
/home/lee/physics/talys/samples/12/new
/home/lee/physics/talys/samples/23/new
/home/lee/physics/talys/samples/14/new
/home/lee/physics/talys/samples/5/new
/home/lee/physics/talys/samples/15/new
/home/lee/physics/talys/samples/18/a/new
/home/lee/physics/talys/samples/18/b/new
/home/lee/physics/talys/samples/4/a/new
/home/lee/physics/talys/samples/4/b/new
/home/lee/physics/talys/samples/13/new
/home/lee/physics/talys/samples/7/new

似乎成功

但readme如下
Verification
------------

- cd samples

- verify

Under Linux/Unix, this should run all sample cases (about 1 hour on
a fast PC).

我這大概3秒就結束
所以應該還沒有裝好

: : ***@lee-X402CA:/bin$ verify
: : Verify CIE values, Version 1.4.0
: 這邊就只是你的系統有安裝一個叫做verify的指令,
: 但這你的使用經驗看來,那個指令並不是你這次安裝的步驟中需要呼叫到的。

Your own calculations
---------------------

- talys < input > output

where you can make your own input file starting from the many sample cases
we provide.


我試著計算執行
錯誤如下
***@lee-X402CA:~/physics/talys/test$ talys input output5
TALYS-error: Structure database not installed: change path in machine.f


我的machine.f 在 /home/lee/physics/talys/source
Loading Image...

內容如下

Loading Image...


c ********************* Set directory for structure data ***************
c
c path : directory containing structure files to be read
c lenpath: length of pathname
c
c The maximum length of the path is 60 characters
c
home='/home/lee/physics/talys/' (我改這行)
lenhome=0
do 10 i=1,60
if (home(i:i).eq.' ') goto 100
lenhome=lenhome+1
10 continue
100 path=home(1:lenhome)//'structure/'
lenpath=lenhome+10
c
c Test to check accessibility of structure files
c
inquire (file=path(1:lenpath)//'abundance/z001',exist=lexist)
if (lexist) return
write(*,'(" TALYS-error: Structure database not installed:",
+ " change path in machine.f")')
stop
end
Copyright (C) 2013 A.J. Koning, S. Hilaire and S. Goriely



我改的只有這部份

原本是 home='.'
不能執行後,我改成

home='/home/lee/physics/talys/'

這樣改對吧?

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 101.3.47.52
libertines
2014-01-27 02:26:10 UTC
Permalink
以下是soem大的回應
還有我的問題
(徵得soem大同意附上)
※ 引述《flied (libertines)》之銘言:
: ※ 引述《soem (流水)》之銘言:
: : 這應該就是可以直接call得到talys指令了
: : 這是之前的文章
: : 這是後來你執行的狀況
: : 請注意妳現在的所在目錄,
: : 比對兩次結果,你是不是該去 ~/physics/talys/samples 尋找你的verify
: : 雖然不知道為甚麼你會在/bin裡面,姑且推論一下你的想法好了:
: : 1. 你可能認為執行檔要在/bin底下才能跑?
: : => 實際上不用,跟檔案權限有關系
: : 但要注意的是,如果你要執行的不是在系統$PATH裡面的程式,
: : 要用相對或絕對路徑的方式去呼叫。
: : 像是你在 ~/physics/talys/samples裡面呼叫相對路徑 "./":
: : ~/physics/talys/samples$ ./verify
: : 或是絕對路徑
: : /home/你的帳號/physics/talys/samples/verify
: : 若是你直接呼叫verify,就是呼叫到系統預先有的那隻verify工具。
: : 2. 你可能不確定chmod的功能以及"bash: ./verify: 拒絕不符權限的操作"的成因
: : => 首先無論是script或程式一般來說都需要檔案權限才能執行;
: : 這邊的權現有兩個面向:你的權限,和設定給檔案的權限。
: : 我們先來看看一般權限的呈現方式:
: : $ ls -ld /bin/bash
: : -rwxr-xr-x 1 root root 959120 Mar 29 2013 /bin/bash
: : 第一組rwx是這個檔案的擁有者root所能做的事情
: : read, write, execute
: : 第二組rwx是這個檔案的擁有者群組,root群組所能做的事情
: : 所以有在root群組且非使用者root則會參考這組設定
: : 第三組rwx則是除此以外的人的權限。
: : 所以說,我們可以看到/bin/bash這個檔案,
: : - 擁有者root具有所有權限;
: : - 擁有者群組root沒有修改(寫入)的權限,但可以讀取和執行;
: : - 剩下的人亦是沒有修改、有讀取執行的權限。
: : 一般的文字檔案類型往往是644,例如:
: : $ ls -ld /etc/hosts
: : -rw-r--r-- 1 root root 342 Jan 22 20:16 /etc/hosts
: : 我想你的~/physics/talys/samples/verify應該也是類似的情形,
: : 因此你需要的是幫他加上execute
: : ~/physics/talys/samples/$ chmod +x verify
: : sudo 可以幫你取得不同使用者的權限,但針對x這項設定通常需要用chmod來調整。
: 謝謝
: 我執行了這行成功
: ***@lee-X402CA:~/physics/talys/samples$ ./verify
: bash: ./verify: 拒絕不符權限的操作
: ***@lee-X402CA:~/physics/talys/samples$ chmod +x verify
: ***@lee-X402CA:~/physics/talys/samples$ ./verify
: /home/lee/physics/talys/samples/17/a/new
: /home/lee/physics/talys/samples/17/b/new
: /home/lee/physics/talys/samples/17/c/new
: /home/lee/physics/talys/samples/11/new
: /home/lee/physics/talys/samples/10/a/new
: /home/lee/physics/talys/samples/10/b/new
: /home/lee/physics/talys/samples/20/new
: /home/lee/physics/talys/samples/1/f/new
: /home/lee/physics/talys/samples/1/g/new
: /home/lee/physics/talys/samples/1/e/new
: /home/lee/physics/talys/samples/1/h/new
: /home/lee/physics/talys/samples/1/a/new
: /home/lee/physics/talys/samples/1/b/new
: /home/lee/physics/talys/samples/1/d/new
: /home/lee/physics/talys/samples/1/i/new
: /home/lee/physics/talys/samples/1/c/new
: /home/lee/physics/talys/samples/8/new
: /home/lee/physics/talys/samples/21/new
: /home/lee/physics/talys/samples/3/a/new
: /home/lee/physics/talys/samples/3/b/new
: /home/lee/physics/talys/samples/3/d/new
: /home/lee/physics/talys/samples/3/c/new
: /home/lee/physics/talys/samples/22/new
: /home/lee/physics/talys/samples/9/new
: /home/lee/physics/talys/samples/6/a/new
: /home/lee/physics/talys/samples/6/b/new
: /home/lee/physics/talys/samples/19/new
: /home/lee/physics/talys/samples/16/a/new
: /home/lee/physics/talys/samples/16/b/new
: /home/lee/physics/talys/samples/16/d/new
: /home/lee/physics/talys/samples/16/c/new
: /home/lee/physics/talys/samples/2/new
: /home/lee/physics/talys/samples/24/new
: /home/lee/physics/talys/samples/25/new
: /home/lee/physics/talys/samples/12/new
: /home/lee/physics/talys/samples/23/new
: /home/lee/physics/talys/samples/14/new
: /home/lee/physics/talys/samples/5/new
: /home/lee/physics/talys/samples/15/new
: /home/lee/physics/talys/samples/18/a/new
: /home/lee/physics/talys/samples/18/b/new
: /home/lee/physics/talys/samples/4/a/new
: /home/lee/physics/talys/samples/4/b/new
: /home/lee/physics/talys/samples/13/new
: /home/lee/physics/talys/samples/7/new
: 似乎成功
: 但readme如下
: Verification
: ------------
: - cd samples
: - verify
: Under Linux/Unix, this should run all sample cases (about 1 hour on
: a fast PC).
: 我這大概3秒就結束
: 所以應該還沒有裝好
: : 這邊就只是你的系統有安裝一個叫做verify的指令,
: : 但這你的使用經驗看來,那個指令並不是你這次安裝的步驟中需要呼叫到的。
: Your own calculations
: ---------------------
: - talys < input > output
: where you can make your own input file starting from the many sample cases
: we provide.
: 我試著計算執行
: 錯誤如下
: ***@lee-X402CA:~/physics/talys/test$ talys input output5

soem:

先說這行:
$ talys < input > output
< :把檔案讀進stdin
:把s
"如果"我沒有誤會他的readme的話,這行命令是:
1. 應該是要你準備個名叫input且符合他的格式的input檔案
2. 然後,會輸出結果到output檔案

格式的話,照他readme這句是他有提供一些sample可以參考。
不曉得你下面的input是不是有照這個方式呢?
(不過你得到的錯誤訊息是下面那件事情)

me:
我的input是直接從sample複製貼上到test資料夾
所以格式內容是一模一樣



: TALYS-error: Structure database not installed: change path in machine.f
: 我的machine.f 在 /home/lee/physics/talys/source
: https://www.dropbox.com/s/zmbhzustk6hnp6v/2014-01-26%2021%3A39%3A35.png
: 內容如下
: https://www.dropbox.com/s/yq6o4hbraqftuf6/2014-01-26%2021%3A32%3A21.png

因為我看不懂fortran所以只能用猜的...
他似乎是需要...嗯...可能是 home/structure/abundance/z001
那個home就是你改的變數,看看該路徑是不是有這個檔案。





: c ********************* Set directory for structure data ***************
: c
: c path : directory containing structure files to be read
: c lenpath: length of pathname
: c
: c The maximum length of the path is 60 characters
: c
: home='/home/lee/physics/talys/' (我改這行)
: lenhome=0
: do 10 i=1,60
: if (home(i:i).eq.' ') goto 100
: lenhome=lenhome+1
: 10 continue
: 100 path=home(1:lenhome)//'structure/'
: lenpath=lenhome+10
: c
: c Test to check accessibility of structure files
: c
: inquire (file=path(1:lenpath)//'abundance/z001',exist=lexist)
: if (lexist) return
: write(*,'(" TALYS-error: Structure database not installed:",
: + " change path in machine.f")')
: stop
: end
: Copyright (C) 2013 A.J. Koning, S. Hilaire and S. Goriely
: 我改的只有這部份
: 原本是 home='.'
: 不能執行後,我改成
: home='/home/lee/physics/talys/'
: 這樣改對吧?

soem :

之前FedoraHanT給的hint中這行:
sed -i 's|/home/finux01b/akoning/talys/|.|' machine.f
就是把他換成 '.'

me: 所以原本的 home='.' 是對的?

soem :

不過更重要的是,fortan是要重新compile的喔!
所以你改過之後也得重新compile出新的執行檔才有用。

me: 抱歉,我是超弱手,這邊要如何compile?

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.220.220.27
呢帽漢
2014-01-27 17:09:21 UTC
Permalink
修改了一下組建與安裝過程,請於 Fedora 系統中更新後使用。其他系統請參考
https://build.opensuse.org/package/view_file/home:bluebat/talys/talys.spec

※ 引述《FedoraHanT (呢帽漢)》之銘言:
: 剛剛製作了一個 Fedora 適用的套件
: https://build.opensuse.org/package/show/home:bluebat/talys
: 基本上不需要 talys.setup 而只需
: cd source
: sed -i 's|/home/finux01b/akoning/talys/|.|' machine.f
: g77 -c *.f
: g77 *.o -o talys
:
: ※ 引述《flied (libertines)》之銘言:
: : 我要安裝一個叫talys的軟體

--
http://community.fedora-hant.org

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.204.66.74
libertines
2014-02-03 01:59:01 UTC
Permalink
※ 引述《FedoraHanT (呢帽漢)》之銘言:
: 修改了一下組建與安裝過程,請於 Fedora 系統中更新後使用。其他系統請參考
: https://build.opensuse.org/package/view_file/home:bluebat/talys/talys.spec
: ※ 引述《FedoraHanT (呢帽漢)》之銘言:
: : 剛剛製作了一個 Fedora 適用的套件
: : https://build.opensuse.org/package/show/home:bluebat/talys
: : 基本上不需要 talys.setup 而只需
: : cd source
: : sed -i 's|/home/finux01b/akoning/talys/|.|' machine.f
: : g77 -c *.f
: : g77 *.o -o talys

下載了F大更新的talys.spec

Loading Image...

sed -i 's|/home/finux01b/akoning/talys/|.|' machine.f
我把這行改為我的路徑 home/lee/physics/talys

把 g77 改為 f95

在samples$ verify結果

***@lee-X402CA:~/physics/talys/samples$ ./verify
/home/lee/physics/talys/samples/17/a/new
/home/lee/physics/talys/samples/17/b/new
..
..

但最後要執行計算結果如下

***@lee-X402CA:~/physics/talys/test$ talys input output5
TALYS-error: Structure database not installed: change path in machine.f


可否請教哪裡還需修改



---
有人可以直接幫忙指點修正嗎?
我可以付酬勞
不要離龜山林口太遠...please

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 101.3.47.52

Loading...