PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

error encounter while building atlas libraries

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
jasonshih



Joined: 03 Aug 2004
Posts: 32

PostPosted: Wed Sep 08, 2004 7:55 pm    Post subject: error encounter while building atlas libraries Reply with quote

Hi,
while upgrading to recent version of PGI compiler, say 5.2-2, error was encountered when compiling the atlas libraries:

------------------------------------------------------
make[7]: *** [zinstall_iamax] Error 255
make[7]: Leaving directory `/usr/local/Atlas/pgi/tune/blas/level1/Linux_P4SSE2_2'
make[6]: *** [Make_ziamax] Error 2
make[6]: Leaving directory `/usr/local/Atlas/pgi/src/blas/level1/Linux_P4SSE2_2'
make[5]: *** [zgen] Error 2
make[5]: Leaving directory `/usr/local/Atlas/pgi/src/blas/level1/Linux_P4SSE2_2'
make[4]: *** [zlib] Error 2
make[4]: Leaving directory `/usr/local/Atlas/pgi/src/blas/level1/Linux_P4SSE2_2'
make[3]: *** [lib.grd] Error 2
make[3]: Leaving directory `/usr/local/Atlas/pgi/src/auxil/Linux_P4SSE2_2'
make[2]: *** [IStage1] Error 2
make[2]: Leaving directory `/usr/local/Atlas/pgi/bin/Linux_P4SSE2_2'
ERROR 396 DURING CACHESIZE SEARCH!!. CHECK INSTALL_LOG/Stage1.log FOR DETAILS.
make[2]: Entering directory `/usr/local/Atlas/pgi/bin/Linux_P4SSE2_2'
cd ../.. ; make error_report arch=Linux_P4SSE2_2
make[3]: Entering directory `/usr/local/Atlas/pgi'
make -f Make.top error_report arch=Linux_P4SSE2_2
make[4]: Entering directory `/usr/local/Atlas/pgi'
uname -a 2>&1 >> bin/Linux_P4SSE2_2/INSTALL_LOG/ERROR.LOG
pgcc -v 2>&1 >> bin/Linux_P4SSE2_2/INSTALL_LOG/ERROR.LOG
pgcc-Warning-No files to process
pgcc -V 2>&1 >> bin/Linux_P4SSE2_2/INSTALL_LOG/ERROR.LOG
pgcc --version 2>&1 >> bin/Linux_P4SSE2_2/INSTALL_LOG/ERROR.LOG
pgcc-Warning-Unknown switch: --version
pgcc-Warning-No files to process
/bin/tar cf error_Linux_P4SSE2_2.tar Make.Linux_P4SSE2_2 bin/Linux_P4SSE2_2/INSTALL_LOG/*
mv error_Linux_P4SSE2_2.tar.gz error_Linux_P4SSE2_2.tgz
make[4]: Leaving directory `/usr/local/Atlas/pgi'
make[3]: Leaving directory `/usr/local/Atlas/pgi'
make[2]: Leaving directory `/usr/local/Atlas/pgi/bin/Linux_P4SSE2_2'
Error report error_<ARCH>.tgz has been created in your top-level ATLAS
directory. Be sure to include this file in any help request.


First, make sure this error is not covered in the ATLAS errata file,
http://math-atlas.sourceforge.net/errata.html
All known errors, and most common mistakes/system problems are documented
in this file, so it will save everyone hassle in the long run if you take
the time to scope it out before sending e-mail to the help list.

If this does not have the solution to your problem, and you can't figure out
what went wrong, submit a support request to the ATLAS support tracker, as
discussed here:
http://math-atlas.sourceforge.net/faq.html#help

In the above examples, <ARCH> should be replaced with your architecture
string, such as "Linux_PIII" or "FreeBSD_21264".

------------------------------------------------------


