| 5 | 1/1 | 返回列表 |
| 查看: 3516 | 回復(fù): 11 | ||
| 當(dāng)前只顯示滿足指定條件的回帖,點擊這里查看本話題的所有回帖 | ||
[求助]
fortran編譯 read出錯 完畢
|
||
|
錯誤提示 POSITION.F(31): error #6358: Constants and expressions are invalid in read-only I/O lists. [MSP] read(15,*) (msp(i),i=1,10) 前面msp有定義 character msp(10) read(15,*) (msp(i),i=1,10) 語法有問題嗎? 一下是全部程序 program getpos ccccccccc 12 is SPPARKS OUTPUT cccccccc ccccccccc 15 is the molecure ccccccccc ccccccccc 13 is OUTPUT ccccccccccc integer mnum nsp real coord(2000,3) real species(10,3) integer nsp(10) real x y z character tile cellp cella cellb cellz msp(10) open(12,file='POSCAR',status='old') open(15,file='POSCAR',status='old') open(13,file='CONTCAR',status='new') ccccccccccccccccccc sys param a b c cccccccccccccc read(12,*) tile write(13,*) tile read(12,*) cellp write(13,*) cellp read(12,*) cella ; write(13,*) cella read(12,*) cellb ; write(13,*) cellb read(12,*) cellc ; write(13,*) cellc read(15,*); read(15,*); read(15,*); read(15,*); read(15,*); cccccccccccccccccccc atom char ccccccccccccccccccccccc read(15,*) (msp(i),i=1,10) write(13,*) (msp(i),i=1,10) read(12,*); cccccccccccccccccccc atom num cccccccccccccccccccccccc read(12,*) mnum read(15,*) (nsp(i),i=1,10) DO i=1, 10 N_anum=mnum*nsp(i) write(13,N_anum) END DO read(12,*) read(15,*) write(13,*) 'R' cccccccccccccccc read molecue coord cccccccccccc DO i=1, mnum read(12,*) (coord(i,j),j=1,13) ENDDO close(12) cc DO j=1, 10 !!! species cyc !!!!!! DO i=1, nsp(j) !!! the j atom cyc !!!!!! read(15,*) x y z !!!!!!!!!!!!!!!!!!!!!!!! molecure coord !!!!!!!!!!!!! DO k=1, mnum nx=x+coord(k,1) ny=y+coord(k,2) nz=z+coord(k,3) write(13,*) nx ,ny ,nz ENDDO ENDDO ENDDO close(15) close(13) END [ Last edited by 賀儀 on 2011-8-23 at 14:53 ] |


至尊木蟲 (職業(yè)作家)
至尊木蟲 (職業(yè)作家)

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 0703化學(xué)調(diào)劑,求各位老師收留 +10 | 秋有木北 2026-03-14 | 10/500 |
|
|---|---|---|---|---|
|
[考研] 一志愿天大材料與化工(085600)總分338 +4 | 蔡大美女 2026-03-13 | 4/200 |
|
|
[考研] 一志愿華中科技大學(xué),080502,354分求調(diào)劑 +4 | 守候夕陽CF 2026-03-18 | 4/200 |
|
|
[考研] 一志愿吉林大學(xué)材料學(xué)碩321求調(diào)劑 +4 | Ymlll 2026-03-18 | 6/300 |
|
|
[考研] 344求調(diào)劑 +6 | knight344 2026-03-16 | 7/350 |
|
|
[考研] 化學(xué)工程321分求調(diào)劑 +15 | 大米飯! 2026-03-15 | 18/900 |
|
|
[考研] 0703化學(xué)調(diào)劑 ,六級已過,有科研經(jīng)歷 +10 | 曦熙兮 2026-03-15 | 10/500 |
|
|
[考研] 收復(fù)試調(diào)劑生 +4 | 雨后秋荷 2026-03-18 | 4/200 |
|
|
[考研] 280求調(diào)劑 +6 | 咕嚕曉曉 2026-03-18 | 7/350 |
|
|
[考研] 環(huán)境工程調(diào)劑 +8 | 大可digkids 2026-03-16 | 8/400 |
|
|
[基金申請]
今年的國基金是打分制嗎?
50+3
|
zhanghaozhu 2026-03-14 | 3/150 |
|
|
[考研] 求老師收留調(diào)劑 +4 | jiang姜66 2026-03-14 | 5/250 |
|
|
[考研] 材料與化工 323 英一+數(shù)二+物化,一志愿:哈工大 本人本科雙一流 +4 | 自由的_飛翔 2026-03-13 | 5/250 |
|
|
[考研] 中科大材料專碩319求調(diào)劑 +3 | 孟鑫材料 2026-03-13 | 3/150 |
|
|
[考研] 一志愿哈工大材料324分求調(diào)劑 +5 | 閆旭東 2026-03-14 | 5/250 |
|
|
[考研] 266求調(diào)劑 +4 | 學(xué)員97LZgn 2026-03-13 | 4/200 |
|
|
[考研] 工科材料085601 279求調(diào)劑 +8 | 困于星晨 2026-03-12 | 10/500 |
|
|
[考研] 290求調(diào)劑 +7 | ADT 2026-03-12 | 7/350 |
|
|
[論文投稿]
投稿問題
5+4
|
星光燦爛xt 2026-03-12 | 6/300 |
|
|
[考博] 福州大學(xué)楊黃浩課題組招收2026年專業(yè)學(xué)位博士研究生,2026.03.20截止 +3 | Xiangyu_ou 2026-03-12 | 3/150 |
|