User Functions
Don't have an account yet? Sign up as a New User
Lost your password?
Events
There are no upcoming events
Older Stories
Friday25-Apr
Tuesday01-Apr
Wednesday05-Dec
Monday19-Nov
Tuesday13-Nov
Monday05-Nov
Wednesday26-Sep
Monday17-Sep
|
|
|
|
| Compiling RSPt with XLF |
Views: 2079 |
|
|
oscgr
Registered: 11/13/06
Posts: 8
|
Thursday, May 31 2007 @ 03:57 PM CEST |
|
I'm trying to compile RSPt on an IBM cluster, the only available fortran compiler is the IBM XLF. Does anyone have suitable compiler flags for this?
/Oscar |
|
|
|
|
| |
Admin
Registered: 10/12/06
Posts: 130
|
Friday, June 01 2007 @ 02:10 PM CEST |
|
I don't have access to an IBM but you can try this:
CCOMPILER=xlc
CCOMPILERFLAGS= -O3 -qstrict -qarch=auto
FCOMPILER=xlf
FCOMPILERFLAGS= -O3 -qstrict -qarch=auto
FCPPFLAGS= -WF -DF_APPENDS_UNDERSCORE=0
You have to edit the main Makefile in the src-directory and set: FORTRANLIBS (as we use the C compiler for the link step you must add all the libraries that are special to Fortran)
LOADLIBES (add the directories where you keep lapack, blas, fftw and so on)
LDLIBES (set the correct names for lapack, blas and fftw on your computer).
When (not if) you have a working setup, please post it here or upload it to the download section (or email it to me, perand@foi.se) so I can add it to the distribution.
/Admin |
|
|
|
|
| |
patrice
Registered: 10/20/07
Posts: 23
|
Monday, March 29 2010 @ 02:50 PM CEST |
|
Dear IBM (sp) users and other interested people !
I'm trying to compile with xlf90 and xlc (IBM@cineca, italy) but the compilation get stuck on the 'sym ' directory
Does anyone know if FORTRANLIBS are necessary also for the
xl compilers and HOW they must be ?
thanks |
|
|
|
|
| |
Torbjorn
Registered: 11/03/06
Posts: 74
|
Tuesday, March 30 2010 @ 04:00 PM CEST |
|
You should probably ignore the above about having to edit FORTRANLIBS, that applied in an older version of the build system, I think.
I have managed to compile all files with the following flags:
## COMPILERS
# Uppmax cluster Set, xlf compilers
# module load xl
FHOME =
FCOMPILER = xlf
FCOMPILERFLAGS = -O3 -qstrict -qarch=auto -qextname
FCPPFLAGS =
FTARGETARCH =
FORTRANLIBS = -L/opt/ibmcmp/xlf/11.1 /lib -lxlf90 -L/opt/ibmcmp/lib -lxlomp_ser -lxlf90_r
F90COMPILER =
F90COMPILERFLAGS =
# gcc
CCOMPILER = xlc
CCOMPILERFLAGS = -O3 -qstrict -qarch=auto
CTARGETARCH =
CPPFLAGS =
CLOADER =
I have not verified that the code actually works, because there is presently no working math library installed at the cluster where I have access to the IBM compilers. You will have to adjust the location of the libraries to suit your system. Try this and if it does not work, please give the error message.
Torbjörn |
|
|
|
|
| |
patrice
Registered: 10/20/07
Posts: 23
|
Wednesday, March 31 2010 @ 04:14 PM CEST |
|
Thank you Tornbjorn,
I have put your flags (except FORTRANLIBS).
The key point is that the compilation does not stop anywhere only
if I use the command gmake(set of gnucommand) instead of make . More than that, I must compile rsptDir/src with gmake to get it done. Otherwise I get errors like ../lib not found.
Does it tell anything to you ?
Patrizia
|
|
|
|
|
| |
Torbjorn
Registered: 11/03/06
Posts: 74
|
Wednesday, March 31 2010 @ 04:58 PM CEST |
|
That means that the makefiles are set up assuming an implementation of make that behaves like gnu's make in some ways. It may be that we have only ever compiled RSPt on systems that come with gmake (it is linux'es almost everywhere...). I have a memory (but no documentation of the fact, so I may be wrong) that I tested it under Solaris (that is, Sun's make).
On what system are you and what vendor shipped your default make? We should try to set this up so that it works using that make also somehow.
Torbjörn |
|
|
|
|
| |
patrice
Registered: 10/20/07
Posts: 23
|
Thursday, April 01 2010 @ 10:43 AM CEST |
|
I think the gmake problem is a minor one at the moment.
I have made a systematic compilation in each directory .
I copy a file (quite long) here with settings and results !
--------------------------COMPILATION with your flags--------------
COMPILATION (in each single directory with gmake) APRIL 1
DIAGNOSTICS ARE IN
atom :
"constants.def", line 13.9: 1506-236 (W) Macro name INFINITY has been redefined.
"constants.def", line 13.9: 1506-358 (I) "INFINITY" is defined on line 122 of /usr/include/math .h.
"util5.c", line 295.8: 1506-181 (W) Definition of built-in function __expm1 ignored.
xlc -O3 -qstrict -qarch=auto -I../include -I./ atom.o broydn.o conpot.o cored.o difrou.o exc h_corr.o temperature.o util5.o -L../lib -ljxwac -lm -o ../bin/atom
rsptDir : (compiled without and with
FORTRANLIBS= -L/usr/lpp/xlf/lib/libxlf90.a -L/usr/lpp/xlsmp/aix53/libxlomp_ser.a -L/usr/lpp/xlf/lib/libxlf90_r.a)
xlf -O3 -qstrict -qarch=auto -qextname -o conpot.o -c conpot.F
xlf: 1501-245 (W) Warning: Hard ulimit has been reduced to less than RLIM_INFINITY. There may not be enough space to complete the compilation.
"conpot.F", line 786.15: 1515-019 (S) Syntax is incorrect.
** conpot === End of Compilation 1 ===
1501-511 Compilation failed for file conpot.F.
make[1]: *** [conpot.o] Error 1
binC :
xlc -O3 -qstrict -qarch=auto -I../include -c -o birmonv1.o birmonv1.c
xlc: 1501-245 (W) Warning: Hard ulimit has been reduced to less than RLIM_INFINITY. There may not be enough space to complete the compilation.
"birmonv1.c", line 26.51: 1506-041 (E) The invocation of macro pow contains fewer arguments than are required by the macro definition.
"birmonv1.c", line 26.47: 1506-275 (S) Unexpected text ',' encountered.
"birmonv1.c", line 479.26: 1506-041 (E) The invocation of macro pow contains fewer arguments than are required by the macro definition.
"birmonv1.c", line 479.22: 1506-275 (S) Unexpected text ',' encountered.
"birmonv1.c", line 493.26: 1506-041 (E) The invocation of macro pow contains fewer arguments than are required by the macro definition.
"birmonv1.c", line 493.22: 1506-275 (S) Unexpected text ',' encountered.
"birmonv1.c", line 508.26: 1506-041 (E) The invocation of macro pow contains fewer arguments than are required by the macro definition.
"birmonv1.c", line 508.22: 1506-275 (S) Unexpected text ',' encountered.
make: *** [birmonv1.o] Error 1
----------------------------------------------------------------
AFTER this compilation the directory bin contains :
GPa_per_mRy
add2col
addpdfiles
al_to_strain
angbor
arc_rename
areas
atan2of
atom
autoRef2html
cub
runfiles
runs
runsf
runsl
runslf
runstrs
runstrsl
symt
Patrizia |
|
|
|
|
| |
Torbjorn
Registered: 11/03/06
Posts: 74
|
Monday, April 19 2010 @ 01:34 PM CEST |
|
Hello again and sorry about the late reply.
It turns out that there were many problems when compiling the code with IBM's compilers. I have made a lot of fixes (~100 files were to be modified) and now it mostly seems to work. Revision 916 contains all the fixes in the fortran code, a few fixes in the c-code and compiler flags that worked for me on the IBM cluster Set (look in the RSPTmakes directory).
But: There are still two memory problems in the c-code that I have not been able to fix.
One is in basesInterstitial.c in the function productPhase and the other is in rsptData.c in the function freeBFzeroTable. There are ugly workarounds that go as follows:
* For the bug in rspt_free.c, simply comment out the call to freeBFzeroTable.
* For the bug in basesInterstitial.c, change
++++++++++++
if (!D) {
product[index] = C;
} else {
----------------
to
++++++++++++
fprintf(rsptlogc,"%d ",D);
if (!D) {
product[index] = C;
} else {
----------------
In other words, just put in a fprintf statement. This will give a lot of junk in the rsptlogc file and it slows down the code, but at least the code runs. It seems that it also works if you compile the problematic files with no optimization (-O0). I have not been able to figure out what goes wrong here. With these ugly fixes, however, the code goes through the testsuite nicely.
If these fixes do not work for you or you get different errors, reply here and I will see if there is more that I can do.
Torbjörn |
|
|
|
|
| |
patrice
Registered: 10/20/07
Posts: 23
|
Monday, April 19 2010 @ 02:43 PM CEST |
|
Hullo Tornbjorn,
stuck in Uppsala by the Volcano ashes I have made a few steps
further in the compilation. I made changes in the files in the binC directory, and fix some other compilation options.
I list my new flags here:
------------------------------------------------------------------
##FORTRAN COMPILER
XLF90 =xlf
SP_FFLAGS = -o3 -qstrict -qarch=auto -qextname $(IFLAGS) $(FFTFLAG)
SP90_FLAGS = $SP_FFLAGS
##C COMPILERS
CCOMPILER =xlc
CPP = cpp
#SP_CPPFLAGS = -o3 -qstrict -qarch=auto
#SP_CPPFLAGS = -P -traditional $(DFLAGS) $(IFLAGS)
#SP_CFLAGS = -O0 -std=c99 -Wall -g $(IFLAGS)
SP_CFLAGS = -o3 -qstrict -qarch=auto -D_ESSL -DFFTW $(IFLAGS) $(FFTFLA
G)
#RSPTmake adapter
FCOMPILER =$(XLF90)
FCOMPILERFLAGS =$(SP_FFLAG)
F90COMPILERFLAGS =$(SP_F90FLAGS)
FCPPFLAGS =
FTARGETARCH =
FORTRANLIBS =-lxlf -lxlf90 -lxlf90_r -lm
CCOMPILERFLAGS =$(SP_CFLAGS)
CPPFLAGS =$(SP_CPPFLAGS)
#RSPTmake adapter
LAPACKLIB = -L$(LAPACK_LIBS)
BLASLIB = -L$(BLACS_LIBS) -lblacs -lblacsCinit -lblacsF77init
FFTWLIB =-lessl -L$(FFTW_LI -lfftw3
EXTRALIBS =
#EXTRALIBS = -lmpi_f77
FFTW_INCLUDE = -I/cineca/prod/libraries/fftw/3.2.2/xl--10.1/include
INCLUDEDIRS =-I/usr/include $(FFTW_INCLUDE)
---------------------------------------------------------------------------
I get the following problems :
1. The make command in the main directory does not act on
rsptDir/src files .
2. Then I go manually into it and the result is te following diagnostics:
-L/cineca/prod/libraries/lapack/3.2.1/xl--10.1/lib -L/cineca/prod/libraries/blacs/1.1/xl--10.1/lib -lblacs -lblacsCinit -lblacsF77init -lessl -L/cineca/prod/libraries/fftw/3.2.2/xl--10.1/lib -lfftw3 -lxlf -lxlf90 -lxlf90_r -lm -o ../../bin/rspt
xlc: 1501-245 (W) Warning: Hard ulimit has been reduced to less than RLIM_INFINITY. There may not be enough space to complete the compilation.
ld: 0711-317 ERROR: Undefined symbol: .fczdotu_
ld: 0711-317 ERROR: Undefined symbol: .fczdotc_
ld: 0711-317 ERROR: Undefined symbol: .packedindex_
ld: 0711-317 ERROR: Undefined symbol: .rspt_
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make[1]: *** [../../bin/rspt] Error 8
make[1]: Leaving directory `/gpfs/scratch/userinfm/cne0fm4d/PATRIZIA_new/rspt812/rsptDir/src'
make: *** [rspt] Error 2
---------------------------
|
|
|
|
|
| |
Torbjorn
Registered: 11/03/06
Posts: 74
|
Monday, April 19 2010 @ 08:38 PM CEST |
|
Hello Patrizia,
The first problem seems related to that you are on a system that you are on an AIX system with the AIX version of the make program (I guess from your previous message about an IBM system at cineca + info based on their homepage and my VERY limited grasp of the italian language...). Unfortunately I don't have access to any AIX system, so I can't investigate the problems with AIX make.
When I look at the functions fczdotu, fczdotc (in toCblas library), packedindex and rspt I notice that they are all inconsistently declared in the headers (or not declared at all). Maybe fixing this will remove the problem? I have just fixed it and commited it in revision 918 of the trunk.
Torbjörn |
|
|
|
|
| |
|
|
| Topic Legend: |
 |
Normal Topic |
 |
Locked Topic |
 |
Sticky Topic |
|
 |
New Post |
 |
Sticky Topic W/ New Post |
 |
Locked Topic W/ New Post |
|
|
|
 |
Subscribe to this topic |
|
|
|
|
|
You may not post messages
|
|
Full HTML is allowed
|
|
Words are not censored
|
|
|