while tracing the log file under specific arch (to save space, i only extract one of them):
------------------------------------------------------
pgcc -DL2SIZE=524288 -I/usr/local/Atlas/pgi/include -I/usr/local/Atlas/pgi/include/Linux_P4SSE2_2 -I/usr/local/Atlas/pgi/include/contrib -DAdd_ -DStringSunStyle -DATL_OS_Linux -DATL_ARCH_P4 -DATL_SSE2 -DATL_SSE1 -DATL_GAS_x8632 -DATL_NCPU=2 -fast -DSREAL -c siamax.c
PGC-W-0221-Redefinition of symbol fabs (siamax.c: 5)
PGC-W-0205-Argument mismatch for fabs (siamax.c: 16)
PGC-W-0205-Argument mismatch for fabs (siamax.c: 24)
PGC-W-0205-Argument mismatch for fabs (siamax.c: 40)
PGC-W-0205-Argument mismatch for fabs (siamax.c: 40)
PGC-W-0205-Argument mismatch for fabs (siamax.c: 46)
PGC-W-0205-Argument mismatch for fabs (siamax.c: 46)
PGC-W-0205-Argument mismatch for fabs (siamax.c: 61)
PGC-S-0094-Illegal type conversion required (siamax.c: 16)
PGC-S-0094-Illegal type conversion required (siamax.c: 24)
PGC-S-0094-Illegal type conversion required (siamax.c: 40)
PGC-S-0094-Illegal type conversion required (siamax.c: 40)
PGC-S-0094-Illegal type conversion required (siamax.c: 46)
PGC-S-0094-Illegal type conversion required (siamax.c: 46)
PGC-S-0094-Illegal type conversion required (siamax.c: 61)
PGC/x86 Linux/x86 5.2-2: compilation completed with severe errors
make[8]: *** [siamaxtest] Error 2
make[8]: Leaving directory `/usr/local/Atlas/pgi/tune/blas/level1/Linux_P4SSE2_2
------------------------------------------------------

extracting numerous failed from log file ([jason@cluster pgi]$ grep FAIL ./bin/Linux_P4SSE2_2/INSTALL_LOG/Stage1.log) :
-------------------------------------------------------
2 of 3 NRM2 TESTS FAILED!!
1 OVER 777 1 FAILED
2 UNDER 777 1 FAILED
4 OVER 777 -1 FAILED
5 UNDER 777 -1 FAILED
7 OVER 777 2 FAILED
8 UNDER 777 2 FAILED
10 OVER 777 -3 FAILED
11 UNDER 777 -3 FAILED
8 of 12 NRM2 TESTS FAILED!!
12 TESTS FAILED!!!
3 TESTS FAILED!!!
3 TESTS FAILED!!!
7 TESTS FAILED!!!
1 TESTS FAILED!!!
3 TESTS FAILED!!!
12 TESTS FAILED!!!
3 TESTS FAILED!!!
3 TESTS FAILED!!!
7 TESTS FAILED!!!
1 TESTS FAILED!!!
3 TESTS FAILED!!!
-------------------------------------------------------

and only two of archive was built.
Any idea? thanks in advance.


BR,
J
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 5815
Location: The Portland Group Inc.

PostPosted: Thu Sep 09, 2004 1:46 pm    Post subject: Add "-Mscalarsse" Reply with quote

J,

The test errors are because "-fast" on a 32-bit system uses the x87 registers, while ATLAS 3.6.0 assumes the use of SSE registers. To use SSE on a 32-bit system, recomple ATLAS with "-fast -Mscalarsse". I just tested it on a Dual Xeon and it passed all the sanity tests. I'll update the ATLAS guide with this.

The compilation issue is an interesting situation. It occurs with two files "iamax_ab23p24_x1.c" and "iamax_abs2p36_x1".c. When you use the function "fabs", pgcc uses a built in intrinsic function instead of the math library version. These two files attempt to override this behavior by redefining "fabs" to "fabs". But since "fabs" is a macro function, when "fabs(*X)" is used in the source, the preprocessor changes this to "fabs" not the expected "fabs(*X)".

You can fix this by simply replacing:
Code:
#define fabs fabs

to
Code:
#undef fabs


Hope this helps,
Mat
Back to top
View user's profile
jasonshih



Joined: 03 Aug 2004
Posts: 32

PostPosted: Tue Sep 14, 2004 6:16 am    Post subject: Reply with quote

Thanks Matt,
this do solve the problem while compiling the Atlas with -fastsse option and thanks for updating the instruction guide of Atlas. However, as claim the manual, with -Mscalarsse is trying to utilize SSE/SSE2 instructions to perform the operations, as it's a default option in 64-but mode. I tried to compile several program without -Mscalarsse but keep fastsse along, and no error encountered. Is it code specific issue? or?

Thanks.
J
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 5815
Location: The Portland Group Inc.

PostPosted: Tue Sep 14, 2004 8:28 am    Post subject: Reply with quote

On an AMD64 there is no x87 FPU so SSE must be used. So compiling with or without "-Mscalarsse" makes no difference in 64-bits. However, "-fastsse" is really a composite of our most common SSE optimizations.

"-fastsse" ~= "-O2 -Munroll=c:2 -Mnoframe -Mlre -Mscalarsse -Mvect=sse -Mcache_align -Mflushz"

So when compiling with "-fastsse", "-Mscalarsse" is used implicitly.

I don't recommend using "-fastsse" when compiling ATLAS's C source because the vectorizer can cause several sanity tests to fail. The vectorizer when given the SSE option, attempts to rearrange code to take advantage of the system's ability to perform two simultaneous 64-bit floating point operations. Unfortunately for some code, especially highly tuned code such as ATLAS, this can lead to different than expected results.

Hope this helped!
- Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group