Porting linux application on cray machine

In summary, the author is trying to deploy an oceanic model on a new machine and is having trouble. The model is running on Ubuntu linux and compiled with Intel Fortran. The author copied the produced file to the new machine and got the following error massage. The error is explained as: the file is COS blocked and has an invalid BCW. The author needs to migrate the data using a text format file.
  • #1
yairsuari
8
0
I am trying to deploy my oceanic model currently runing on ubuntu linux and compiled with intel fortran on a cray sv1 machine with UNICOS operating system.
It actually went quite well until i tried to read unformatted files. i am using the following code to export the data to the new machine:
file_name=trim(datafolder)//'basin'
open(21,file=file_name,status='old',
+ form='unformatted',convert='little_endian')
read(21)h,alat,alon,dx,dy
read(21)fsm,dum,dvm
read(21) z,zz
close(21)
file_name='~/Documents/temp/phys/data/basin'
open(21,file=file_name,status='new',
+ form='unformatted',convert='cray')
write(21)h,alat,alon,dx,dy
write(21)fsm,dum,dvm
write(21) z,zz
close(21)
When i copy the produced file to the new machine and try running the model i get the following error massage:
lib-5026 ./a.out: UNRECOVERABLE library error
The COS blocked file contains an invalid BCW (block control word).
Encountered during a sequential unformatted READ from unit 21
Fortran unit 21 is connected to a sequential unformatted COS blocked file:
"/users/negev1/biu/ysuari/prog/bfm_3dcode/phys/data/basin"
Error initiated at line 225 in routine '_rdunf'.
Abort
Beginning of Traceback:
Interrupt at address 377677a in routine '_lwp_killm'.
Called from line 32 (address 374366a) in routine 'raise'.
Called from line 127 (address 302611d) in routine 'abort'.
Called from line 59 (address 704047a) in routine '_ferr'.
Called from line 225 (address 735714c) in routine '_rdunf'.
Called from line 357 (address 676525a) in routine '_xfer_iolist'.
Called from line 147 (address 742423c) in routine '_FRU'.
Called from line 6347 (address 110006b) in routine 'BASIN'.
Called from line 789 (address 2575a) in routine 'POM2K'.
Called from line 350 (address 324455c) in routine '$START$'.
End of Traceback.
IOT trap (core dumped)
the error is explained as:
The COS blocked file contains an invalid BCW (block control word).
A Fortran I/O or positioning operation or an FFIO() operation on a COS
blocked file encountered a BCW (block control word) that is not valid. The
file may not be a COS blocked file, or it may be corrupted.
Ensure that the file is COS blocked; if it is not, use the appropriate
specification on the assign(1) or asgcmd(1) command. If the file is
corrupted, re-create it if possible.
even after reading the section about the assign command this error massage is like Chinese to me.

does anyone know how the file migration should be done?

thanks yair
 
Technology news on Phys.org
  • #2
just for the record i used formatted text files as suggested below:

Unformatted files are non-portable, especially between machines with different word sizes and floating-point representations. There may be utilities available to help with the conversion. Simply writing an unformatted file on an x-86 or x-64 PC and reading the file on an SV1, which AFAIK does not use IEEE floating-point, will not work.
 
  • #3
Use a text format file to exchange data. On some machines, unformatted I/O means text files, on others it mean binary files. On IBM mainframes, it's some weird binary data that included offsets into memory, and on the old Fortran G compiler, reading text data with unformatted I/O sometimes read the data into the PSW's at low memory, crashing the computer (I had this happen twice before I realized it was my program crashing the system).
 

FAQ: Porting linux application on cray machine

What is a Cray machine?

A Cray machine is a type of supercomputer that is specifically designed for scientific and engineering applications. It is known for its high processing power and parallel computing capabilities, making it ideal for complex computations and simulations.

Why would I need to port a Linux application on a Cray machine?

Porting refers to the process of adapting a software application to run on a different platform or operating system. In the case of a Cray machine, which typically runs on a specialized operating system, porting a Linux application would allow it to take advantage of the machine's high performance and specialized hardware.

How do I port a Linux application on a Cray machine?

The process of porting a Linux application on a Cray machine involves several steps. First, the application needs to be compiled using a Cray-specific compiler and libraries. The code may also need to be modified to take advantage of the machine's parallel computing capabilities. It is also important to ensure that the application is compatible with the Cray's operating system.

Are there any challenges in porting a Linux application on a Cray machine?

Yes, there can be some challenges in porting a Linux application on a Cray machine. These can include compatibility issues, differences in programming languages and libraries, and the need for specialized knowledge and tools. It is important to thoroughly test the application after porting to ensure that it runs correctly and efficiently on the Cray machine.

What are the benefits of porting a Linux application on a Cray machine?

The main benefit of porting a Linux application on a Cray machine is the potential for improved performance and speed. The Cray's specialized hardware and parallel computing capabilities can significantly speed up complex computations and simulations, making it an ideal platform for scientific and engineering applications. Additionally, porting a Linux application on a Cray machine can open up new opportunities for collaboration and research in the scientific community.

Similar threads

Replies
8
Views
4K
Replies
1
Views
4K
Replies
13
Views
4K
Replies
8
Views
5K
Replies
4
Views
4K
Replies
17
Views
3K
Replies
2
Views
436
Replies
9
Views
8K
Back
Top