Home My Page Projects PaStiX
Summary Activity Forums Lists Docs News Files

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: fmurge with openmp [ Reply ]
By: Pierre Navaro on 2013-11-21 14:05
[forum:148432]
My version of gcc was too old (4.2 on mac). It works well for higher version number.

RE: fmurge with openmp [ Reply ]
By: Xavier Lacoste on 2013-11-21 11:06
[forum:147994]
I updated the tags/5.2.2 with new fixes, it should build correctly now.

XL

RE: fmurge with openmp [ Reply ]
By: Xavier Lacoste on 2013-11-21 11:05
[forum:147993]
That's strange, with gcc I didn't get any warning or error with -openmp.

My gcc :

mpicc --version
gcc (Debian 4.8.2-1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

XL.

RE: fmurge with openmp [ Reply ]
By: Pierre Navaro on 2013-11-21 10:56
[forum:147992]
OK i found my error.
I used two much threads to run fmurge.
It works very well and i get right plots.
Very sorry.
Pierre

RE: fmurge with openmp [ Reply ]
By: Pierre Navaro on 2013-11-21 10:34
[forum:147991]

When MURGE_THREADSAFE is enable. It triggers the -openmp flag but this flag works only for intel compiler. For GNU compiler there is an error. I changed it for -fopenmp.

Pierre

RE: fmurge with openmp [ Reply ]
By: Xavier Lacoste on 2013-11-21 10:28
[forum:147990]
I found a bug in sopalin/src/module.mk

a ${CTAGSPROG} ctags which should be ${CTAGSPROG} ...
which create de error with missing CMURGE_GetGlobalProduct

I'll push a bugfix to trunk and branches/5.2.2, I 'm looking into an other bug before that (mpirun -np 2 murge 10 2 crashes on linux).

Are you using the tarball or the branches/5.2.2 ? The second is more up to date but I can create new tarballs.

XL.

RE: fmurge with openmp [ Reply ]
By: Pierre Navaro on 2013-11-21 10:05
[forum:147989]
I am trying to build pastix in marseille mesocentre.

I have
nm ../install/libpastix_murge.a | grep MURGE_GetGlobalProduct
U MURGE_GetGlobalProduct
000000000001b5e0 T MURGE_GetGlobalProduct
000000000001c5a0 T ZMURGE_GetGlobalProduct
000000000001b5e0 T DMURGE_GetGlobalProduct
000000000001c0c0 T MURGE_GetGlobalProduct
000000000001b670 T SMURGE_GetGlobalProduct

Probably murge library is not built right. When i do
make murge_examples
i get

make -C murge/examples
make[1]: Entering directory `/scratch/pnavaro/pastix_release_4694/src/murge/examples'
mpicc -Wall -O3 -DFORCE_NO_CUDA -I/softs/cemracs/scotch/intel/include -DDISTRIBUTED -DWITH_SCOTCH -I/softs/hwloc/1.5.1//include -DWITH_HWLOC -DPREC_DOUBLE -I../include -c src/murge-dist.c -o obj/murge-dist.o
mpicc -Wall -O3 -DFORCE_NO_CUDA -I/softs/cemracs/scotch/intel/include -DDISTRIBUTED -DWITH_SCOTCH -I/softs/hwloc/1.5.1//include -DWITH_HWLOC -DPREC_DOUBLE -I../include obj/murge-dist.o -o bin/murge-dist -lifcore -lm -lrt -L/softs/cemracs/scotch/intel/lib -lptscotch -lptscotcherrexit -L/softs/hwloc/1.5.1//lib -lhwloc -lpthread -mkl
obj/murge-dist.o: In function `main':
src/murge-dist.c:(.text+0xb7): undefined reference to `MURGE_Initialize'
src/murge-dist.c:(.text+0xe5): undefined reference to `MURGE_SetDefaultOptions'
src/murge-dist.c:(.text+0x116): undefined reference to `MURGE_SetCommunicator'
src/murge-dist.c:(.text+0x192): undefined reference to `MURGE_SetOptionINT'
src/murge-dist.c:(.text+0x1c8): undefined reference to `MURGE_SetOptionINT'
src/murge-dist.c:(.text+0x239): undefined reference to `MURGE_GraphBegin'
src/murge-dist.c:(.text+0x270): undefined reference to `MURGE_GraphEdge'
src/murge-dist.c:(.text+0x2b6): undefined reference to `MURGE_GraphEnd'
src/murge-dist.c:(.text+0x2e7): undefined reference to `MURGE_GetLocalUnknownNbr'
src/murge-dist.c:(.text+0x330): undefined reference to `MURGE_GetLocalUnknownList'
src/murge-dist.c:(.text+0x457): undefined reference to `MURGE_AssemblyBegin'
src/murge-dist.c:(.text+0x4a3): undefined reference to `MURGE_AssemblySetValue'
src/murge-dist.c:(.text+0x4e8): undefined reference to `MURGE_AssemblySetValue'
src/murge-dist.c:(.text+0x525): undefined reference to `MURGE_AssemblyEnd'
src/murge-dist.c:(.text+0x726): undefined reference to `MURGE_SetLocalRHS'
src/murge-dist.c:(.text+0x766): undefined reference to `MURGE_GetLocalSolution'
src/murge-dist.c:(.text+0x792): undefined reference to `MURGE_Clean'
src/murge-dist.c:(.text+0x7be): undefined reference to `MURGE_Finalize'
src/murge-dist.c:(.text+0x849): undefined reference to `MURGE_GraphEdge'
make[1]: *** [bin/murge-dist] Error 1
rm obj/murge-dist.o
make[1]: Leaving directory `/scratch/pnavaro/pastix_release_4694/src/murge/examples'
make: *** [murge_examples] Error 2




RE: fmurge with openmp [ Reply ]
By: Xavier Lacoste on 2013-11-21 09:54
[forum:147988]
I managed to have the error on LINUX :

dmurge.c: In function ‘main’:
dmurge.c:434:3: warning: implicit declaration of function ‘DMURGE_GetGlobalProduct’ [-Wimplicit-function-declaration]
CALL_MURGE(DMURGE_GetGlobalProduct(id, globprod, -one));

I'll fix it.

How did you activate the -openmp ?
-DMURGE_THREADSAFE should automatically trigger it.

What did you modified in config.in.
I just copied config/LINUX-GNU.in in config.in and uncommented MURGE_THREADSAFE.

runned ./example/bin/murge 10 2
and this seemed correct :
gnuplot> plot "./result.plot" u 2:3 t "reference","./result.plot" u 2:4 t "Result, first degree of freedom"



RE: fmurge with openmp [ Reply ]
By: Xavier Lacoste on 2013-11-21 09:42
[forum:147987]
Ok, I'll fix the missing stderr, thanks.

For the missing CMURGE_GetGlobalProduct, I suppose that :

> nm ../install/libpastix_murge.a|grep CMURGE_GetGlobalProduct
Does not look like :
"
00000000000193f0 T _CMURGE_GetGlobalProduct
000000000001ccb0 S _CMURGE_GetGlobalProduct.eh
"

Is
> grep CMURGE_GetGlobalProduct sopalin/src/*
answering :
"sopalin/src/cmurge_pastix.h:#define MURGE_GetGlobalProduct CMURGE_GetGlobalProduct "
?


XL.

RE: fmurge with openmp [ Reply ]
By: Pierre Navaro on 2013-11-21 09:21
[forum:147986]
Ok fmurge gives good results on my mac with last release. I had to disable
openmp to get right plots. I enable the MURGE_THREADSAFE option but it was not enough.

Thanks for your help.
Pierre

RE: fmurge with openmp [ Reply ]
By: Pierre Navaro on 2013-11-21 08:50
[forum:147985]
i build pastix on mac and linux, i get same results.
I try to build the last release with intel 13 i get some errors building examples.

murge.c(408): error: "stderr" must be specified in a variable list at enclosing OpenMP parallel pragma
#pragma omp parallel default(none) private(m, i, ierr, k, matElem) \

i need to add std err in shared variables

And i have this error i can't fix.

/tmp/iccRQMpon.o: In function `main':
cmurge.c:(.text+0x11f4): undefined reference to `CMURGE_GetGlobalProduct'
cmurge.c:(.text+0x175a): undefined reference to `CMURGE_GetGlobalProduct'
make[1]: *** [../bin/cmurge] Error 1


Pierre

RE: fmurge with openmp [ Reply ]
By: Nobody on 2013-11-14 16:14
[forum:147982]
I didn't test fmurge.F90 for a while, it seem to work in OpenMP on my laptop (my MPI is broken here and gives deadlocks... I have to test it elsewhere but right now i'm not in Bordeaux...)

gnuplot> plot "./result.plot" u 2:3 t "reference", "./result.plot" u 2:4 t "Result, first degree of freedom" shows me the correct solution.

On which machine are you running ?

XL.

RE: fmurge with openmp [ Reply ]
By: Pierre Navaro on 2013-11-14 12:50
[forum:147966]

fmurge.png (28) downloads
Is there a problem with fmurge, results are not very good …
here the plot of
./fmurge 32 1
I did not find the error in the code

RE: fmurge with openmp [ Reply ]
By: Pierre Navaro on 2013-11-14 10:13
[forum:147965]

fmurge.png (27) downloads
I still have a problem with fmurge. The test does not work.
I did not find where is the error…
./fmurge 32 1

Pierre

RE: fmurge with openmp [ Reply ]
By: Xavier Lacoste on 2013-11-13 16:32
[forum:147963]
In utils.F90 ? Ok, I'll change it, thanks.

RE: fmurge with openmp [ Reply ]
By: Pierre Navaro on 2013-11-13 15:26
[forum:147962]
Thanks,
Other thing probably not very important. With fortran if you want to use the null character.
It's better to use char(0) instead of "\0".
"\0" works only if you use -fbackslash with gfortran and i did not see it in pastix makefiles.
Cheers
Pierre

RE: fmurge with openmp [ Reply ]
By: Xavier Lacoste on 2013-11-12 15:37
[forum:147955]
To use MURGE inside an OpenMP loop you need to activate -DMURGE_THREADSAFE :

# Uncomment if you need MURGE interface to be thread safe
# CCPASTIX := $(CCPASTIX) -DMURGE_THREADSAFE

There is an error with this part of the config.in, it must be placed before the :

###################################################################
# DO NOT TOUCH #
###################################################################

part... Otherwise it won't appear in the compilation flags.

I have to fix this on the new release...

With that option it should work better (I didn't test it recently), this will add mutex inside each MURGE_AssemblySetValue / MURGE_GraphEdge, which is similar to encapsulating MURGE Calls inside protected zones.

Thanks for the feedback,

XL.


fmurge with openmp [ Reply ]
By: Pierre Navaro on 2013-11-12 10:55
[forum:147954]
Hi
I am trying to run the test build by fmurge.F90.
There is some openmp directives in this example but when i enable openmp to build it.
It does not work. Did i do something wrong ?

Pierre


mpif90 -O3 -fopenmp fmurge.F90 -o ../bin/fmurge -L/usr/local/lib -lpastix_murge -lpastix -lgfortran -lm -lptscotch -lscotch -lptscotcherrexit -lpthread -lblas -lgomp

$ ../bin/fmurge 1000 3

Running on 8 threads and 1 MPI Tasks
+--------------------------------------------------------------------+
+ PaStiX : Parallel Sparse matriX package +
+--------------------------------------------------------------------+
Matrix size 1000 x 1000
Number of nonzeros in A 2996
+--------------------------------------------------------------------+
+ Options +
+--------------------------------------------------------------------+
Version : Unversioneddirectory
SMP_SOPALIN : Defined
VERSION MPI : Defined
PASTIX_DYNSCHED : Not defined
STATS_SOPALIN : Not defined
NAPA_SOPALIN : Defined
TEST_IRECV : Not defined
TEST_ISEND : Defined
TAG : Exact Thread
FORCE_CONSO : Not defined
RECV_FANIN_OR_BLOCK : Not defined
OUT_OF_CORE : Not defined
DISTRIBUTED : Defined
METIS : Not defined
WITH_SCOTCH : Defined
INTEGER TYPE : int
FLOAT TYPE : double
+--------------------------------------------------------------------+
Check : Numbering OK
Check : Sort CSC OK
Check : Duplicates OK
Check : Graph symmetry OK
Add 2 null terms on proc 0
Time to compute ordering 0.0017 s
Time to analyze 0.000181 s
Number of nonzeros in factorized matrice 161268
Fill-in 5.98064
Number of operations (LU) 5.64114e+06
Prediction Time to factorize (AMD 6180 MKL) 0.0058 s

ERROR: Wrong number of entries (13410 != 26964)


ERROR: Need to set values before.


ERROR: Need to set values before.

||AX - B||/||AX|| : NaN